Results 1 to 5 of 5

Thread: HTTPRandomAccessReaderDirect init params

  1. #1

    Default HTTPRandomAccessReaderDirect init params

    Hi,

    I'm trying to instantiate the HTTPRandomAccessReaderDirect class upon an RTMP connection to wowza, but there doesn't seem to be a way to create an IMediaStream object when calling:

    public void init(IApplicationInstance appInstance, IMediaStream stream, String basePath, String mediaName, String mediaExtension)
    Is there a way to do so?

    Thanks

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

    Default

    You can create a Stream class stream, which is an IMediaStream instance

    http://www.wowza.com/forums/content....-class-streams

    Richard

  3. #3

    Default

    Quote Originally Posted by rrlanham View Post
    You can create a Stream class stream, which is an IMediaStream instance

    http://www.wowza.com/forums/content....-class-streams

    Richard
    Thanks Richard. That didn't seem to work though. I'm casting stream1 as IMediaStream when calling init. Getting a java.lang.ClassCastException: com.wowza.wms.stream.publish.Stream cannot be cast to com.wowza.wms.stream.IMediaStream: error.

    static public void getStreamLength(IClient client, RequestFunction function, AMFDataList params)
    	{
    		String streamName = params.getString(PARAM1);
    		String appName = client.getApplication().getName();
    		IVHost vhost = client.getAppInstance().getVHost();
    		
    		Stream stream1 = Stream.createInstance(vhost, appName, "Stream1");
    		
    		HTTPRandomAccessReaderDirect randomAccessReader = new HTTPRandomAccessReaderDirect();
    		randomAccessReader.init(client.getAppInstance(), (IMediaStream)stream1, "/content", streamName, "mp3");
    		...
    		...
    	}

  4. #4

    Default

    I found a workaround, so I no longer need to call init. Thanks!

  5. #5
    Join Date
    Sep 2011
    Posts
    1,933

    Default

    Hi
    Thanks for the update.

    Jason

Similar Threads

  1. Library loads; does not init
    By mjoop1 in forum Wowza Transcoder
    Replies: 1
    Last Post: 05-07-2014, 03:29 AM
  2. Start modules on server init
    By sadensmol in forum General Forum
    Replies: 1
    Last Post: 07-10-2013, 12:12 PM

Posting Permissions

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