[gst-devel] How to force the GStreamer drop off the incompletely (damaged) packet left by last stream when it detects a different new RTP/Mpeg4 stream start?

ss vincent w112318 at hotmail.com
Mon May 25 22:38:59 CEST 2009


Hi All, 

I had a Marker bit or SSRC problem with the RTP/Mpeg4 video camera sequence 2 seconds test, the scenario is using the LiveMedia library to send the RTP/MPEG4 stream to Gstreamer pipeline, it works fine with the live stream, but for the camera sequence test, the sender receive the start and stop command from 3rd-party tools to switch the camera every 2 seconds, once the sender receive the stop command, it will cut off the stream immediately, and since LiveMedia library splitter the Mpeg4 frame to 1448 bytes RTP packets, and in the Gstreamer side, the packets from last camera(stream) are still left in the Gstreamer buffer when the sender sends the first I frame packet with different SSRC(next stream), the Gstreamer didn't clear the buffer and screwed up the first I frame. 

The Gstreamer seems flush the buffer only after it get a Marker bit packet,  no matter the stream ID (SSRC) is different or not, to validate this I made some work around in the Sender side to force the last packet to be sent as a Marker bit set packet, and this seems make Gstreamer much happy. 

The Gstreamer must have an option to handle this situation but I have not found it yet. And the weird thing is that I build the same version Gstreamer form source code in different Fedora machine, and they have different behavior to handle this situation. 

Can someone help me to fix this issue in Gstreamer side by force the GStreamer drop off the last incompletely (damaged) packet when it detect a different RTP stream start. 

Thanks very much. 

Vincent 

Gstreamer version: 
        gstreamer: 0.10.18 
        gst-plugins-base: 0.10.18 
        gst-plugins-good: 0.10.7 
        gst-ffmepg: 0.10.3 
Host PC:   
        Fedora 10 i386 
  
Gstreamer Receive command 
        gst-launch udpsrc port=5004 caps="application/x-rtp" ! rtpmp4vdepay ! ffdec_mpeg4 ! ffmpegcolorspace ! ximagesink 

RTP/MPEG4 streamer Sender: 
Use the LiveMedia library to send the stream, the MPEG 4 frames are splattered as 1448 bytes RTP packets, and the video send to the same port by switch camera every 2 seconds. 

_________________________________________________________________
Create a cool, new character for your Windows Live™ Messenger. 
http://go.microsoft.com/?linkid=9656621
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090525/48373092/attachment.htm>


More information about the gstreamer-devel mailing list