Reputation: 224
I've followed the tutorial below step by step, however, the module I've created does not appear to load or execute, as I'm not seeing any log entries relating to the getLogger calls in the Wowza Streaming Engine. More specifically, I have created a new Wowza project containing a new module (see code below). Eclipse has then created a jar file in the lib folder of the install directory. I have added the module to a live application on the streaming server. I have also edited the Application.xml file to include the new module.
To hopefully run the module I've written, I am streaming an mp4 file using ffmpeg (according to documentation here) to the streaming engine (via the live application), which I can see in the test players. My understanding was that this would trigger at least one of the event listeners in the module. However, nothing appears to come up in the logs. The only entries related to the stream that I can see are shown below.
I've been trying to debug what's going wrong for quite a while now, so I'd appreciate any suggestions of what might fix the issue.
https://www.wowza.com/docs/How-to-extend-Wowza-Streaming-Engine-using-Java
public class GCStreamModule 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("onStreamConnect");
}
public void onMediaStreamCreate(IMediaStream stream){
getLogger().info("onMediaStreamCreate: " + stream.getSrc());
}
}
Upvotes: 0
Views: 822
Reputation: 666
You need to:
Here is a sample Modules section in Application.xml to load a sample module from lib/videowhisper.jar :
<Modules>
<Module>
<Name>base</Name>
<Description>Base</Description>
<Class>com.wowza.wms.module.ModuleCore</Class>
</Module>
<Module>
<Name>logging</Name>
<Description>Client Logging</Description>
<Class>com.wowza.wms.module.ModuleClientLogging</Class>
</Module>
<Module>
<Name>flvplayback</Name>
<Description>FLVPlayback</Description>
<Class>com.wowza.wms.module.ModuleFLVPlayback</Class>
</Module>
<Module>
<Name>VideoWhisper</Name>
<Description>VideoWhisper rtmp server side.</Description>
<Class>com.videowhisper.wms.module.VideoWhisper</Class>
</Module>
</Modules>
Upvotes: 0