Commit graph

246 commits

Author SHA1 Message Date
Wim Taymans 05418f1687 rtpbin: avoid some structure copies
Don't make copied in the getter and setter for SDES in the RTPSource. This
avoids a couple of copies of the SDES structure when generating RTCP
packets.
2009-12-22 22:27:21 +01:00
Pascal Buhler c3448f978e rtpmanager: improve SDES handling
Store SDES internally as a struct to support multiple PRIV values.
Include all values set in SDES struct when sending RTCP SDES.
2009-12-22 21:43:25 +01:00
Wim Taymans 9734699788 rtpbin: add property to remove pads automatically
Add a property called autoremove to automatically remove the pads of sources
that timed out.

Fixes #554839
2009-12-21 15:07:44 +01:00
Wim Taymans c611bbaa8e ssrcdemux: fix comparison
A NULL means no pad was found.
2009-12-21 15:07:34 +01:00
Aurelien Grimaud 07f27f0efd rtpsession: avoid buffer ref/unref pairs for CSRCs
We ref the buffer before pushing it downstream in order to get the CSRCs of it
after pushing. This causes performance problems when downstream elements want to
change the metadata because the buffer needs to be subbuffered.

Instead, read and store the CSRCs of the buffer in an array before pushing it
and process the array after pushing the buffer. This allows us to remove the
ref/unref pair.

Fixes #603376
2009-11-30 15:59:50 +01:00
Wim Taymans 8070ae967b jitterbuffer: avoid using wrong clock-rate
Check for a valid clock-rate before attempting to estimate the npt
stop time.
2009-11-25 10:38:23 -06:00
Wim Taymans 5682e2bf01 rtpbin: fix typo in comments 2009-11-25 10:37:30 -06:00
Stefan Kost 9ee0815e85 docs: more links and better short description
Fix spelling of GstRtpSsrcDemux to get it linked. Add more links. Change
the short description to be more meaningful.
2009-11-20 11:25:49 +02:00
Wim Taymans f52859432f jitterbuffer: release lock before emiting signals
Release the jbuf lock before emiting the request-pt-map signal to avoid
deadlocks. We also need to catch the shutdown case when locking again.

Fixes #593354
2009-11-18 10:50:44 +01:00
Stefan Kost e43eb89449 tests: add a jitterbuffer test
Tests pushing a few buffers in various order and asserting the order sent by the
jitterbuffer. Contains two disabled tests that need more work.
2009-10-22 13:35:57 +03:00
Stefan Kost 6904e46ef2 build: use gst-glib-gen.mak to fix the glib build rules.
The build rules in glib-gen.mak were using pattern rules in a non save way.
2009-10-16 11:53:38 +03:00
Håvard Graff 58b9de4cca rtpptdemux: only forward the lost-event to the last seen pt-number
forward all events on all pads except for the PacketLost event, which we want to
forward to the last seen pt pad.

Fixes #598377
2009-10-14 12:28:55 +02:00
Stefan Kost e0cdd879b4 build: fprintf, sprintf, sscanf need stdio.h 2009-10-07 14:03:20 +03:00
Wim Taymans 0040d01265 rtpbin: use locking around the sessions 2009-10-05 16:07:24 +02:00
Wim Taymans 8fb77403c5 jitterbuffer: cache latency in nanoseconds
Cache the latency in nanoseconds units to avoid having to convert the
milliseconds value to nanoseconds all the time.
2009-10-01 12:52:40 +02:00
Wim Taymans c262735164 jitterbuffer: handle -1 input timestamps
Don't try to check a -1 timestamp against the max delay.
2009-10-01 12:12:09 +02:00
Stefan Kost 0a7ef67ad0 docs: fix gtk-doc warnings 2009-09-10 10:28:48 +03:00
Marc Leeman 6b46aeb6a3 rtpbin: add ignore-pt parameter
Add a parameter 'ignore-pt' that disables creating a gstrtpptdemux module and
ghosts the pads of gstrtpjitterbuffer instead of the ones of gstrtpptdemux.

Fixes #594490
2009-09-08 17:38:32 +02:00
Håvard Graff 2912b21d14 rtpbin: propagate payload-type-change signal from demuxer
fixes #594254
2009-09-08 13:59:56 +02:00
Havard Graff a52309eff7 jitterbuffer: change severity of clock-rate change debug
Make log GST_DEBUG under normal circumstances, GST_WARNING otherwise.

Fixes #594253
2009-09-08 13:44:49 +02:00
Håvard Graff 40549278c3 jitterbuffer: avoid throwing reordered buffers with same timestamps
When we receive a reordered packet with the same timestamp as the previous one
(which can happen for fragmented packets) don't consider the packet as lost but
instead wait for the reordered packet to arrive.

Switch the warning-level, so that a reordering does not get a warning, only
an actual produced lost-packet.

Fixes #594251
2009-09-08 13:39:31 +02:00
Stig Sandnes 8f3299c547 rtpbin: make free_session() remove stream references
When receiving a sync-packet, all sessions with the same cname will be compared
and synced together. In this process, there could still be references to a
session that has been shut down in the meanwhile.

This patch makes sure that these references are removed when shutting down a
session, so that the syncing can be done safely.

Fixes #594283
2009-09-08 13:18:29 +02:00
Havard Graff e08e610db0 rtpbin: use locked state on internal bins
Set the locked state on internal elements to make sure that they don't change
back to another state when shutting down.

Fixes #594248
2009-09-08 12:41:52 +02:00
Laurent Glayal 371875c57a rtpsource: fix memleak
Don't leak the input buffer when the received and expected seqnum are different when
in probation.

fixes #594039
2009-09-03 19:37:10 +02:00
Olivier Crête f542f710cf rtpjitterbuffer: Lock clock_rate variable
The priv->clock_rate variable could become -1 between when its checked to not
be -1 and when its used, causing an assertion. Fixed by taking the mutex
earlier in the chain() function.

Fixes #593955
2009-09-03 19:17:00 +02:00
Wim Taymans 3fcde4486d rtpsource: whitespace fixes 2009-09-03 19:17:00 +02:00
Wim Taymans 3f629f6001 rtpsession: whitespace fixes 2009-09-03 19:16:59 +02:00
Peter Kjellerstedt fdf18653b7 rtpmanager: Fixed a copy & paste error 2009-09-01 15:06:46 +02:00
Peter Kjellerstedt dc4f9575be rtpmanager: Removed unused variable priv
The variable priv was initialized in a lot of functions but then never
used for anything.
2009-09-01 13:21:23 +02:00
Peter Kjellerstedt 57adc2a803 rtpmanager: A little clean up
Make the code flow of gst_rtp_session_send_rtcp() and
gst_rtp_session_sync_rtcp() identical.
2009-09-01 13:04:14 +02:00
Peter Kjellerstedt 923b5b495a rtpmanager: Make sure that used caps are not freed already (take 2)
This reintroduces the fix for bug #593391. It also applies it in
gst_rtp_session_sync_rtcp() which has very similar code to
gst_rtp_session_send_rtcp().
2009-09-01 13:04:14 +02:00
Wim Taymans 8d924611e7 jitterbuffer: make sure time does not go backwards
When we construct a timestamp that would result in a timestamp that is earlier
than when the packet was received, reset the skew calculation as this is
probably a sign that the sender restarted or paused.

Fixes #593354
2009-09-01 12:48:28 +02:00
Peter Kjellerstedt bfb1260af4 rtpmanager: Set caps in gst_rtp_session_send_rtcp() correctly again
The test for when to set an RTCP caps on the output pad in
gst_rtp_session_send_rtcp() accidentally got inverted in the last commit.
2009-09-01 11:32:41 +02:00
Wim Taymans a74c385b7b rtpsession: use proper locking for pads and caps
Use the sesion lock and shotdown variable to protect and ref the pads we are
going to push on.

fixes #561825
2009-08-31 16:38:27 +02:00
Wim Taymans a522a2d4d2 rtpbin: whitespace fixes 2009-08-31 16:33:26 +02:00
Wim Taymans a26a2a9ff5 jitterbuffer: add slope estimation code and debug
Add some code to measure the sender speed vs the receiver speed. This can be
used to detect bursts.
2009-08-31 13:02:16 +02:00
Wim Taymans 4814d899c2 jitterbuffer: reset skew when timestamps change
Refactor the jitterbuffer resync code.
Reset the skew correction when we detect a big timestamp discont.

See #593354
2009-08-31 12:57:32 +02:00
Wim Taymans e254936e34 jitterbuffer: make sure time never goes invalid
Since the skew can be negative, we might end up with invalid timestamps. Check
for negative results and clamp to 0.

See #593354
2009-08-31 12:47:15 +02:00
Sebastian Dröge 041fa82179 rtpsession: Make sure that used caps are not freed already
Fixes bug #593391.
2009-08-31 08:09:09 +02:00
Sebastian Dröge 000a483d31 rtp: Use new gst_iterator_new_single() for the internal linked pads iteration 2009-08-31 08:09:09 +02:00
Sebastian Dröge a1cddb3fd6 rtpsession: Use iterate internal links instead of deprecated get internal links 2009-08-31 08:09:09 +02:00
Sebastian Dröge c8c02d2c7a jitterbuffer: Use iterate internal links instead of deprecated get internal links 2009-08-31 08:09:08 +02:00
Sebastian Dröge 97cb7bdb6c rtpssrcdemux: Use iterate internal links instead of deprecated get internal links 2009-08-31 08:09:08 +02:00
Olivier Crête 7f569ca9c8 rtpbin: Fix reference leak
Fixes #591476.
2009-08-14 13:47:18 +01:00
ric 92abe07e80 rtpsource: avoid buffer leak on bad seqnum
Fixes #590797
2009-08-11 02:30:47 +01:00
Wim Taymans 9f68303a2e rtpsource: allow for NULL caps on buffers
Add the NULL caps check where it matters and also cover another case of
potential NULL caps.

Fixes #590030
2009-08-11 02:30:47 +01:00
Olivier Crête e37844fdc7 rtpsource: Incoming buffers do not always have caps 2009-08-11 02:30:47 +01:00
Wim Taymans 3091137217 rtpsession: avoid doing lip-sync in BYE
When we get a BYE packet, don't do lip-sync with the SR inside because some
senders have trouble constructing valid SR packets after BYE.
2009-08-11 02:30:47 +01:00
Wim Taymans 3747ede14a rtpbin: don't do lip-sync after a BYE
After a BYE packet from a source, stop forwarding the SR packets for lip-sync
to rtpbin. Some senders don't update their SR packets correctly after sending a
BYE and then we break lip-sync. We prefer to let the jitterbuffers drain with
the current lip-sync instead.
2009-08-11 02:30:47 +01:00
Wim Taymans d2ef095b80 rtpbin: only reconsider once for BYE
When iterating the sources of a BYE packet, don't signal a reconsideration for
each of them but signal after we handled all sources.
2009-08-11 02:30:47 +01:00