Results 1 to 4 of 4

Thread: IMediaStreamActionNotify2 or IModuleOnStream doesn't detect stream publishin

  1. #1

    Default IMediaStreamActionNotify2 or IModuleOnStream doesn't detect stream publishin

    Hello everybody,

    I'm trying to detect in my HTTPProviderBase Module when a stream is publish.

    I tried the following implementation :

    1)
    public class VODlist extends HTTProvider2Base implements IModuleOnStream
    with the function

    public void onStreamCreate(IMediaStream stream) {
    		WMSLoggerFactory.getLogger(null).info("DETECT CREATION");
    
    }
    the function is never fired.

    I also tried with the following implementation.

    2)
    public class VODlist extends HTTProvider2Base implements IMediaStreamActionNotify2
    with the functions

    @Override
    	public void onPlay(IMediaStream stream, String streamName,
    			double playStart, double playLen, int playReset) {
    		WMSLoggerFactory.getLogger(null).info("DETECT PLAY");
    		
    	}
    
    	@Override
    	public void onPublish(IMediaStream stream, String streamName,
    			boolean isRecord, boolean isAppend) {
    		WMSLoggerFactory.getLogger(null).info("DETECT PUBLISH");
    		
    	}
    
    	@Override
    	public void onSeek(IMediaStream stream, double location) {
    		// TODO Auto-generated method stub
    		WMSLoggerFactory.getLogger(null).info("DETECT SEEK");
    	}
    
    	@Override
    	public void onStop(IMediaStream stream) {
    		// TODO Auto-generated method stub
    		
    	}
    
    	@Override
    	public void onUnPublish(IMediaStream stream, String streamName,
    			boolean isRecord, boolean isAppend) {
    		// TODO Auto-generated method stub
    		WMSLoggerFactory.getLogger(null).info("DETECT UNPUBLISH");
    		
    	}
    
    	@Override
    	public void onMetaData(IMediaStream arg0, AMFPacket arg1) {
    		// TODO Auto-generated method stub
    		WMSLoggerFactory.getLogger(null).info("DETECT METADATA");
    	}
    
    	@Override
    	public void onPauseRaw(IMediaStream arg0, boolean arg1, double arg2) {
    		// TODO Auto-generated method stub
    		WMSLoggerFactory.getLogger(null).info("DETECT PAUSE");
    	}

    It doesn't work either.

    How can i perform this?

    Best regards

    Richard
    Last edited by ripleyXLR8; 06-22-2014 at 12:31 PM.

  2. #2
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    Hi Richard,

    This won't work because HTTPProviderBase only provides an HTTP interface to Wowza, HTTP request and response. It is not a long running process that you can setup notifiers with. You can use an application Module or ServerListener.

    Richard

  3. #3

    Default

    Quote Originally Posted by rrlanham View Post
    Hi Richard,

    This won't work because HTTPProviderBase only provides an HTTP interface to Wowza, HTTP request and response. It is not a long running process that you can setup notifiers with. You can use an application Module or ServerListener.

    Richard

    Thank you for your answer Richard.

    I tried the following. In the same java file as my HTTPProvider i add the following class :

    class StreamListener extends ModuleBase
    {
    
    	public void onStreamCreate(IMediaStream stream)
    	{
    		getLogger().info("DETECT CREATION");
    	}
    
    	public void onStreamDestroy(IMediaStream stream)
    	{
    		getLogger().info("DETECT DESTRUCTION");
    	}
    
    }
    Then in my HTTPProvider i add:

    private StreamListener test = new StreamListener();
    It doesn't seems to work either. Am i obliged to create a new independant module?

    Best regards

    Richard

  4. #4

    Default

    Ok so it doesn't work with a nested class. You need to provide a full independent module.

Similar Threads

  1. Detect if a stream goes online or offline
    By rubensd in forum Server-side Modules and Code Samples Discussion
    Replies: 14
    Last Post: 05-08-2013, 02:21 PM
  2. Is there a way to detect bad video stream?
    By sergei19 in forum Live Streaming and Encoder Discussion
    Replies: 0
    Last Post: 06-11-2012, 03:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •