Results 1 to 4 of 4

Thread: onMediaCasterCreate instance of stream is null

  1. #1

    Default onMediaCasterCreate instance of stream is null

    Hi, we are using Startup Streams Monitor Module

    We have IMediaCasterNotify2 listener.

    But instance of IMediaStream is always null (pMediaCaster.getStream())

    	
    @Override
    public void onMediaCasterCreate(IMediaCaster pMediaCaster) {
    	LOG.info("MediaCasterService.MediaCasterNotifyListener.onMediaCasterCreate stream: [" + pMediaCaster.getStream() + "]");
    
    	final IMediaStream stream = pMediaCaster.getStream();
            // stream is always null
    }
    Thanks, any ideas appreciated

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Hi,

    It is too soon to do this in IMediaCasterNotify2.onMediaCasterCreate(). You have to wait for IMediaCasterNotify2.onSetSourceStream(), which includes the IMediaStream.

    public void onSetSourceStream(IMediaCaster mediaCaster,
    				IMediaStream stream) {
    			
    			getLogger().info("onSetSourceStream");
    			
    		}
    Richard

  3. #3

    Default

    So If I need stream name inside onMediaCasterCreate method

    I figured out I could use:
    final String streamName = pMediaCaster.getMediaCasterId();

    Is it ok or it may cause duplicates?

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    If that meets your requirements, it will work; duplicate IDs should not be a problem

    Richard

Similar Threads

  1. stream.getHTTPStreamerSession().getSessionId() null in custom IRandomAccessReader
    By SaschaA. in forum Server-side Modules and Code Samples Discussion
    Replies: 5
    Last Post: 02-03-2014, 03:48 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
  •