Results 1 to 4 of 4

Thread: Difference between IMediaStream and Stream

  1. #1
    Join Date
    Oct 2011
    Posts
    7

    Default Difference between IMediaStream and Stream

    Hi,
    I have confusion about IMediaStream that create in standard broadcasting and Stream create from Wowza:

    Stream stream = Stream.createInstance(appInstance, streamName);

    I use Stream in Playlist but sometimes I can't stop it.

    After my Stream.stop() Stream is available yet but not exist in list of appInstance.getPublishStreamNames().

    Which measure I must use? How object Stream livecycle in Wowza?

    thanks
    Carlo

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

    Default

    Carlo,

    Try stream.close() to stop an Stream class stream.

    Richard

  3. #3

    Default

    Hi Carlo,

    IMediaStream is the interface that is used to interact with all streams on the server. Each of the different stream types on the server implement the IMediaStream interface.

    Stream (com.wowza.wms.stream.publish.Stream) is a server side created live stream that you can then insert other live or vod sources into. Internally, it has it's own IMediaStream object available in stream.getPublisher().getStream();

    If you create a Stream but never add any valid sources to it then using stream.close(); may not close it down properly because the underlying publisher thread would not have started running.

    If you try to create another stream using the same name, it will fail because the stream name is still in use.

    You can use the following method to shut down the stream completely.

    // close the stream and wait for the publisher thread to end and destroy the publisher.
    stream.closeAndWait();
    
    // get a reference to the publisher.  If the thread never started, the publisher will still exist so close the publisher.
    Publisher publisher = stream.getPublisher();
    if(publisher != null)
    {
        publisher.close();
    }
    Roger.

  4. #4
    Join Date
    Oct 2011
    Posts
    7

    Default

    Thanks a lot

    carlo

Similar Threads

  1. Live stream not play at the same with difference device
    By fearless25988 in forum Live Streaming and Encoder Discussion
    Replies: 1
    Last Post: 05-25-2013, 09:43 AM
  2. Can I modify the IMediaStream context stream?
    By catdude in forum Server-side Modules and Code Samples Discussion
    Replies: 0
    Last Post: 06-27-2012, 09:31 AM
  3. Stream vs. IMediaStream
    By piotrb in forum General Forum
    Replies: 1
    Last Post: 05-01-2012, 02:15 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
  •