Commit graph

429 commits

Author SHA1 Message Date
Sebastian Dröge
4c36ca30b2 jitterbuffer: Unref event if the parent element disappeared 2011-04-08 15:22:19 +02:00
Havard Graff
342686bb02 jitterbuffer: Make upstream events MT-safe 2011-04-08 15:21:46 +02:00
Sebastian Dröge
31af4fe33e rtp: Unref events if the parent element disappeared 2011-04-08 15:20:51 +02:00
Ole André Vadla Ravnås
046f170d6a rtpmanager: fix pad callbacks so they handle when parent goes away
1) We need to lock and get a strong ref to the parent, if still there.
2) If it has gone away, we need to handle that gracefully.

This is necessary in order to safely modify a running pipeline. Has been
observed when a streaming thread is doing a buffer_alloc() while an
application thread sends an event on a pad further downstream, and from
within a pad probe (holding STREAM_LOCK) carries out the pipeline plumbing
while the streaming thread has its buffer_alloc() in progress.
2011-04-08 15:16:56 +02:00
Havard Graff
f8370bb2a8 rtpsession: make iterate_internal_links MT-safe 2011-04-08 14:41:34 +02:00
Mark Nauwelaerts
e5bcaa45e6 Revert "jitterbuffer: reset element base_time upon flush"
This reverts commit f84b8a69cb.

Fixes bug #646397.
2011-04-04 11:49:00 +02:00
Mark Nauwelaerts
6bc1aa0e59 jitterbuffer: handle position query 2011-03-09 17:18:08 +01:00
Mark Nauwelaerts
1f7f434df6 jitterbuffer: also estimate eos if very near eos 2011-03-07 16:56:43 +01:00
Mark Nauwelaerts
3c9a4239bf jitterbuffer: avoid trying to buffer more than is available.
That is, in case of short (or near eos of) stream, deadlock (until timeout)
would occur trying to buffer more than is yet forthcoming.
2011-03-07 16:56:18 +01:00
Mark Nauwelaerts
f84b8a69cb jitterbuffer: reset element base_time upon flush
... to arrange for properly scheduled timeout (following seek).
2011-03-07 11:07:12 +01:00
Blaise Gassend
0f88181f43 rtpbin: handle NULL demux elements
When using gstrtpbin with ignore-pt=true, the free_stream function tries to
call gst_element_set_locked_state and gst_element_set_state on a stream->demux
which is NULL.

fixes #642412
2011-02-22 13:31:35 +01:00
Wim Taymans
45ea930a99 rtpbin: fix setting the SDES property
Only the sdes veriable is protected with the object lock.
Use the right object when setting the sdes property.
2011-02-21 17:19:05 +01:00
Wim Taymans
61382aad28 source: fix type of ntpnstime 2011-02-02 18:30:47 +01:00
Wim Taymans
8598aaf81b rtpbin: Get and use the NTP time when receiving RTCP
When we receive an RTCP packet, get the current NTP time in nanseconds so that
we can correctly calculate the round-trip time.
2011-02-02 18:30:46 +01:00
Olivier Crête
cd923223dd rtpsession: Add action signal to request early RTCP 2011-02-01 18:28:51 +01:00
Olivier Crête
c0996e6b90 rtpsession: Add callback to get the current time 2011-02-01 18:28:51 +01:00
Olivier Crête
a630c68fc3 rtpsession: Don't relay more than one PLI request per RTT
Drop PLI requests if one was relay in the last RTT, the other side may
just not have received the keyframe yet.
2011-02-01 18:28:51 +01:00
Olivier Crête
a61bb9e94b rtpsession: Send GstForceKeyUnit event in response to received RTCP PLI 2011-02-01 18:28:51 +01:00
Sjoerd Simons
7350d2adfa gstrtpsession: Fallback for FIR to PLI if PLI isn't available 2011-02-01 18:28:51 +01:00
Olivier Crête
52f95fa7ee rtpsession: Implement sending PLI packets in response to GstForceKeyUnit 2011-02-01 18:28:51 +01:00
Olivier Crête
db5150a23a rtpsource: Retain RTCP Feedback packets for a specified amount of time 2011-02-01 18:28:51 +01:00
Olivier Crête
90354ecb49 rtpsession: Make rtcp buffer metadata writable after processing it
Functions that process the rtcp buffer could decide to keep a ref
on the buffer for further processing. So make the metadata writable
only after they are done.
2011-02-01 18:28:50 +01:00
Olivier Crête
1643f427db rtpsession: Emit signal on incoming RTCP FB packet 2011-02-01 18:28:50 +01:00
Wim Taymans
f399b6a641 rtpsession: fix compilation 2011-02-01 18:28:50 +01:00
Olivier Crête
1bde427250 rtpsession: Add method to request early RTCP packet
Implement the early mode defined in RFC 4585. In this mode, RTCP feedback
packets are sent early to notifier.
2011-02-01 17:03:39 +01:00
Olivier Crête
975e1fecb3 rtpsession: Add property for minimum interval between Regular RTCP messages
This can be changed according to RFC 4585
2011-02-01 16:56:15 +01:00
Olivier Crête
cdb5465741 rtpsession: Emit signal when sending a compound RTCP packet
This allows users to add extra RTCP packets to the compound
RTCP packet.
2011-02-01 16:50:58 +01:00
Olivier Crête
589b254ce5 rtpptdemux: Tag upstream custom events with payload type 2011-02-01 16:50:25 +01:00
Olivier Crete
c7b1ce7310 rtpssrcdemux: Tag upstream custom events with SSRC 2011-02-01 16:49:10 +01:00
Olivier Crête
9f073459e0 rtpsession: Emit "on-ssrc-validated" when validating by RTCP
Emit "on-ssrc-validated" if the SSRC is validated by receiving
a RTCP SDES packet.
2011-02-01 16:45:58 +01:00
Stefan Kost
9f34b89245 rtpjitterbuffer: don't divide by 0 2011-01-25 21:57:57 +02:00
Wim Taymans
b5647685c4 rtpsource: use the right variable
Use the right variable for specifying that we sent a receiver report.
2010-12-27 13:13:46 +01:00
Wim Taymans
7caad21a57 rtpsource: include last send RB block
Only report RB values for non-internal sources.
Report not only the RB blocks we last received from but also the last RB
block we sent to a source.
2010-12-23 13:58:30 +01:00
Wim Taymans
8fa5ddab9a rtpsession: remember last sent RB values. 2010-12-23 13:58:30 +01:00
Wim Taymans
6035ee08c0 rtpsource: include all stats and document
Include all possible stats of a source in the stats structure because we might
be interested in what happened in the past.
Document the stats property and the fields.
2010-12-23 13:58:30 +01:00
Wim Taymans
10a5a795ea rtpsession: also emit RTCP activity on SR
Also emit RTCP activity signals when we receive an SR packet without RB blocks,
such as from a sender that is not receiving anything.
2010-12-23 13:58:30 +01:00
Wim Taymans
1230258e6f docs: add some more gstrtpbin docs 2010-12-23 13:58:29 +01:00
Wim Taymans
2b53cbe923 rtpsession: unlock before emitting signals 2010-12-22 11:46:21 +01:00
Wim Taymans
eb6d552353 jitterbuffer: get better buffering level
When the jitterbuffer contains -1 timestamps, make sure we still calculate the
buffer fill level by skipping the -1 buffers.
Try to be more resilient to weird input timestamps.
2010-12-20 15:56:50 +01:00
Wim Taymans
6cb0efede4 jitterbuffer: provide a clock.
since we are using the clock for sync, we need to also provide a clock for good
measure. The reason is that even if downstream elements provide a clock, we
don't want to have that clock selected because it might not be running yet.
2010-12-20 11:13:09 +01:00
Wim Taymans
210f1c44c7 rtpbin: copy buffering stats
when we create an aggregate buffering message, copy the buffering stats form the
last message. At least we get correct buffering mode then.
2010-12-20 11:13:09 +01:00
Wim Taymans
0c3333da04 session: fix average RTCP packet size some more.
Fix stupid error in averaging macro.
Include udp headers in packet length estimation.
2010-12-14 18:12:43 +01:00
Wim Taymans
7ebd374766 rtpbin: correctly calculate RTCP packet size 2010-12-14 17:15:23 +01:00
Wim Taymans
ffc7cd9803 jitterbuffer: avoid leaking sink events
Avoid leaking the newsegment event when it has the wrong format.
2010-12-13 12:57:58 +01:00
Mark Nauwelaerts
46c91476eb rtpssrcdemux: do not hold custom PAD_LOCK when pushing downstream 2010-12-03 15:50:21 +01:00
Olivier Crête
077a61932a rtpbin: Use the right constant to define the "use-pipeline-clock" property
The wrong #define was being used, now use the correct one.
2010-10-14 17:41:30 -04:00
Stefan Kost
d8167e3071 various (gst): add a missing G_PARAM_STATIC_STRINGS flags 2010-10-13 18:00:28 +03:00
Tim-Philipp Müller
d65eb2b91a ext, gst: canonicalise property names where this wasn't the case
ie. "foo_bar" -> "foo-bar"
2010-10-12 16:04:21 +01:00
Vladimir Eremeev
8bf7381385 rtpjitterbuffer: improve article reference in comment block
https://bugzilla.gnome.org/show_bug.cgi?id=631082
2010-10-01 18:07:03 +01:00
Thijs Vermeir
2c2c90a723 rtpjitterbuffer: update link to documentation 2010-09-30 12:08:49 +02:00
Pascal Buhler
7a8c2a4b8a rtpmanager: packet lost should not be a warning. It happens all the time... 2010-09-24 16:00:03 +02:00
Pascal Buhler
ca6a512b5e rtpbin: Make cleaning up sources in rtp_session_on_timeout MT safe
Using _foreach_remove on the hashtable, while releasing the lock protecting
that table inside the callback is not a good idea. The hashtable might
then change (a source removed or added) while signals like on_timeout
are being sent.

This solution makes a copy of the table, performs the _foreach without
actually removing any sources, but marks them for removal on a second
iteration with the real list, but this time not letting go of the lock.

Fixes #630452
2010-09-24 15:38:00 +02:00
Pascal Buhler
bd8d80a8e4 rtpbin: Handle rysnc of iterator when looking for free pad name
If a new pad was added while iterating then a pad could be
returned that was already in use.

Fixes #630451
2010-09-24 14:10:26 +02:00
Wim Taymans
8337c89c74 rtpsession: fix compilation 2010-09-24 14:10:26 +02:00
Trond Andersen
800b4bdb26 rtpbin: Unlock before adding pad in new_payload_found
Holding internal locks while potentially calling out is a source
of deadlocks, and in this case the application might subscribe to the
pad-added signal.

Fixes #630449
2010-09-24 14:00:11 +02:00
Havard Graff
062568a9f5 rtpsession: relax third-party collision detection
If the source has been inactive for some time, we assume that it has
simply changed its transport source address. Hence, there is no true
third-party collision - only a simulated one.

Fixes #630447
2010-09-24 13:56:56 +02:00
Wim Taymans
ce007b244e rtpsource: whitespace fixes 2010-09-24 13:50:02 +02:00
Wim Taymans
c5203a479b rtpsource: simplify the rate estimation some more 2010-09-24 13:48:50 +02:00
Havard Graff
0fa589a3dd rtpmanager: provide additional statistics 2010-09-24 13:26:10 +02:00
Wim Taymans
2c8b725591 rtpstats: printf format fixes 2010-09-17 11:07:52 +02:00
Olivier Crête
8e73da10b3 gstrtpsession: Split getting the caps into its own function 2010-09-13 16:25:42 +02:00
Wim Taymans
8e1c9b5b33 rtpbin: small cleanup. 2010-09-13 16:25:42 +02:00
Wim Taymans
d541f5e24d rtpsession: Small cleanups
Make the property description prettier.
Actually multiple the bandwidth with the fraction.
2010-09-13 15:51:20 +02:00
Olivier Crête
1f17b334ff rtpsession: Calculate RTCP bandwidth as a fraction of the RTP bandwidth
Calculate the RTCP bandwidth to be a fraction of the RTP bandwidth if it is
specified as a value between 0 and 1.
2010-09-13 15:51:20 +02:00
Wim Taymans
8381d9788d session: improve bandwidth recalculation
Also recalculate bandwidth when one of the source bandwidths changed.
Use the newly calculated bandwidth.
2010-09-13 15:51:20 +02:00
Olivier Crête
6f53a2b240 rtpsession: Add the option to auto-discover the RTP bandwidth 2010-09-13 15:51:19 +02:00
Thijs Vermeir
f38e37470a rtpbin: set use-pipeline-clock on correct GObject 2010-09-13 14:39:51 +02:00
Olivier Crête
94e87ef8ee rtpsession: Initialise the average scaled by 16 2010-09-13 13:10:19 +02:00
Wim Taymans
e6db74764b rtpsession: add running_time argument docs 2010-09-13 12:41:56 +02:00
Olivier Crête
00fd89c074 rtpstats: Rectify description of current_time in RTPArrivalStats
It is the current time, it is unrelated to when the packet was actually received.
2010-09-13 12:37:01 +02:00
Wim Taymans
cb6de429a0 rtpsession: compute the average correctly scaled 2010-09-13 12:31:40 +02:00
Olivier Crête
64e4ffa25b rtpsession: Count sent RTCP packets after they have been finished
If they are counted before calling gst_rtcp_buffer_end(), then the
size is way too big.
2010-09-13 12:13:23 +02:00
Olivier Crête
306ee454c6 gstrtpsession: Don't unref pads in finalize
The gstrtpsession object is not holding any reference to them directly
2010-09-13 12:10:11 +02:00
Wim Taymans
93228ccd52 rtpbin: add ntp-sync property
Add an ntp-sync property that will sync the received streams to the server
NTP time. This requires synchronized NTP times between the sender and receivers,
like with ntpd.

Based on patch from Thijs Vermeir.

Fixes #627796
2010-09-06 11:01:57 +02:00
Wim Taymans
f03fd91400 jitterbuffer: rename a variable to avoid confusion 2010-09-06 11:01:57 +02:00
Wim Taymans
e3479630ae rtpbin: rename some variables for less confusion 2010-09-06 11:01:57 +02:00
Wim Taymans
0f59664c6a rtpjitterbuffer: move comment where it belongs 2010-09-06 11:01:57 +02:00
Wim Taymans
4fd81747f3 session: minor cleanups
Make clock snapshots more accurate by only sampling the same clock once.
2010-09-06 11:01:57 +02:00
Thijs Vermeir
51020549f0 rtpbin: add use-pipeline-clock property
With this property RTCP SR NTP times can be based
on the system clock (maybe synced with ntpd) or the
current pipeline clock.

https://bugzilla.gnome.org/show_bug.cgi?id=627796
2010-09-06 11:01:57 +02:00
Thijs Vermeir
244a35a226 rtpptdemux: fix memleak on custom downstream events
by not sending custom downstream event twice and fix memleak when
not handling the event

https://bugzilla.gnome.org/show_bug.cgi?id=623196
2010-06-30 12:39:09 +02:00
Sebastian Dröge
f16ed4a91c gst: Don't use GST_DEBUG_FUNCPTR for GObject vfuncs 2010-06-06 17:52:40 +02:00
Thijs Vermeir
0bb2be3a7e rtpjitterbuffer: fix compiler warning
unused variable ‘estimated’
2010-06-02 15:32:36 +02:00
Alessandro Decina
4b6cb93025 rtpjitterbuffer: stop buffering and emit EOS at the end of a stream
When using RTP_JITTER_BUFFER_MODE_BUFFER, make sure that the ringbuffer doesn't
get stuck buffering forever when there isn't enough data left to fill the
buffer.
2010-06-02 14:21:16 +02:00
Wim Taymans
dc2662e22b rtpbin: fix docs
Documentation error spotted by tony <caicai0119 at gmail.com>

Fixes #618419
2010-05-13 13:01:26 +02:00
Wim Taymans
50f26c671b rtpsession: fix return value 2010-05-07 19:06:35 +02:00
Wim Taymans
aadf4ddf7e rtpsession: add properties to configure the bandwidth
Add properties to proxy the bandwidth configuration to the session object.
2010-05-07 18:58:58 +02:00
Wim Taymans
69cde0e874 rtpsession: add properties to configure bandwidths
Add properties to configure the sender and receiver bandwidths.
Configure the bandwidths before calculating the RTCP timeout when we need to.
2010-05-07 18:57:13 +02:00
Wim Taymans
d84dc1112d rtpstats: add some debug info 2010-05-07 18:56:30 +02:00
Wim Taymans
5690331c9e rtpsession: small cleanups 2010-05-07 18:55:34 +02:00
Wim Taymans
0da5cf2e21 rtpstats: make bandwidths more configurable
Add a method to configure the various bandwidths in the session.
2010-05-07 16:55:13 +02:00
Wim Taymans
6eee730c4a rtpsession: handle NONE RTCP intervals
Prepare for handling RTCP reporting intervals of GST_CLOCK_TIME_NONE, which
means don't send RTCP at all.
2010-05-07 13:32:30 +02:00
Alessandro Decina
40899379c0 rtpjitterbuffer: move some initialization code from change_state to _init.
Set ->active to TRUE in _init so it can be set to FALSE after creating the
jitterbuffer and it won't be mistakenly reset to TRUE in the change_state
function.
This is needed to start the jitterbuffer as inactive when rtpbin is buffering.
2010-05-03 13:34:59 +02:00
Alessandro Decina
ffc2da30fc rtpbin: fix a bug handling BUFFERING messages.
If a session exists but has no streams, set the min buffering percent to 0
since it means that we haven't received anything for that session yet.
2010-05-03 11:56:58 +02:00
Alessandro Decina
f6e9f359b9 rtpbin: when a stream is created, pause the jitterbuffer if rtpbin is buffering. 2010-05-03 11:51:37 +02:00
Alessandro Decina
38a5b08ef2 rtpbin: fix a bug calculating stream offsets. 2010-05-03 11:23:59 +02:00
Stefan Kost
d6e9af2a11 docs: do proper escaping for "%" 2010-04-08 18:05:46 +03:00
Stefan Kost
9967a4112b rtpsession: remove prototype for non existing function
There is no function by that name anywhere.
2010-04-08 14:02:50 +03:00
Benjamin Otte
cccfeaa59c gst_element_class_set_details => gst_element_class_set_details_simple 2010-03-18 14:32:00 +01:00
Benjamin Otte
1055aaa9cb Add -Wredundant-decls warning flag
Also fix compile issues
2010-03-17 19:35:10 +01:00
Benjamin Otte
21f66635e8 Update for recent changes to common submodule
This just replaces every "$ERROR_CFLAGS" usage with a usage of
"$WARNING_CFLAGS $ERROR_CFLAGS" to get the same functionality as
previously.

Actually using that separation will happen later.
2010-03-10 21:53:51 +01:00