Results 1 to 4 of 4

Thread: wowza4.4.1: How to distinguish which stream's ts chunk onFillChunkStart

  1. #1
    Join Date
    Mar 2016
    Posts
    7

    Default wowza4.4.1: How to distinguish which stream's ts chunk onFillChunkStart

    Hi,

    I have been testing based on this article

    And I have noticed that in the

    class LiveStreamPacketizerDataHandler implements IHTTPStreamerCupertinoLivePacketizerDataHandler2
    	{
    		private LiveStreamPacketizerCupertino liveStreamPacketizer = null;
    		private int textId = 1;
    		
    		public LiveStreamPacketizerDataHandler(LiveStreamPacketizerCupertino liveStreamPacketizer)
    		{
    			this.liveStreamPacketizer = liveStreamPacketizer;
    		}
    
    		public void onFillChunkStart(LiveStreamPacketizerCupertinoChunk chunk)
    		{
    			getLogger().info("ModuleCupertinoVODOnTextToID3.onFillChunkStart["+chunk.getRendition().toString()+":"+liveStreamPacketizer.getContextStr()+"]: chunkId:"+chunk.getChunkIndexForPlaylist());
    if you set transcode template(s) for the stream,
    then the LiveStreamPacketizerDataHandler 's onFillChunkStart will be called same number of time as the number of the transcode template that I set for the stream.

    Now my question is that is there a way to distinguish which stream's ts chunk has been processing the handler ?
    I do not see there is any method that I could used from
    LiveStreamPacketizerCupertinoChunk chunk


    Thank you

    Oli

  2. #2
    Join Date
    May 2013
    Posts
    680

    Default

    Hey Oli

    I'm not quite certain what you are looking for here. The stream name or a different specific event handler (if so, what are you looking for it to contain)?

    Thanks,
    Matt

  3. #3
    Join Date
    Mar 2016
    Posts
    7

    Default

    Thank you for your reply Matt,

    My question was how to find out which stream's data packet was being call in fillChunks event handler here.
    Since all the transcoded streams (ABR streams) will be called and I couldn't distinguish that which resolution's data packet was.

    I actually figure out how to distinguish which stream's packet was being called LiveStreamPacketizerDataHandler2 too.


    I could just simply passed streamName in the listener to the handler when LiveStreamPacketizerDataHandler2 gets initialied.

    public class LiveStreamPacketizerListener extends LiveStreamPacketizerActionNotifyBase {
    
      private static final WMSLogger sLogger =
          WMSLoggerFactory.getLogger(LiveStreamPacketizerListener.class);
    
      private IApplicationInstance mApp;
    
      private Map<String, String> mStreamNameMap = new HashMap<String, String>();
    
      public LiveStreamPacketizerListener(IApplicationInstance app) {
        mApp = app;
      }
    
      @Override
      synchronized public void onLiveStreamPacketizerCreate(
          ILiveStreamPacketizer liveStreamPacketizer, String streamName) {
    
        if (liveStreamPacketizer instanceof LiveStreamPacketizerCupertino) {
    
            LiveStreamPacketizerCupertino lspc = (LiveStreamPacketizerCupertino) liveStreamPacketizer;
            lspc.setDataHandler(new LiveStreamPacketizerDataHandler(mApp, streamName));
      }
    }

  4. #4
    Join Date
    Jan 2016
    Posts
    81

    Default

    Great, It looks like that solution should work.

    I could just simply passed streamName in the listener to the handler when LiveStreamPacketizerDataHandler2 gets initialied.
    Thanks for the information.

    Andy_E

Similar Threads

  1. Replies: 1
    Last Post: 03-12-2015, 05:54 AM
  2. Replies: 3
    Last Post: 10-13-2014, 10:06 AM
  3. stream to youtube from wowza2 via cloud wowza4 server
    By alexbyrd in forum Wowza Streaming Engine in the Cloud
    Replies: 1
    Last Post: 06-12-2014, 07:41 AM
  4. DVR Chunk Target Duration / Chunk Limit
    By carlosleite in forum AddOn: Wowza nDVR
    Replies: 1
    Last Post: 10-19-2011, 01:30 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
  •