Results 1 to 2 of 2

Thread: StreamName missing in function onMediaStreamCreate

  1. #1
    Join Date
    Feb 2014
    Posts
    16

    Default StreamName missing in function onMediaStreamCreate

    I have compiled a wowza class, say


    package com.vigileyes.wms.module;
    
    import java.io.BufferedReader;
    import java.io.DataOutputStream;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.net.HttpURLConnection;
    import java.net.URL;
    
    import com.wowza.wms.logging.WMSLoggerFactory;
    import com.wowza.wms.stream.IMediaStream;
    import com.wowza.wms.stream.IMediaStreamNotify;
    import com.wowza.wms.stream.IMediaStreamActionNotify;
    
    public class MyMediaStreamListener implements IMediaStreamNotify, IMediaStreamActionNotify
    {
    
    	@Override
    	public void onMediaStreamCreate(IMediaStream stream)
    	{
    		WMSLoggerFactory.getLogger(null).info("onMediaStreamCreate: " + stream.getName());
    	}
    
    	@Override
    	public void onMediaStreamDestroy(IMediaStream stream)
    	{
    		WMSLoggerFactory.getLogger(null).info("onMediaStreamCreate: " + stream.getName());
    	}
    }

    I am getting the stream name when the stream got destroyed. But it is missing in StreamCreate method.

    Please help me.

  2. #2

    Default

    Hi,

    The problem here is the call to onMediaStreamCreate is too early in the life of the stream to return a value. It would have to be returned after the stream is played or published, for example using the onPlay or onPublish methods IMediaStreamActionNotify.


    Paul

Similar Threads

  1. Replies: 1
    Last Post: 11-23-2011, 09:05 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
  •