Interface IHTTPStreamerCupertinoLivePacketizerDataHandler2


  • public interface IHTTPStreamerCupertinoLivePacketizerDataHandler2
    Interface for Cupertino live packetizer data events

    This interface provides access to chunk start, end, data packet and media packet events when Cupertino chunks are being created.

    It supersedes and should be used in preference to IHTTPStreamerCupertinoLivePacketizerDataHandler

    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 LiveStreamPacketizerCupertino )
                            {
                                    LiveStreamPacketizerCupertino cupertinoPacketizer =
                                            (LiveStreamPacketizerCupertino)liveStreamPacketizer;
                                    cupertinoPacketizer.setDataHandler(new CupertinoLivePacketizerDataHandler2());
                            }
                    }
            }
    
            class CupertinoLivePacketizerDataHandler2 implements IHTTPStreamerCupertinoLivePacketizerDataHandler2
            {
                    public void onFillChunkDataPacket( LiveStreamPacketizerCupertinoChunk arg0,
                                            CupertinoPacketHolder arg1, AMFPacket arg2, ID3Frames arg3) { }
    
                    public void onFillChunkEnd(LiveStreamPacketizerCupertinoChunk arg0, long arg1) { }
    
                    public void onFillChunkMediaPacket(LiveStreamPacketizerCupertinoChunk arg0,
                                            CupertinoPacketHolder arg1, AMFPacket arg2) { }
    
                    public void onFillChunkStart(LiveStreamPacketizerCupertinoChunk arg0) { }
            }
    
     }
     
    • Method Detail

      • onFillChunkStart

        void onFillChunkStart​(LiveStreamPacketizerCupertinoChunk chunk)
        This is called when a chunk is about to be filled with data. The chunk could have audio or video or both. At this point there is no data in the chunk.
        Parameters:
        chunk -
      • onFillChunkEnd

        void onFillChunkEnd​(LiveStreamPacketizerCupertinoChunk chunk,
                            long timecode)
        This is called when a chunk has been filled with data. The chunk could have audio or video or both. In addition to the chunk the timecode for the chunk is accessible.
        Parameters:
        chunk -
        timecode -
      • onFillChunkDataPacket

        void onFillChunkDataPacket​(LiveStreamPacketizerCupertinoChunk chunk,
                                   com.wowza.wms.httpstreamer.cupertinostreaming.livestreampacketizer.CupertinoPacketHolder holder,
                                   AMFPacket packet,
                                   ID3Frames id3Frames)
        This is called when a data packet is being processed. This provides access to the packet and ID3 frame object being populated with data
        Parameters:
        chunk -
        holder -
        packet -
        id3Frames -
      • onFillChunkMediaPacket

        void onFillChunkMediaPacket​(LiveStreamPacketizerCupertinoChunk chunk,
                                    com.wowza.wms.httpstreamer.cupertinostreaming.livestreampacketizer.CupertinoPacketHolder holder,
                                    AMFPacket packet)
        This is called when a media packet is being processed. This provides access to the packets being pushed into this chunk from the stream.
        Parameters:
        chunk -
        holder -
        packet -