Wowza Community

Not getting control access to HTTP (HLS) streams

Hi

Goal : Get the control access to HTTP stream publishing and add a logic to allow multiplexing of http stream.

Know : 1. Configure PushPublishMap.txt under /usr/local/WowzaStreamingEngine/conf folder and set following properties.

 hlstest.stream={"entryName":"wowzatest", "profile":"cupertino-akamai", "akamai.hostId":"p-ep3201.ingest.akamaientrypoint.net", "debugLog":"true", "destinationName":"akamai", "akamai.streamId":"3201", "http.playlistCount":"2",        
                                   "streamName":"wowzatest", "http.writerDebug":"true"}
  1. Create custom Module extended from ModuleBase. Generate .jar using Wowza IDE guidelines and specify the module in Application.xml file for specific application.
package com.wowza.tutorial;
import com.wowza.wms.application.*;
import com.wowza.wms.amf.*;
import com.wowza.wms.client.*;
import com.wowza.wms.module.ModuleBase;
import com.wowza.wms.request.*;
import com.wowza.wms.stream.*;
import com.wowza.wms.httpstreamer.model.*;
import com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.*;
public class HelloWowza extends  ModuleBase {
	public void onAppStart(IApplicationInstance appInstance) {
		String fullname = appInstance.getApplication().getName() + "/"
				+ appInstance.getName();
		getLogger().info("onAppStart: " + fullname);
	}
	public void onAppStop(IApplicationInstance appInstance) {
		String fullname = appInstance.getApplication().getName() + "/"
				+ appInstance.getName();
		getLogger().info("onAppStop: " + fullname);
	}
	public void onConnect(IClient client, RequestFunction function,
			AMFDataList params) {
		getLogger().info("onConnect: " + client.getClientId());
	}
	public void onConnectAccept(IClient client) {
		getLogger().info("onConnectAccept: " + client.getClientId());
	}
	public void onConnectReject(IClient client) {
		getLogger().info("onConnectReject: " + client.getClientId());
	}
	public void onDisconnect(IClient client) {
		getLogger().info("onDisconnect: " + client.getClientId());
	}
	public void onStreamCreate(IMediaStream stream) {
		getLogger().info("onStreamCreate: " + stream.getSrc());
	}
	public void onStreamDestroy(IMediaStream stream) {
		getLogger().info("onStreamDestroy: " + stream.getSrc());
	}
	
	public void onHTTPSessionCreate(IHTTPStreamerSession httpSession) {
		getLogger().info("onHTTPSessionCreate: " + httpSession.getSessionId());
		
	}
	public void onHTTPSessionDestroy(IHTTPStreamerSession httpSession) {
		getLogger().info("onHTTPSessionDestroy: " + httpSession.getSessionId());
	}
	public void onHTTPCupertinoStreamingSessionCreate(
			HTTPStreamerSessionCupertino httpSession) {
		getLogger().info(
				"onHTTPCupertinoStreamingSessionCreate: "
						+ httpSession.getSessionId());
	}
	public void onHTTPCupertinoStreamingSessionDestroy(
			HTTPStreamerSessionCupertino httpSession) {
		getLogger().info(
				"onHTTPCupertinoStreamingSessionDestroy: "
						+ httpSession.getSessionId());
	}
}
  1. Start stream and when HTTP publishing happens, it should call onHTTPSessionCreate function so i can add logic specific to multiplexing.

Based on above steps, I see the logline is printed for getLogger().info("onAppStart: " + fullname); call but not for getLogger().info("onHTTPSessionCreate: " + httpSession.getSessionId());.

I don’t understand why onHTTPSessionCreate and onHTTPCupertinoStreamingSessionCreate methods are not called when application start publishing the stream.

Can anyone help me here ? please correct me if i am doing it wrong or explain if i have not understood it correctly.

This was resolved in a support ticket.

Roger.

Hi Roger,

Thanks for helping out with this.