summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/gstrtpjitterbuffer.c
AgeCommit message (Collapse)AuthorFilesLines
2009-01-22Unlock the jitterbuffer before pushing out the packet-lost events.Wim Taymans1-5/+8
Move some code before we do the unlock to make the jitterbuffer state consistent while we are unlocked.
2008-11-20gst/rtpmanager/gstrtpjitterbuffer.c: Initialize return value to fix compiler ↵Sebastian Dröge1-1/+1
warning about uninitialized variable. Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_chain_rtcp): Initialize return value to fix compiler warning about uninitialized variable.
2008-11-19gst/rtpmanager/gstrtpjitterbuffer.c: Mark signal arg as static scope.Wim Taymans1-1/+1
Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_class_init): Mark signal arg as static scope.
2008-11-19gst/rtpmanager/gstrtpbin.c: Remove internal sync pad, use signals instead to ↵Wim Taymans1-21/+322
get lip-sync notifications. Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_associate), (gst_rtp_bin_handle_sync), (create_stream), (free_stream), (new_ssrc_pad_found): Remove internal sync pad, use signals instead to get lip-sync notifications. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_base_init), (gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_internal_links), (create_rtcp_sink), (remove_rtcp_sink), (gst_rtp_jitter_buffer_request_new_pad), (gst_rtp_jitter_buffer_release_pad), (gst_rtp_jitter_buffer_sink_rtcp_event), (gst_rtp_jitter_buffer_chain_rtcp), (gst_rtp_jitter_buffer_get_property): * gst/rtpmanager/gstrtpjitterbuffer.h: Make it possible to send SR packets to the jitterbuffer. Check if the SR timestamps are valid by comparing them to the RTP timestamps. Signal the SR packet and the timing information to listeners. * gst/rtpmanager/gstrtpssrcdemux.c: (create_demux_pad_for_ssrc), (gst_rtp_ssrc_demux_rtcp_chain), (gst_rtp_ssrc_demux_src_query): Remove some unused code. * gst/rtpmanager/rtpjitterbuffer.c: (rtp_jitter_buffer_reset_skew), (calculate_skew), (rtp_jitter_buffer_get_sync): * gst/rtpmanager/rtpjitterbuffer.h: Keep track of the last seen RTP timestamp so that we can filter out invalid SR packets.
2008-11-17gst/rtpmanager/gstrtpbin.c: Do not try to keep track of the clock-rate ↵Wim Taymans1-5/+9
ourselves but simply get the value from the ji... Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_associate), (gst_rtp_bin_sync_chain), (create_stream), (new_ssrc_pad_found): Do not try to keep track of the clock-rate ourselves but simply get the value from the jitterbuffer. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_jitter_buffer_sink_parse_caps), (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_get_sync): * gst/rtpmanager/gstrtpjitterbuffer.h: Add some debug info. Pass the clock-rate to the jitterbuffer. Also pass the clock-rate along with the rtp timestamp when getting the sync parameters. * gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain): Fix some debug. * gst/rtpmanager/rtpjitterbuffer.c: (rtp_jitter_buffer_reset_skew), (calculate_skew), (rtp_jitter_buffer_get_sync): * gst/rtpmanager/rtpjitterbuffer.h: Keep track of clock-rate changes and return the clock-rate together with the rtp timestamps used for sync. Don't try to construct timestamps when we have no base_time. * gst/rtpmanager/rtpsource.c: (get_clock_rate): Request a new clock-rate when the payload type changes. Reset the jitter calculation when the clock-rate changes.
2008-11-13gst/rtpmanager/: Small cleanups and some more debug info.Wim Taymans1-6/+7
Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_jitter_buffer_sink_parse_caps), (gst_rtp_jitter_buffer_flush_stop), (gst_rtp_jitter_buffer_chain): * gst/rtpmanager/rtpjitterbuffer.c: (rtp_jitter_buffer_reset_skew), (calculate_skew): Small cleanups and some more debug info.
2008-11-10gst/rtpmanager/gstrtpjitterbuffer.c: Also configure the next expected output ↵Wim Taymans1-5/+5
seqnum when we get a seqnum-base on the ... Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_jitter_buffer_sink_parse_caps), (gst_rtp_jitter_buffer_chain): Also configure the next expected output seqnum when we get a seqnum-base on the caps.
2008-10-16gst/rtpmanager/gstrtpjitterbuffer.c: Fix problem with using the output ↵Wim Taymans1-27/+45
seqnum counter to check for input seqnum disco... Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_jitter_buffer_sink_parse_caps), (gst_rtp_jitter_buffer_flush_start), (gst_rtp_jitter_buffer_flush_stop), (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop): Fix problem with using the output seqnum counter to check for input seqnum discontinuities. Improve gap detection and recovery, reset and flush the jitterbuffer on seqnum restart. Fixes #556520. * gst/rtpmanager/rtpjitterbuffer.c: (rtp_jitter_buffer_insert): Fix wrong G_LIKELY.
2008-10-07gst/rtpmanager/gstrtpjitterbuffer.c: Only update the seqnum-base when it was ↵Wim Taymans1-5/+7
not already configured for the streams. Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_jitter_buffer_sink_parse_caps): Only update the seqnum-base when it was not already configured for the streams.
2008-09-05gst/rtpmanager/gstrtpbin.*: Add signal to notify listeners when a sender ↵Wim Taymans1-28/+52
becomes a receiver. Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (on_sender_timeout), (create_session), (gst_rtp_bin_associate), (gst_rtp_bin_sync_chain), (gst_rtp_bin_class_init), (gst_rtp_bin_request_new_pad): * gst/rtpmanager/gstrtpbin.h: Add signal to notify listeners when a sender becomes a receiver. Tweak lip-sync code, don't store our own copy of the ts-offset of the jitterbuffer, don't adjust sync if the change is less than 4msec. Get the RTP timestamp <-> GStreamer timestamp relation directly from the jitterbuffer instead of our inaccurate version from the source. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop), (gst_rtp_jitter_buffer_get_sync): * gst/rtpmanager/gstrtpjitterbuffer.h: Add G_LIKELY macros, use global defines for max packet reorder and dropouts. Reset the jitterbuffer clock skew detection when packets seqnums are changed unexpectedly. * gst/rtpmanager/gstrtpsession.c: (on_sender_timeout), (gst_rtp_session_class_init), (gst_rtp_session_init): * gst/rtpmanager/gstrtpsession.h: Add sender timeout signal. * gst/rtpmanager/rtpjitterbuffer.c: (rtp_jitter_buffer_reset_skew), (calculate_skew), (rtp_jitter_buffer_insert), (rtp_jitter_buffer_get_sync): * gst/rtpmanager/rtpjitterbuffer.h: Add some G_LIKELY macros. Keep track of the extended RTP timestamp so that we can report the RTP timestamp <-> GStreamer timestamp relation for lip-sync. Remove server timestamp gap detection code, the server can sometimes make a huge gap in timestamps (talk spurts,...) see #549774. Detect timetamp weirdness instead by observing the sender/receiver timestamp relation and resync if it changes more than 1 second. Add method to report about the current rtp <-> gst timestamp relation which is needed for lip-sync. * gst/rtpmanager/rtpsession.c: (rtp_session_class_init), (on_sender_timeout), (check_collision), (rtp_session_process_sr), (session_cleanup): * gst/rtpmanager/rtpsession.h: Add sender timeout signal. Remove inaccurate rtp <-> gst timestamp relation code, the jitterbuffer can now do an accurate reporting about this. * gst/rtpmanager/rtpsource.c: (rtp_source_init), (rtp_source_update_caps), (calculate_jitter), (rtp_source_process_rtp): * gst/rtpmanager/rtpsource.h: Remove inaccurate rtp <-> gst timestamp relation code. * gst/rtpmanager/rtpstats.h: Define global max-reorder and max-dropout constants for use in various subsystems.
2008-08-05gst/rtpmanager/gstrtpjitterbuffer.c: Make the buffer metadata writable ↵Olivier Crete1-2/+6
before inserting it in the jitterbuffer becaus... Original commit message from CVS: Based on patch by: Olivier Crete <tester at tester dot ca> * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop): Make the buffer metadata writable before inserting it in the jitterbuffer because the jitterbuffer will modify the timestamps. * gst/rtpmanager/rtpjitterbuffer.c: Update method comment about requiring writable metadata on buffers. * gst/rtpmanager/rtpsession.c: (rtp_session_process_sr), (rtp_session_process_rtcp): Make the RTCP buffer metadata writable because we want to modify the metadata. Fixes #546312.
2008-08-05gst/rtpmanager/gstrtpjitterbuffer.c: Fix debug by logging the right seqnum.Håvard Graff1-2/+3
Original commit message from CVS: Patch by: Håvard Graff <havard dot graff at tandberg dot com> * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_chain): Fix debug by logging the right seqnum.
2008-07-03gst/rtpmanager/: Corrected a typo (interpollate -> interpolate).Peter Kjellerstedt1-1/+1
Original commit message from CVS: * ChangeLog: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_loop): * gst/rtpmanager/rtpsource.c: (rtp_source_get_new_sr): Corrected a typo (interpollate -> interpolate).
2008-06-16Final round of doc updates.Stefan Kost1-1/+2
Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: * gst/speed/gstspeed.c: * gst/speexresample/gstspeexresample.c: * gst/videosignal/gstvideoanalyse.c: * gst/videosignal/gstvideodetect.c: * gst/videosignal/gstvideomark.c: * sys/dvb/gstdvbsrc.c: * sys/oss4/oss4-mixer.c: * sys/oss4/oss4-sink.c: * sys/oss4/oss4-source.c: * sys/wininet/gstwininetsrc.c: Final round of doc updates.
2008-06-16gst/: More doc updates. More xrefs.Stefan Kost1-19/+13
Original commit message from CVS: * gst/deinterlace/gstdeinterlace.c: * gst/rtpmanager/gstrtpbin.c: * gst/rtpmanager/gstrtpclient.c: * gst/rtpmanager/gstrtpjitterbuffer.c: * gst/rtpmanager/gstrtpptdemux.c: * gst/rtpmanager/gstrtpsession.c: * gst/rtpmanager/gstrtpssrcdemux.c: * gst/sdp/gstsdpdemux.c: More doc updates. More xrefs.
2008-06-12Do not use short_description in section docs for elements. We extract them ↵Stefan Kost1-2/+0
from element details and there will be war... Original commit message from CVS: * ext/dc1394/gstdc1394.c: * ext/ivorbis/vorbisdec.c: * ext/jack/gstjackaudiosink.c: * ext/metadata/gstmetadatademux.c: * ext/mythtv/gstmythtvsrc.c: * ext/theora/theoradec.c: * gst-libs/gst/app/gstappsink.c: * gst/bayer/gstbayer2rgb.c: * gst/deinterlace/gstdeinterlace.c: * gst/rawparse/gstaudioparse.c: * gst/rawparse/gstvideoparse.c: * gst/rtpmanager/gstrtpbin.c: * gst/rtpmanager/gstrtpclient.c: * gst/rtpmanager/gstrtpjitterbuffer.c: * gst/rtpmanager/gstrtpptdemux.c: * gst/rtpmanager/gstrtpsession.c: * gst/rtpmanager/gstrtpssrcdemux.c: * gst/selector/gstinputselector.c: * gst/selector/gstoutputselector.c: * gst/videosignal/gstvideoanalyse.c: * gst/videosignal/gstvideodetect.c: * gst/videosignal/gstvideomark.c: * sys/oss4/oss4-mixer.c: * sys/oss4/oss4-sink.c: * sys/oss4/oss4-source.c: Do not use short_description in section docs for elements. We extract them from element details and there will be warnings if they differ. Also fixing up the ChangeLog order.
2008-05-26gst/rtpmanager/gstrtpjitterbuffer.c: When checking the seqnum, reset the ↵Wim Taymans1-7/+27
jitterbuffer if the gap is too big, we need ... Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop): When checking the seqnum, reset the jitterbuffer if the gap is too big, we need to do this so that we can better handle a restarted source. Fix some comments. * gst/rtpmanager/rtpjitterbuffer.c: (calculate_skew), (rtp_jitter_buffer_insert): Tweak the skew resync diff. Use our working seqnum compare function in -base. Rework the jitterbuffer insert code to make it clearer and more performant by only retrieving the seqnum of the input buffer once and by adding some G_LIKELY compiler hints. Improve debugging for duplicate packets. * gst/rtpmanager/rtpsource.c: (rtp_source_process_rtp): Fix a comment, we don't do skew correction here..
2008-05-14gst/rtpmanager/gstrtpjitterbuffer.c: Simply drop bad RTP packets with a ↵Wim Taymans1-4/+4
warning instead of just posting an error and ... Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_chain): Simply drop bad RTP packets with a warning instead of just posting an error and stopping. This is a perfectly recoverable event and we don't force people to use an rtpbin to filter out bad packets first.
2008-05-12gst/rtpmanager/gstrtpjitterbuffer.c: Avoid waiting for a negative (huge) ↵Wim Taymans1-2/+8
duration when the last packet has a lower ti... Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_loop): Avoid waiting for a negative (huge) duration when the last packet has a lower timestamp than the current packet.
2008-05-12gst/rtpmanager/gstrtpjitterbuffer.c: Initialise with GST_CLOCK_TIME_NONE to ↵Jan Schmidt1-1/+1
avoid compiler warning. Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_loop): Initialise with GST_CLOCK_TIME_NONE to avoid compiler warning.
2008-04-25gst/rtpmanager/gstrtpjitterbuffer.c: Disable sending out rtp packet lost ↵Wim Taymans1-14/+52
events by default and make a property to ena... Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init), (gst_rtp_jitter_buffer_loop), (gst_rtp_jitter_buffer_set_property), (gst_rtp_jitter_buffer_get_property): Disable sending out rtp packet lost events by default and make a property to enabe it. We will likely enable it by default when the base depayloaders have a default handler for them so that we don't send these events all through the pipeline for now.
2008-04-25gst/rtpmanager/gstrtpjitterbuffer.c: Remove private version of a function ↵Wim Taymans1-37/+109
that is in -base now. Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_init), (gst_rtp_jitter_buffer_flush_stop), (gst_rtp_jitter_buffer_src_event), (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop): Remove private version of a function that is in -base now. Add src event handler. Rework the jitterbuffer pushing loop so that it can quickly react to lost packets and instruct the depayloader of them. This can then be used to implement error concealment data.
2008-04-21gst/rtpmanager/gstrtpbin.c: Ref caps when inserting into the cache.Olivier Crete1-0/+5
Original commit message from CVS: Patch by: Olivier Crete <tester at tester dot ca> * gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map), (new_ssrc_pad_found): Ref caps when inserting into the cache. Don't leak pads. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_get_clock_rate), (gst_rtp_jitter_buffer_query): Avoid a caps leak. Don't leak refcount in query. * gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_get_caps), (gst_rtp_pt_demux_chain): Avoid caps leaks. * gst/rtpmanager/gstrtpsession.c: (source_get_sdes_structure), (gst_rtp_session_init), (return_true), (gst_rtp_session_clear_pt_map), (gst_rtp_session_cache_caps), (gst_rtp_session_clock_rate): Ref caps when inserting into the cache. Fix some more caps leaks. Fixes #528245.
2008-04-17gst/rtpmanager/: Unset GValues after g_signal_emitv so that we avoid a ↵Wim Taymans1-1/+4
refcount leak. Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (get_pt_map), (free_client), (gst_rtp_bin_associate), (gst_rtp_bin_get_free_pad_name): * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_get_clock_rate): * gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_get_caps): * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_clock_rate): Unset GValues after g_signal_emitv so that we avoid a refcount leak. Don't leak a padname. Don't leak client streams list. Lock rtpbin when associating streams. Fixes #528245.
2008-01-29gst/rtpmanager/gstrtpjitterbuffer.c: Try to get the new clock-rate from the ↵Thijs Vermeir1-0/+7
buffer caps when we receive a new payload... Original commit message from CVS: Patch by: Thijs Vermeir <thijsvermeir at gmail dot com> * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_chain): Try to get the new clock-rate from the buffer caps when we receive a new payload type instead of always firing the signal. Fixes #512774.
2008-01-25gst/rtpmanager/: Remove the fixed clock-rate from the jitterbuffer and ↵Olivier Crete1-5/+2
extend it so that a clock-rate can be provided... Original commit message from CVS: Patch by: Olivier Crete <tester@tester.ca> * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_jitter_buffer_sink_parse_caps), (gst_rtp_jitter_buffer_chain): * gst/rtpmanager/rtpjitterbuffer.c: (calculate_skew), (rtp_jitter_buffer_insert): * gst/rtpmanager/rtpjitterbuffer.h: Remove the fixed clock-rate from the jitterbuffer and extend it so that a clock-rate can be provided with each buffer instead. Fixes #511686.
2008-01-25gst/rtpmanager/gstrtpjitterbuffer.c: Remove old unused variable.Olivier Crete1-6/+9
Original commit message from CVS: Patch by: Olivier Crete <tester@tester.ca> * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_init), (gst_rtp_jitter_buffer_change_state), (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop): Remove old unused variable. Track pt on input buffers and get the clock-rate when it changes. Ignore packets with unknown clock-rate. See #511686.
2008-01-04gst/rtpmanager/gstrtpjitterbuffer.c: Don't unref the popped buffer when we ↵Wim Taymans1-3/+1
don't have ownership. Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_loop): Don't unref the popped buffer when we don't have ownership. Fixes #507020.
2007-11-22gst/rtpmanager/gstrtpjitterbuffer.c: jitterbuffer can buffer an unlimited ↵Wim Taymans1-4/+2
amount of time and thus has no max_latency ... Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_query): jitterbuffer can buffer an unlimited amount of time and thus has no max_latency requirements.
2007-10-05gst/rtpmanager/gstrtpjitterbuffer.c: Only peek at the tail element instead ↵Wim Taymans1-22/+25
of popping it off, which allows us to grea... Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop): Only peek at the tail element instead of popping it off, which allows us to greatly simplify things when the tail element changes. * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_event_recv_rtp_sink): * gst/rtpmanager/gstrtpssrcdemux.c: (gst_rtp_ssrc_demux_sink_event): Forward FLUSH events instead of leaking them. * gst/rtpmanager/rtpjitterbuffer.c: (rtp_jitter_buffer_reset_skew), (calculate_skew), (rtp_jitter_buffer_insert): * gst/rtpmanager/rtpjitterbuffer.h: Remove the tail-changed callback in favour of a simple boolean when we insert a buffer in the queue. Add method to peek the tail of the buffer.
2007-10-02gst/rtpmanager/gstrtpjitterbuffer.c: Remove some old unused variables.Wim Taymans1-13/+13
Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_flush_start), (gst_rtp_jitter_buffer_flush_stop), (gst_rtp_jitter_buffer_change_state), (apply_offset), (gst_rtp_jitter_buffer_loop): Remove some old unused variables. Don't add the latency to the skew corrected timestamp, latency is only used to sync against the clock. Improve debugging. * gst/rtpmanager/rtpjitterbuffer.c: (rtp_jitter_buffer_init), (rtp_jitter_buffer_reset_skew), (calculate_skew): * gst/rtpmanager/rtpjitterbuffer.h: Handle case where server timestamp goes backwards or wildly jumps by temporarily pausing the skew correction. Improve debugging.
2007-09-28gst/rtpmanager/gstrtpjitterbuffer.c: Remove jitter correction code, it's now ↵Wim Taymans1-66/+42
in the lower level object. Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (apply_latency), (gst_rtp_jitter_buffer_loop), (gst_rtp_jitter_buffer_query): Remove jitter correction code, it's now in the lower level object. Use new -core method for doing a peer query. * gst/rtpmanager/rtpjitterbuffer.c: (rtp_jitter_buffer_init), (calculate_skew), (rtp_jitter_buffer_insert): * gst/rtpmanager/rtpjitterbuffer.h: Move jitter correction to the lowlevel jitterbuffer. Increase the max window size. When filling the window, already start estimating the skew using a parabolic weighting factor so that we have a much better startup behaviour that gets more accurate with the more samples we have. Increase the default weighting factor for the steady state to get smoother timestamps.
2007-09-17gst/rtpmanager/gstrtpbin.c: Link to the right pads regardless of which one ↵Wim Taymans1-3/+3
was created first in the ssrc demuxer. Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (new_ssrc_pad_found): Link to the right pads regardless of which one was created first in the ssrc demuxer. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop): * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_process_rtp), (gst_rtp_session_chain_recv_rtp), (gst_rtp_session_chain_send_rtp): * gst/rtpmanager/rtpsource.c: (calculate_jitter): Improve debugging. * gst/rtpmanager/gstrtpssrcdemux.c: (create_demux_pad_for_ssrc), (gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_finalize), (gst_rtp_ssrc_demux_sink_event), (gst_rtp_ssrc_demux_rtcp_sink_event), (gst_rtp_ssrc_demux_chain), (gst_rtp_ssrc_demux_rtcp_chain), (gst_rtp_ssrc_demux_internal_links): * gst/rtpmanager/gstrtpssrcdemux.h: Fix race in creating the RTP and RTCP pads when a new SSRC is detected.
2007-09-16gst/rtpmanager/gstrtpbin.c: Use lock to protect variable.Wim Taymans1-75/+78
Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_set_property), (gst_rtp_bin_get_property): Use lock to protect variable. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_class_init), (gst_jitter_buffer_sink_parse_caps), (gst_rtp_jitter_buffer_chain), (convert_rtptime_to_gsttime), (gst_rtp_jitter_buffer_loop): Reconstruct GST timestamp from RTP timestamps based on measured clock skew and sync offset. * gst/rtpmanager/rtpjitterbuffer.c: (rtp_jitter_buffer_init), (rtp_jitter_buffer_set_tail_changed), (rtp_jitter_buffer_set_clock_rate), (rtp_jitter_buffer_get_clock_rate), (calculate_skew), (rtp_jitter_buffer_insert), (rtp_jitter_buffer_peek): * gst/rtpmanager/rtpjitterbuffer.h: Measure clock skew. Add callback to be notfied when a new packet was inserted at the tail. * gst/rtpmanager/rtpsource.c: (rtp_source_init), (calculate_jitter), (rtp_source_send_rtp): * gst/rtpmanager/rtpsource.h: Remove clock skew detection, it's move to the jitterbuffer now.
2007-09-15gst/rtpmanager/gstrtpbin.c: Also set NTP base time on new sessions.Wim Taymans1-5/+8
Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (create_session): Also set NTP base time on new sessions. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_loop), (gst_rtp_jitter_buffer_query), (gst_rtp_jitter_buffer_set_property), (gst_rtp_jitter_buffer_get_property): Use the right lock to protect our variables. Fix some comment. * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_getcaps_send_rtp), (gst_rtp_session_chain_send_rtp), (create_send_rtp_sink): Implement getcaps on the sender sinkpad so that payloaders can negotiate the right SSRC.
2007-09-12gst/rtpmanager/: Various leak fixes.Wim Taymans1-8/+9
Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (create_session), (free_session), (get_client), (free_client), (gst_rtp_bin_associate), (free_stream), (gst_rtp_bin_class_init), (gst_rtp_bin_dispose), (gst_rtp_bin_finalize): * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_finalize): * gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_release): * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_finalize), (gst_rtp_session_set_property), (gst_rtp_session_chain_recv_rtp), (gst_rtp_session_chain_send_rtp): * gst/rtpmanager/gstrtpssrcdemux.c: (gst_rtp_ssrc_demux_class_init), (gst_rtp_ssrc_demux_dispose): * gst/rtpmanager/rtpsession.c: (rtp_session_finalize): * gst/rtpmanager/rtpsession.h: Various leak fixes.
2007-09-12gst/rtpmanager/gstrtpbin.c: Calculate and configure the NTP base time so ↵Wim Taymans1-1/+1
that we can generate better Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (calc_ntp_ns_base), (gst_rtp_bin_change_state), (new_payload_found), (create_send_rtp): Calculate and configure the NTP base time so that we can generate better NTP times in SR packets. Set caps on new ghostpad. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_loop): Clean debug statement. * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init), (gst_rtp_session_init), (gst_rtp_session_set_property), (gst_rtp_session_get_property), (get_current_ntp_ns_time), (rtcp_thread), (gst_rtp_session_event_recv_rtp_sink), (gst_rtp_session_internal_links), (gst_rtp_session_chain_recv_rtp), (gst_rtp_session_event_send_rtp_sink), (gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink), (create_send_rtp_sink): * gst/rtpmanager/gstrtpsession.h: Add ntp-ns-base property to convert running_time to NTP time. Handle NEWSEGMENT events on send and recv RTP pads so that we can calculate the running time and thus NTP time of the packets. Simplify getting the current NTP time using the pipeline clock. Implement internal links functions. Use the buffer timestamp to calculate the NTP time instead of the clock. * gst/rtpmanager/gstrtpssrcdemux.c: (create_demux_pad_for_ssrc), (gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_sink_event), (gst_rtp_ssrc_demux_chain), (gst_rtp_ssrc_demux_rtcp_chain), (gst_rtp_ssrc_demux_internal_links), (gst_rtp_ssrc_demux_src_query): * gst/rtpmanager/gstrtpssrcdemux.h: Implement internal links function. Calculate the diff between different streams, this might be used later to get the inter stream latency. * gst/rtpmanager/rtpsession.c: (rtp_session_send_rtp): Simple cleanup. * gst/rtpmanager/rtpsource.c: (rtp_source_init), (calculate_jitter), (rtp_source_send_rtp), (rtp_source_get_new_sr): Make the clock skew window a little bigger. Apply the clock skew to all buffers, not just one with a new timestamp. Calculate and debug sender clock drift. Use extended last timestamp to interpollate for SR reports.
2007-09-03gst/rtpmanager/: Updated example pipelines in docs.Wim Taymans1-25/+96
Original commit message from CVS: * gst/rtpmanager/gstrtpbin-marshal.list: * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_get_client), (gst_rtp_bin_associate), (gst_rtp_bin_sync_chain), (create_stream), (gst_rtp_bin_init), (caps_changed), (new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp), (create_send_rtp): * gst/rtpmanager/gstrtpbin.h: Updated example pipelines in docs. Handle sync_rtcp buffers from the SSRC demuxer to perform lip-sync. Set the default latency correctly. Add some more points where we can get caps. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_class_init), (gst_jitter_buffer_sink_parse_caps), (gst_rtp_jitter_buffer_loop), (gst_rtp_jitter_buffer_query), (gst_rtp_jitter_buffer_set_property), (gst_rtp_jitter_buffer_get_property): Add ts-offset property to control timestamping. * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init), (gst_rtp_session_init), (gst_rtp_session_set_property), (gst_rtp_session_get_property), (get_current_ntp_ns_time), (rtcp_thread), (stop_rtcp_thread), (gst_rtp_session_change_state), (gst_rtp_session_send_rtcp), (gst_rtp_session_sync_rtcp), (gst_rtp_session_cache_caps), (gst_rtp_session_clock_rate), (gst_rtp_session_sink_setcaps), (gst_rtp_session_chain_recv_rtp), (gst_rtp_session_event_send_rtp_sink), (gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink), (create_recv_rtcp_sink), (create_send_rtp_sink), (create_send_rtcp_src): Various cleanups. Feed rtpsession manager with NTP time based on pipeline clock when handling RTP packets and RTCP timeouts. Perform all RTCP with the system clock. Set caps on RTCP outgoing buffers. * gst/rtpmanager/gstrtpssrcdemux.c: (find_demux_pad_for_ssrc), (create_demux_pad_for_ssrc), (gst_rtp_ssrc_demux_base_init), (gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_sink_event), (gst_rtp_ssrc_demux_rtcp_sink_event), (gst_rtp_ssrc_demux_chain), (gst_rtp_ssrc_demux_rtcp_chain): * gst/rtpmanager/gstrtpssrcdemux.h: Also demux RTCP messages. * gst/rtpmanager/rtpsession.c: (rtp_session_set_callbacks), (update_arrival_stats), (rtp_session_process_rtp), (rtp_session_process_rb), (rtp_session_process_sr), (rtp_session_process_rr), (rtp_session_process_rtcp), (rtp_session_send_rtp), (rtp_session_send_bye), (session_start_rtcp), (session_report_blocks), (session_cleanup), (rtp_session_on_timeout): * gst/rtpmanager/rtpsession.h: Remove the get_time callback, the GStreamer part will feed us with enough timing information. Split sync timing and RTCP timing information. Factor out common RB handling for SR and RR. Send out SR RTCP packets for lip-sync. Move SR and RR packet info generation to the source. * gst/rtpmanager/rtpsource.c: (rtp_source_init), (rtp_source_update_caps), (get_clock_rate), (calculate_jitter), (rtp_source_process_rtp), (rtp_source_send_rtp), (rtp_source_process_sr), (rtp_source_process_rb), (rtp_source_get_new_sr), (rtp_source_get_new_rb), (rtp_source_get_last_sr): * gst/rtpmanager/rtpsource.h: * gst/rtpmanager/rtpstats.h: Use caps on incomming buffers to get timing information when they are there. Calculate clock scew of the receiver compared to the sender and adjust the rtp timestamps. Calculate the round trip in sources. Do SR and RR calculations in the source.
2007-08-31gst/rtpmanager/gstrtpjitterbuffer.c: Use extended timestamp to release ↵Wim Taymans1-13/+23
buffers from the jitterbuffer so that we can h... Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_flush_stop), (gst_rtp_jitter_buffer_change_state), (gst_rtp_jitter_buffer_loop): Use extended timestamp to release buffers from the jitterbuffer so that we can handle the rtp wraparound correctly.
2007-08-29gst/rtpmanager/gstrtpjitterbuffer.c: Improve Comments.Wim Taymans1-3/+3
Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_loop): Improve Comments. * gst/rtpmanager/gstrtpsession.c: (stop_rtcp_thread), (gst_rtp_session_change_state), (gst_rtp_session_parse_caps), (gst_rtp_session_clock_rate), (gst_rtp_session_sink_setcaps), (gst_rtp_session_event_send_rtp_sink), (create_recv_rtp_sink), (create_send_rtp_sink): Also parse the sink caps for clock-rate instead of only relying on the result of the signal. * gst/rtpmanager/rtpsource.c: (rtp_source_send_rtp): Make sure we fetch the clock rate for payloads we are sending out so that we can use it for SR reports.
2007-08-27gst/rtpmanager/gstrtpjitterbuffer.c: When synchronizing buffers, take peer ↵Wim Taymans1-1/+14
latency into account. Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_change_state), (gst_rtp_jitter_buffer_loop), (gst_rtp_jitter_buffer_query): When synchronizing buffers, take peer latency into account. Don't try to add our latency to invalid peer max latency values.
2007-08-23Rename all GstRTPFoo structs to GstRtpFoo so that GST_BOILERPLATE registers ↵Tim-Philipp Müller1-43/+43
a GType that's different than the GstRTPF... Original commit message from CVS: * docs/plugins/gst-plugins-bad-plugins-sections.txt: * docs/plugins/gst-plugins-bad-plugins.hierarchy: * docs/plugins/gst-plugins-bad-plugins.interfaces: * docs/plugins/gst-plugins-bad-plugins.signals: * gst/rtpmanager/gstrtpbin.c: * gst/rtpmanager/gstrtpbin.h: * gst/rtpmanager/gstrtpclient.c: * gst/rtpmanager/gstrtpclient.h: * gst/rtpmanager/gstrtpjitterbuffer.c: * gst/rtpmanager/gstrtpjitterbuffer.h: * gst/rtpmanager/gstrtpptdemux.c: * gst/rtpmanager/gstrtpptdemux.h: * gst/rtpmanager/gstrtpsession.c: * gst/rtpmanager/gstrtpsession.h: * gst/rtpmanager/gstrtpssrcdemux.c: * gst/rtpmanager/gstrtpssrcdemux.h: Rename all GstRTPFoo structs to GstRtpFoo so that GST_BOILERPLATE registers a GType that's different than the GstRTPFoo types that farsight registers (luckily GType names are case sensitive). Should finally fix #430664.
2007-08-21gst/rtpmanager/gstrtpjitterbuffer.c: When drop-on-latency is set but we have ↵Wim Taymans1-4/+6
no latency configured, just push the buf... Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_set_property): When drop-on-latency is set but we have no latency configured, just push the buffer as fast as possible. Fix typo in comment.
2007-08-16gst/rtpmanager/gstrtpjitterbuffer.c: Fix EOS handling.Wim Taymans1-12/+21
Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_sink_event), (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop): Fix EOS handling. Convert some DEBUG into WARNINGs. Pause task when flushing. * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init), (rtcp_thread), (gst_rtp_session_event_recv_rtcp_sink): Use system clock for RTCP session management timeouts. * gst/rtpmanager/rtpsession.c: (on_new_ssrc), (on_ssrc_collision), (on_ssrc_validated), (on_bye_ssrc), (on_bye_timeout), (on_timeout): Release the session lock when emiting signals.
2007-08-10gst/rtpmanager/: Remove complicated async queue and replace with more simple ↵Wim Taymans1-137/+116
jitterbuffer code while also fixing some... Original commit message from CVS: * gst/rtpmanager/Makefile.am: * gst/rtpmanager/async_jitter_queue.c: * gst/rtpmanager/async_jitter_queue.h: * gst/rtpmanager/rtpjitterbuffer.c: (rtp_jitter_buffer_class_init), (rtp_jitter_buffer_init), (rtp_jitter_buffer_finalize), (rtp_jitter_buffer_new), (compare_seqnum), (rtp_jitter_buffer_insert), (rtp_jitter_buffer_pop), (rtp_jitter_buffer_flush), (rtp_jitter_buffer_num_packets), (rtp_jitter_buffer_get_ts_diff): * gst/rtpmanager/rtpjitterbuffer.h: Remove complicated async queue and replace with more simple jitterbuffer code while also fixing some bugs. * gst/rtpmanager/gstrtpbin-marshal.list: * gst/rtpmanager/gstrtpbin.c: (on_new_ssrc), (on_ssrc_collision), (on_ssrc_validated), (on_bye_ssrc), (on_bye_timeout), (on_timeout), (create_session), (gst_rtp_bin_class_init), (create_recv_rtp), (create_send_rtp): * gst/rtpmanager/gstrtpbin.h: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_init), (gst_rtp_jitter_buffer_dispose), (gst_jitter_buffer_sink_parse_caps), (gst_rtp_jitter_buffer_flush_start), (gst_rtp_jitter_buffer_flush_stop), (gst_rtp_jitter_buffer_change_state), (gst_rtp_jitter_buffer_sink_event), (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop), (gst_rtp_jitter_buffer_set_property): * gst/rtpmanager/gstrtpsession.c: (on_new_ssrc), (on_ssrc_collision), (on_ssrc_validated), (on_bye_ssrc), (on_bye_timeout), (on_timeout), (gst_rtp_session_class_init), (gst_rtp_session_init): * gst/rtpmanager/gstrtpsession.h: * gst/rtpmanager/rtpsession.c: (on_bye_ssrc), (session_cleanup): Use new jitterbuffer code. Expose some new signals in preparation for handling EOS.
2007-07-18Add stdlib include (free, atoi, exit).Stefan Kost1-0/+1
Original commit message from CVS: * examples/app/appsrc_ex.c: * examples/switch/switcher.c: * ext/neon/gstneonhttpsrc.c: * ext/timidity/gstwildmidi.c: * ext/x264/gstx264enc.c: * gst/mve/mveaudioenc.c: (mve_compress_audio): * gst/rtpmanager/gstrtpclient.c: * gst/rtpmanager/gstrtpjitterbuffer.c: * gst/spectrum/demo-audiotest.c: * gst/spectrum/demo-osssrc.c: * sys/dvb/gstdvbsrc.c: Add stdlib include (free, atoi, exit).
2007-06-22gst/: Build fixes for gcc-2.9x (no mid-block variable declarations etc.).Jens Granseuer1-1/+2
Original commit message from CVS: Patch by: Jens Granseuer <jensgr at gmx net> * gst/equalizer/gstiirequalizer.c: * gst/equalizer/gstiirequalizer10bands.c: * gst/equalizer/gstiirequalizer3bands.c: * gst/equalizer/gstiirequalizernbands.c: * gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_push_sorted): * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_chain): * gst/switch/gstswitch.c: (gst_switch_chain): Build fixes for gcc-2.9x (no mid-block variable declarations etc.). Fixes #450185.
2007-05-28Rename elements to avoid conflict with farsight elements with the same name. ↵Wim Taymans1-5/+5
Fixes #430664. Original commit message from CVS: * docs/plugins/gst-plugins-bad-plugins-docs.sgml: * docs/plugins/gst-plugins-bad-plugins-sections.txt: * gst/rtpmanager/gstrtpbin.c: (create_session), (create_stream), (gst_rtp_bin_class_init), (create_recv_rtp), (create_recv_rtcp), (create_send_rtp), (create_rtcp), (gst_rtp_bin_request_new_pad): * gst/rtpmanager/gstrtpclient.c: (create_stream), (gst_rtp_client_request_new_pad): * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_clear_pt_map), (gst_rtp_jitter_buffer_loop): * gst/rtpmanager/gstrtpmanager.c: (plugin_init): * gst/rtpmanager/gstrtpptdemux.c: * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init), (gst_rtp_session_request_new_pad): * gst/rtpmanager/gstrtpssrcdemux.c: Rename elements to avoid conflict with farsight elements with the same name. Fixes #430664.
2007-05-23Document stuff.Wim Taymans1-6/+51
Original commit message from CVS: * docs/plugins/Makefile.am: * docs/plugins/gst-plugins-bad-plugins-docs.sgml: * docs/plugins/gst-plugins-bad-plugins-sections.txt: * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_class_init): * gst/rtpmanager/gstrtpbin.h: * gst/rtpmanager/gstrtpclient.c: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_clear_pt_map), (gst_rtp_jitter_buffer_loop): * gst/rtpmanager/gstrtpjitterbuffer.h: * gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_clear_pt_map): * gst/rtpmanager/gstrtpptdemux.h: * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init), (rtcp_thread), (gst_rtp_session_clear_pt_map): * gst/rtpmanager/gstrtpsession.h: * gst/rtpmanager/gstrtpssrcdemux.c: (gst_rtp_ssrc_demux_class_init): Document stuff. Add clear-pt-map action signal where needed.
2007-05-14gst/rtpmanager/async_jitter_queue.c: Fix leak when flushing.Wim Taymans1-3/+10
Original commit message from CVS: * gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_set_flushing_unlocked): Fix leak when flushing. * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_clear_pt_map), (gst_rtp_bin_class_init): * gst/rtpmanager/gstrtpbin.h: Add clear-pt-map signal. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_flush_stop), (gst_rtp_jitter_buffer_sink_event), (gst_rtp_jitter_buffer_loop): Init clock-rate to -1 to mark unknow clock rate. Fix flushing.