Results 1 to 3 of 3

Thread: onFillChunkDataPacket behavior for RTMP and RTSP publishing

  1. #1
    Join Date
    Jul 2012
    Posts
    5

    Default onFillChunkDataPacket behavior for RTMP and RTSP publishing

    I'm new here, so my question might be a bit off:

    I'm sending ID3 tags to iPad using the following code from live RTMP and RTSP streams:

    import com.wowza.wms.module.*;
    import com.wowza.wms.amf.*;
    import com.wowza.wms.application.*;
    import com.wowza.wms.httpstreamer.cupertinostreaming.livestreampacketizer.*;
    import com.wowza.wms.media.mp3.model.idtags.*;
    import com.wowza.wms.stream.IMediaStream;
    import com.wowza.wms.stream.livepacketizer.*;
    
    public class ModuleCupertinoLiveOnTextToID3 extends ModuleBase
    {
    	class LiveStreamPacketizerDataHandler implements IHTTPStreamerCupertinoLivePacketizerDataHandler
    	{
    		IApplicationInstance appInstance = null;
    		
    		public LiveStreamPacketizerDataHandler(IApplicationInstance appInstance)
    		{
    			this.appInstance = appInstance;
    		}
    
    		public void onFillChunkDataPacket(CupertinoPacketHolder holder, AMFPacket packet, ID3Frames id3Frames)
    		{			
    			while(true)
    			{
    				byte[] buffer = packet.getData();
    				if (buffer == null)
    					break;
    				
    				
    				IMediaStream stream = appInstance.getStreams().getStream("myStream");
    				
    			
    				
    				getLogger().info("ModuleCupertinoVODOnTextToID3.onAppStart["+appInstance.getContextStr()+"] Send string: " + stream.getVideoTC());
    								
    								
    				ID3V2FrameTextInformation comment = new ID3V2FrameTextInformation(ID3V2FrameBase.TAG_TIT1);
    				comment.setValue("" + stream.getVideoTC());
    				id3Frames.putFrame(comment);
    				break;
    			}
    		}
    	}
    	
    	class LiveStreamPacketizerListener implements ILiveStreamPacketizerActionNotify
    	{
    		IApplicationInstance appInstance = null;
    		
    		public LiveStreamPacketizerListener(IApplicationInstance appInstance)
    		{
    			this.appInstance = appInstance;
    		}
    
    		public void onLiveStreamPacketizerCreate(ILiveStreamPacketizer liveStreamPacketizer, String streamName)
    		{
    			getLogger().info("ModuleCupertinoLiveOnTextToID3#MyLiveListener.onLiveStreamPacketizerCreate["+streamName+"]");
    			if (liveStreamPacketizer instanceof LiveStreamPacketizerCupertino)
    			{
    				((LiveStreamPacketizerCupertino)liveStreamPacketizer).setDataHandler(new LiveStreamPacketizerDataHandler(appInstance));
    			}
    		}
    
    		public void onLiveStreamPacketizerDestroy(ILiveStreamPacketizer liveStreamPacketizer)
    		{
    		}
    
    		public void onLiveStreamPacketizerInit(ILiveStreamPacketizer liveStreamPacketizer, String streamName)
    		{
    		}
    	}
    
    	public void onAppStart(IApplicationInstance appInstance)
    	{		
    		appInstance.addLiveStreamPacketizerListener(new LiveStreamPacketizerListener(appInstance));
    
    		getLogger().info("ModuleCupertinoLiveOnTextToID3.onAppStart["+appInstance.getContextStr()+"]");
    	}
    }
    For RTMP publishing the ID3 tags are firing a lot more often than for RTSP. I'm using Wirecast for both.

    Is there any way I can increase the frequency of onFillChunkDataPacket() firing for RTSP publising source?

  2. #2

    Default

    When you're outputting the timecodes, do you see any pattern? Is there a difference in the source stream encoding? What's the eventual goal?

  3. #3
    Join Date
    Jul 2012
    Posts
    5

    Default

    Solved using your post from last year:

    http://www.wowza.com/forums/showthre...5867#post75867

Similar Threads

  1. Override Wowza RTSP connection behavior
    By FBrunido in forum General Forum
    Replies: 3
    Last Post: 12-19-2013, 05:02 PM
  2. Secure RTMP publishing
    By andy_c in forum General Forum
    Replies: 6
    Last Post: 12-17-2013, 04:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •