Interface ILiveStreamTranscoder


  • public interface ILiveStreamTranscoder

    ILiveStreamTranscoder: Interface to live stream transcoder.

    • Method Detail

      • init

        void init​(String streamName,
                  IMediaStream stream,
                  String transcoderName,
                  IApplicationInstance appInstance,
                  com.wowza.wms.stream.livetranscoder.LiveStreamTranscoderItem liveStreamTranscoderItem)
        Called when live stream transcoder interface is initialized.
        Parameters:
        streamName - stream name
        transcoderName - transcoder name
        appInstance - application instance
        liveStreamTranscoderItem - live stream transcoder config item
      • handlePacket

        void handlePacket​(IMediaStream stream,
                          AMFPacket packet)
        Called for each new source packet
        Parameters:
        stream - stream
        packet - packet
      • handleOnMetadata

        void handleOnMetadata​(IMediaStream stream,
                              AMFPacket packet,
                              long timecode,
                              boolean isSetDataFrame)
        Called for each new onMetaData packet
        Parameters:
        stream - stream
        packet - packet
        timecode - timecode (milliseconds)
        isSetDataFrame - is SetDataFrame call
      • resetStream

        void resetStream​(IMediaStream stream)
        Called when source stream changes.
        Parameters:
        stream - stream interface
      • close

        void close​(IMediaStream stream)
        Called when live stream transcoder is stream is closed
        Parameters:
        stream - stream interface
      • shutdown

        void shutdown​(IMediaStream stream)
        Called when live stream transcoder is shutdown
        Parameters:
        stream - stream interface
      • getStreamName

        String getStreamName()
        Get the stream name of the source stream.
        Returns:
        stream name of the source stream
      • setStreamName

        void setStreamName​(String streamName)
        Set source stream name.
        Parameters:
        streamName - source stream name
      • getTranscoderName

        String getTranscoderName()
        Get the live stream transcoder name
        Returns:
        live stream transcoder name
      • setTranscoderName

        void setTranscoderName​(String transcoderName)
        Get the live stream transcoder name
        Parameters:
        transcoderName - live stream transcoder name
      • getAppInstance

        IApplicationInstance getAppInstance()
        Get the application instance associated with this live stream transcoder.
        Returns:
        application instance associated with this live stream transcoder
      • setAppInstance

        void setAppInstance​(IApplicationInstance appInstance)
        Set the application instance associated with this live stream transcoder.
        Parameters:
        appInstance - application instance associated with this live stream transcoder
      • getLiveStreamTranscoderItem

        com.wowza.wms.stream.livetranscoder.LiveStreamTranscoderItem getLiveStreamTranscoderItem()
        Get the definition for live stream transcoder.
        Returns:
        definition for live stream transcoder
      • setLiveStreamTranscoderItem

        void setLiveStreamTranscoderItem​(com.wowza.wms.stream.livetranscoder.LiveStreamTranscoderItem liveStreamTranscoderItem)
        Set the definition for live stream transcoder.
        Parameters:
        liveStreamTranscoderItem - definition for live stream transcoder
      • getProperties

        WMSProperties getProperties()
        Get the user properties
        Returns:
        user properties
      • getLicenseHolder

        com.wowza.wms.client.LicenseHolder getLicenseHolder()
        Get license holder.
        Returns:
        license holder
      • isTranscoderActive

        boolean isTranscoderActive​(long currTime)
        Returns true if the transcoder is actively receiving packets
        Parameters:
        currTime - current timecode in milliseconds
        Returns:
        true if the transcoder is actively receiving packets
      • isTemplateLoaded

        boolean isTemplateLoaded()
        Is the transcoder template loaded.
        Returns:
        true if transcoder template is loaded.
      • getContextStr

        String getContextStr()
        Get the streaming context for this live stream transcoder.
        Returns:
        streaming context for this live stream transcoder
      • getTranscoderType

        int getTranscoderType()
        Get the live stream transcoder type. See ILiveStreamTranscoder.TRANSCODERTYPE_*
        Returns:
        live stream transcoder type
      • setTranscoderType

        void setTranscoderType​(int transcoderType)
        Set the live stream transcoder type. See ILiveStreamTranscoder.TRANSCODERTYPE_*
        Parameters:
        transcoderType - live stream transcoder type
      • getPublishers

        java.util.List<Publisher> getPublishers()
        Get a list of publishers for this transcoder (resultant streams)
        Returns:
        list of publishers for this transcoder
      • getPublisherNames

        java.util.List<String> getPublisherNames()
        Get a list of publisher stream names for this transcoder (resultant streams)
        Returns:
        list of publishers names
      • isEncoder

        boolean isEncoder()
        Is this transcoder an encoder session (capture)
        Returns:
        true if this live transcoder is an encoder session