Interface IMediaStreamPlay


  • public interface IMediaStreamPlay

    IMediaStreamPlay: public interface of mediaStreamPlayer object.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Close mediaStreamPlay
      IMediaStream getParent()
      Get the parent media stream object
      void init​(IMediaStream parent, MediaStreamMap streams)
      Initialize mediaStreamPlayer
      void initLiveStreamRepeating​(String liveStreamPacketizer, String liveStreamRepeater)
      Initialize this stream for live stream repeating
      void interruptPlay()
      Interrupt play to perform operation.
      double length()
      Get stream length/seconds (seconds)
      void pause​(int pauseType, long timecode)
      pause mediaPlayStream
      void pauseRaw​(int pauseType, long timecode)
      pauseRaw mediaPlayStream
      boolean play()
      Return true if there are packets to play
      int play​(java.io.OutputStream out, AMFObj wmsObjAudio, AMFObj wmsObjVideo, AMFObj wmsObjData, long[] sizes)
      Write new packets or play packets
      void reset​(boolean isReset)
      Reset mediaStreamPlayer
      void resetNoLookup()
      Reset but do not lookup current position in live stream
      void seek​(int location)
      seek mediaPlayStream
      void setBufferTime​(int bufferTime)
      Set buffer time
      void setName​(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
      Set mediaPlayStream name, extension, query string, play start, play len, play reset
      void shutdown()
      Shutdown mediaStreamPlayer
      long size()
      Get stream media file size
      void startPlay()
      Start playing stream
      void stopName​(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
      Stop stream name
      void switchName​(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
      Switch to stream name
      void switchPlay()  
      void updateLoggingValues()
      Update internal logging values
    • Field Detail

      • PLAYSTATUSTYPE_SWITCH

        static final int PLAYSTATUSTYPE_SWITCH
        onPlayStatus type: switch
        See Also:
        Constant Field Values
      • PLAYSTATUSTYPE_COMPLETE

        static final int PLAYSTATUSTYPE_COMPLETE
        onPlayStatus type: complete
        See Also:
        Constant Field Values
      • PLAYSTATUSTYPE_STOP

        static final int PLAYSTATUSTYPE_STOP
        onPlayStatus type: stop
        See Also:
        Constant Field Values
      • PLAYSIZES_AUDIO_BYTES

        static final int PLAYSIZES_AUDIO_BYTES
        IMediaReader sizes array: audio byte count
        See Also:
        Constant Field Values
      • PLAYSIZES_AUDIO_COUNT

        static final int PLAYSIZES_AUDIO_COUNT
        IMediaReader sizes array: audio packet count
        See Also:
        Constant Field Values
      • PLAYSIZES_VIDEO_BYTES

        static final int PLAYSIZES_VIDEO_BYTES
        IMediaReader sizes array: video byte count
        See Also:
        Constant Field Values
      • PLAYSIZES_VIDEO_COUNT

        static final int PLAYSIZES_VIDEO_COUNT
        IMediaReader sizes array: video packet count
        See Also:
        Constant Field Values
      • PLAYSIZES_DATA_BYTES

        static final int PLAYSIZES_DATA_BYTES
        IMediaReader sizes array: data byte count
        See Also:
        Constant Field Values
      • PLAYSIZES_DATA_COUNT

        static final int PLAYSIZES_DATA_COUNT
        IMediaReader sizes array: data packet count
        See Also:
        Constant Field Values
      • PLAYSIZES_LOSS_BYTES

        static final int PLAYSIZES_LOSS_BYTES
        IMediaReader sizes array: data byte count
        See Also:
        Constant Field Values
      • PLAYSIZES_LOSS_COUNT

        static final int PLAYSIZES_LOSS_COUNT
        IMediaReader sizes array: data packet count
        See Also:
        Constant Field Values
      • PLAYSIZES_SIZE

        static final int PLAYSIZES_SIZE
        IMediaReader sizes array: size of sizes array long[PLAYSIZES_SIZE]
        See Also:
        Constant Field Values
    • Method Detail

      • init

        void init​(IMediaStream parent,
                  MediaStreamMap streams)
        Initialize mediaStreamPlayer
        Parameters:
        parent - parent mediaStream object
        streams - parent mediaStreamMap
      • shutdown

        void shutdown()
        Shutdown mediaStreamPlayer
      • reset

        void reset​(boolean isReset)
        Reset mediaStreamPlayer
        Parameters:
        isReset - is this a playlist reset or addition, true if reset
      • resetNoLookup

        void resetNoLookup()
        Reset but do not lookup current position in live stream
      • play

        int play​(java.io.OutputStream out,
                 AMFObj wmsObjAudio,
                 AMFObj wmsObjVideo,
                 AMFObj wmsObjData,
                 long[] sizes)
        Write new packets or play packets
        Parameters:
        out - OutputStream
        wmsObjAudio - audio response channel
        wmsObjVideo - video response channel
        wmsObjData - data response channel
        sizes - sizes array. See IMediaStreamPlay.PLAYSIZES_*
        Returns:
        total byte output
      • play

        boolean play()
        Return true if there are packets to play
        Returns:
        true if packets to play
      • seek

        void seek​(int location)
        seek mediaPlayStream
        Parameters:
        location - timecode (milliseconds)
      • pause

        void pause​(int pauseType,
                   long timecode)
        pause mediaPlayStream
        Parameters:
        pauseType - pause type. See IMediaStreamPlay.PAUSE_*
        timecode - timecode (milliseconds)
      • pauseRaw

        void pauseRaw​(int pauseType,
                      long timecode)
        pauseRaw mediaPlayStream
        Parameters:
        pauseType - pause type. See IMediaStreamPlay.PAUSE_*
        timecode - timecode (milliseconds)
      • setBufferTime

        void setBufferTime​(int bufferTime)
        Set buffer time
        Parameters:
        bufferTime -
      • setName

        void setName​(String name,
                     String oldName,
                     String ext,
                     String queryStr,
                     double playStart,
                     double playLen,
                     int playTransition)
        Set mediaPlayStream name, extension, query string, play start, play len, play reset
        Parameters:
        name - stream name
        oldName - old stream name
        ext - extension
        queryStr - query string
        playStart - play start
        playLen - play len
        playTransition - play reset
      • switchName

        void switchName​(String name,
                        String oldName,
                        String ext,
                        String queryStr,
                        double playStart,
                        double playLen,
                        int playTransition)
        Switch to stream name
        Parameters:
        name - stream name
        oldName - old stream name
        ext - stream extension
        queryStr - query string
        playStart - play start
        playLen - play len
        playTransition - play transition (see MediaBase.PLAYTRANSITION_*)
      • stopName

        void stopName​(String name,
                      String oldName,
                      String ext,
                      String queryStr,
                      double playStart,
                      double playLen,
                      int playTransition)
        Stop stream name
        Parameters:
        name - stream name
        oldName - old stream name
        ext - stream extension
        queryStr - query string
        playStart - play start
        playLen - play len
        playTransition - play transition (see MediaBase.PLAYTRANSITION_*)
      • close

        void close()
        Close mediaStreamPlay
      • interruptPlay

        void interruptPlay()
        Interrupt play to perform operation. Usually for seek or pause.
      • startPlay

        void startPlay()
        Start playing stream
      • switchPlay

        void switchPlay()
      • updateLoggingValues

        void updateLoggingValues()
        Update internal logging values
      • length

        double length()
        Get stream length/seconds (seconds)
        Returns:
        length/duration (seconds)
      • size

        long size()
        Get stream media file size
        Returns:
        media file size
      • getParent

        IMediaStream getParent()
        Get the parent media stream object
        Returns:
        parent media stream object
      • initLiveStreamRepeating

        void initLiveStreamRepeating​(String liveStreamPacketizer,
                                     String liveStreamRepeater)
        Initialize this stream for live stream repeating
        Parameters:
        liveStreamPacketizer - live stream packetizer
        liveStreamRepeater - live stream repeater name