Interface IHTTPStreamerMPEGDashLivePacketizerDataHandler


  • public interface IHTTPStreamerMPEGDashLivePacketizerDataHandler
    Interface for MPEG-DASH live packetizer data events

    This interface provides access to segment start, end, data packet and media packet events when MPEG-DASH segments are being created.

    Example implementation

     public class Control extends ModuleBase
     {
    
            public void onAppStart(IApplicationInstance appInstance)
            {
                    appInstance.addLiveStreamPacketizerListener(new LiveStreamPacketizer());
            }
    
            class LiveStreamPacketizer implements ILiveStreamPacketizerActionNotify
            {
                    public void onLiveStreamPacketizerCreate(ILiveStreamPacketizer liveStreamPacketizer,
                                                    String streamName) { }
                    public void onLiveStreamPacketizerDestroy(ILiveStreamPacketizer liveStreamPacketizer) { }
                    public void onLiveStreamPacketizerInit(ILiveStreamPacketizer liveStreamPacketizer,
                                                    String streamName)
                    {
                            if ( liveStreamPacketizer instanceof LiveStreamPacketizerMPEGDash )
                            {
                                    LiveStreamPacketizerMPEGDash mpegdashPacketizer = (LiveStreamPacketizerMPEGDash)liveStreamPacketizer;
                                    mpegdashPacketizer.setDataHandler(new MPEGDashLivePacketizerDataHandler());
                            }
                    }
            }
    
            class MPEGDashLivePacketizerDataHandler implements IHTTPStreamerMPEGDashLivePacketizerDataHandler
            {
                    public void onFillSegmentStart(long startTimecode, long endTimecode, InbandEventStreams inbandEventStreams) { }
    
                    public void onFillSegmentEnd(long endTimecodeVideo, long endTimecodeAudio, InbandEventStreams inbandEventStreams) { }
    
                    public void onFillSegmentDataPacket(LiveStreamPacketizerPacketHolder holder, AMFPacket packet, InbandEventStreams inbandEventStreams) { }
    
                    public void onFillSegmentMediaPacket(LiveStreamPacketizerPacketHolder holder, AMFPacket packet) { }
            }
    
     }
     
    • Method Detail

      • onFillSegmentStart

        void onFillSegmentStart​(long startTimecode,
                                long endTimecode,
                                InbandEventStreams inbandEventStreams)
        This is called when a segment is about to be filled with data. At this point there is no data in the segment.
        Parameters:
        startTimecode - the start time of the segment
        endTimecode - the end time of the segment
        inbandEventStreams - the MPEG-Dash inband event streams
      • onFillSegmentEnd

        void onFillSegmentEnd​(long endTimecodeVideo,
                              long endTimecodeAudio,
                              InbandEventStreams inbandEventStreams)
        This is called when a segment has been filled with data.
        Parameters:
        endTimecodeVideo - segment end time of video
        endTimecodeAudio - segment end time of audio
        inbandEventStreams - the MPEG-Dash inband event streams
      • onFillSegmentDataPacket

        void onFillSegmentDataPacket​(com.wowza.wms.httpstreamer.model.LiveStreamPacketizerPacketHolder holder,
                                     AMFPacket packet,
                                     InbandEventStreams inbandEventStreams)
        This is called when a data packet is being processed. This provides access to the packet and InbandEventStreams and the emsgs contained within
        Parameters:
        holder - packet holder
        packet - AMF packet
        inbandEventStreams -
      • onFillSegmentMediaPacket

        void onFillSegmentMediaPacket​(com.wowza.wms.httpstreamer.model.LiveStreamPacketizerPacketHolder holder,
                                      AMFPacket packet)
        This is called when a media packet is being processed. This provides access to the packets being pushed into this segment from the stream.
        Parameters:
        holder - packet holder
        packet - AMF packet