Commit graph

197 commits

Author SHA1 Message Date
Wim Taymans
5b394385b9 session: also stop probatation on existing sources
Receiving an RTCP packet should also stop probation on sources we have seen
before.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=683065
2012-08-30 22:07:24 +02:00
Aleix Conchillo Flaque
4a200b670f rtp: make rtp packet probation configurable (bug #682512) 2012-08-30 21:49:57 +02:00
Wim Taymans
51371d26ee update for RTP buffer api changes 2012-07-17 16:38:27 +02:00
Pascal Buhler
8161daef4a rtpsession: creation should be signaled before validation
https://bugzilla.gnome.org/show_bug.cgi?id=667850
2012-05-09 10:36:18 +02:00
Wim Taymans
af59f573b5 rtpsession: don't leak the address 2012-03-13 19:26:47 +01:00
Mark Nauwelaerts
f189f62b13 Merge branch 'master' into 0.11
Conflicts:
	ext/wavpack/gstwavpackenc.c
	tests/check/elements/audioiirfilter.c
	tests/examples/v4l2/probe.c
2012-03-01 11:29:50 +01:00
Edward Hervey
9beda57c3a Suppress deprecation warnings in selected files, for g_value_array_* mostly 2012-02-27 14:47:25 +01:00
Wim Taymans
225e98d623 Merge branch 'master' into 0.11
Conflicts:
	ext/flac/gstflacenc.c
	ext/jack/gstjackaudioclient.c
	ext/jack/gstjackaudiosink.c
	ext/jack/gstjackaudiosrc.c
	ext/pulse/plugin.c
	ext/shout2/gstshout2.c
	gst/matroska/matroska-mux.c
	gst/rtp/gstrtph264pay.c
2012-02-10 16:23:14 +01:00
Olivier Crête
b850741430 rtpsession: Keep the buffer mapped while it is being modified 2012-01-27 19:05:23 +01:00
Olivier Crête
aeec2d5f7e rtpsession: Initialise the address pointer to NULL 2012-01-27 19:05:23 +01:00
Tim-Philipp Müller
5525e40970 rtpmanager: don't pretend our random hostnames are fully-qualified domain names 2012-01-25 13:19:12 +00:00
Sebastian Dröge
0b517ce9fb Merge branch '0.11' of ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good into 0.11 2012-01-25 12:49:34 +01:00
Sebastian Dröge
10554b271f Merge branch 'master' into 0.11
Conflicts:
	ext/flac/gstflacdec.c
	ext/jpeg/gstjpegenc.c
	ext/pulse/pulsesink.c
	sys/v4l2/gstv4l2src.c
2012-01-25 12:49:11 +01:00
Wim Taymans
b4630dd3e0 more memory API porting 2012-01-25 12:30:29 +01:00
Tim-Philipp Müller
a476d529d2 rtpmanager: don't reveal the user's username, hostname or real name by default
Send a randomly made-up user@hostname as CNAME and don't
send a NAME at all by default.

https://bugzilla.gnome.org/show_bug.cgi?id=668320
2012-01-23 13:47:08 +00:00
Wim Taymans
1584806634 port to new gthread API 2012-01-19 11:33:53 +01:00
Sebastian Dröge
cb789e32ad rtpmanager: Port to GIO 2012-01-17 13:08:42 +01:00
Sebastian Dröge
93e3ed5a86 Merge branch 'master' into 0.11
Conflicts:
	ext/cairo/gsttextoverlay.c
	ext/pulse/pulseaudiosink.c
	gst/audioparsers/gstaacparse.c
	gst/avi/gstavimux.c
	gst/flv/gstflvmux.c
	gst/interleave/interleave.c
	gst/isomp4/gstqtmux.c
	gst/matroska/matroska-demux.c
	gst/matroska/matroska-mux.c
	gst/matroska/matroska-mux.h
	gst/matroska/matroska-read-common.c
	gst/multifile/gstmultifilesink.c
	gst/multipart/multipartmux.c
	gst/shapewipe/gstshapewipe.c
	gst/smpte/gstsmpte.c
	gst/udp/gstmultiudpsink.c
	gst/videobox/gstvideobox.c
	gst/videocrop/gstaspectratiocrop.c
	gst/videomixer/videomixer.c
	gst/videomixer/videomixer2.c
	gst/wavparse/gstwavparse.c
	po/ja.po
	po/lv.po
	po/sr.po
	tests/check/Makefile.am
	tests/check/elements/qtmux.c
	tests/check/elements/rgvolume.c
2012-01-10 14:32:32 +01:00
Tim-Philipp Müller
66f6e12888 Work around deprecated thread API in glib master
Add private replacements for deprecated functions such as
g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly
to avoid the deprecation warnings. We'll change these
over to the new API once we depend on glib >= 2.32.
2011-12-12 09:46:27 +00:00
Wim Taymans
439e2f1cfd rtp: fix marshallers
Remove custom marshallers for minobject.
Init RTCP buffer correctly.
Handle results from setcaps
Remove asserts.
2011-12-09 10:51:14 +01:00
Edward Hervey
86a57e3546 rtpmanager: Initialize GstRTPBuffer before usage 2011-12-05 18:40:12 +01:00
Wim Taymans
07cc855b24 Merge branch 'master' into 0.11
Conflicts:
	ext/speex/gstspeexenc.c
	gst/rtpmanager/rtpsession.c
2011-11-17 17:17:11 +01:00
Olivier Crête
79a9564c68 rtpsession: Send FIR requests in response to key unit requests with all-headers=TRUE
https://bugzilla.gnome.org/show_bug.cgi?id=658419
2011-11-14 12:26:27 +01:00
Olivier Crête
12a6b9613b rtpsession: Put the PLI requests in each RTPSource
Also refactor a bit and put all the keyframe request code in one
place inside rtpsession.c

https://bugzilla.gnome.org/show_bug.cgi?id=658419
2011-11-14 12:26:27 +01:00
Olivier Crête
59c028a4ce rtpsession: Hack to FIR because Google doesn't set the sender ssrc correctly
https://bugzilla.gnome.org/show_bug.cgi?id=658419
2011-11-14 12:26:27 +01:00
Olivier Crête
0ad78db0a3 rtpsession: Process received Full Intra Requests
Process FIR requests according to RFC 5104

https://bugzilla.gnome.org/show_bug.cgi?id=658419
2011-11-14 12:26:27 +01:00
Wim Taymans
6cbd6afc0b update for new net library 2011-11-03 16:43:00 +01:00
Wim Taymans
83ccefb24e update for netbuffer api change 2011-11-02 09:06:38 +01:00
Wim Taymans
75e0c6052f update for netaddress change 2011-11-02 09:06:38 +01:00
Wim Taymans
9a8a8e72c8 structure: fix for api update 2011-11-02 09:06:37 +01:00
Wim Taymans
161310fa23 bufferlist: update for new API 2011-11-02 09:06:37 +01:00
Wim Taymans
fc4684f4c6 fix compilation 2011-10-27 16:03:17 +02:00
Wim Taymans
87fbd1e784 Merge branch 'master' into 0.11
Conflicts:
	common
	ext/pulse/pulsesink.c
	ext/soup/gstsouphttpclientsink.c
	gst/audioparsers/gstaacparse.c
	gst/audioparsers/gstac3parse.c
	gst/rtp/gstrtph264depay.c
	gst/rtpmanager/gstrtpjitterbuffer.c
	gst/rtpmanager/rtpjitterbuffer.c
	gst/rtsp/gstrtspsrc.c
	sys/ximage/gstximagesrc.c
2011-09-28 12:44:59 +02:00
Mark Nauwelaerts
e2179cbb74 rtpsession: avoid source premature timing out
Use slightly adjusted sender interval to determine sender timeout rather than
our own sender side interval (which may have been forced small).
2011-09-19 11:56:44 +02:00
Mark Nauwelaerts
f65d4c8300 rtpsession: avoid timing out source too quickly
... following a PAUSE/PLAY cycle, particularly applicable when operating
with a short RTCP interval (possibly forced so server-side).
2011-09-19 11:56:44 +02:00
Mark Nauwelaerts
afd26f0078 rtpsession: trigger reconsideration if rtcp interval set 2011-09-19 11:51:50 +02:00
Wim Taymans
33f18b8ea4 Merge branch 'master' into 0.11
Conflicts:
	gst/audioparsers/gstamrparse.c
	gst/isomp4/qtdemux.c
2011-09-06 16:06:25 +02:00
Olivier Crête
b2e8362767 rtpsession: Initialise the last_keyframe_request variable 2011-09-02 19:24:46 -04:00
Wim Taymans
4121021bb2 Merge branch 'master' into 0.11
Conflicts:
	ext/pulse/pulsesink.c
	ext/pulse/pulsesrc.c
	gst/audioparsers/gstac3parse.c
	gst/rtp/gstrtph264depay.c
	gst/rtp/gstrtph264pay.c
	gst/rtpmanager/gstrtpssrcdemux.c
2011-08-03 18:25:30 +02:00
Mark Nauwelaerts
c03648c8bb rtpsession: properly init rtcp_min_interval 2011-07-29 12:08:42 +02:00
Olivier Crête
6095d2a3f0 rtpsession: Always send application requested feedback in immediate mode
Send as many application requested feedback messages in immediate mode, even if they
have already been sent.

https://bugzilla.gnome.org/show_bug.cgi?id=654583
2011-07-25 17:20:59 +02:00
Olivier Crête
354faabda0 rtpsession: Don't let the computed RTP bandwidth fall too low
If it falls too low, the computed RTCP bandwidth will be near zero and
the RTCP thread will be stopped.

https://bugzilla.gnome.org/show_bug.cgi?id=654583
2011-07-25 16:19:00 +02:00
Olivier Crête
4d48109f9d rtpsession: Wait longer to timeout SSRC collision
Using the current RTCP interval to timeout SSRC collision can lead to
collisions being timed out immediately if a BYE packet is sent because
it is sent immediately, so the interval is 0. This is not what we
want. So just set a static 10 times the default RTCP interval, it
should be enough

https://bugzilla.gnome.org/show_bug.cgi?id=648642
2011-07-25 16:18:58 +02:00
Mark Nauwelaerts
ef02634dc6 rtpmanager: port to 0.11
* use G_DEFINE_TYPE
* adjust to new GstBuffer and corresponding rtp and rtcp buffer interfaces
* misc caps and segment handling changes

FIXME: also relies on being able to pass caps along with a buffer,
which has no evident equivalent yet, so that either needs one,
or still needs quite some code path modification to drag along caps.
2011-07-06 10:16:12 +02:00
Wim Taymans
cc65bff7c1 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	docs/plugins/inspect/plugin-esdsink.xml
	docs/plugins/inspect/plugin-gconfelements.xml
2011-06-21 18:24:41 +02:00
Olivier Crête
581a30d892 rtpsession: The signal has 5 arguments, not 4 2011-06-20 16:47:36 -04:00
Wim Taymans
a1894ed363 Merge branch 'master' into 0.11 2011-04-25 11:38:28 +02:00
Olivier Crête
42531337f5 rtpsession: Remove incomplete support for RTCP FIR
Remove bits that were meant to suppport RTCP FIR

https://bugzilla.gnome.org/show_bug.cgi?id=648160
2011-04-20 07:50:43 +01:00
Wim Taymans
7555d0949f Merge branch 'master' into 0.11
Conflicts:
	android/apetag.mk
	android/avi.mk
	android/flv.mk
	android/icydemux.mk
	android/id3demux.mk
	android/qtdemux.mk
	android/rtp.mk
	android/rtpmanager.mk
	android/rtsp.mk
	android/soup.mk
	android/udp.mk
	android/wavenc.mk
	android/wavparse.mk
	configure.ac
2011-04-18 10:23:45 +02:00
Olivier Crête
9d9257916b rtpsession: Use existing functions to parse RTCP FB packets
Use existing functions to get the FCI from FB packets.

https://bugzilla.gnome.org/show_bug.cgi?id=622553
2011-04-15 12:48:04 +01:00
Olivier Crête
5ccd964d86 rtpsession: marshal GstBuffer as a MiniObject instead of a pointer
https://bugzilla.gnome.org/show_bug.cgi?id=622553
2011-04-15 12:47:40 +01:00
Pascal Buhler
58ef84846e rtpsession: Number of active sources should be updated whenever the status of the source changes to active
Forward-ported by Olivier Crête

https://bugzilla.gnome.org/show_bug.cgi?id=646965
2011-04-11 17:37:36 -04:00
Havard Graff
53c88ae33e rtpmanager: ignore a BYE if it is sent with our internal SSRC
https://bugzilla.gnome.org/show_bug.cgi?id=646964
2011-04-11 17:34:12 -04:00
Wim Taymans
0a56b25882 rtpsession: use NetAddress metadata 2011-02-28 13:28:29 +01:00
Wim Taymans
d87c27fd2c miniobject: use buffer private field for extra data
Use the owner private field to store extra buffer data instead of using
subclassing.
2011-02-28 11:58:48 +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
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
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
Wim Taymans
8fa5ddab9a rtpsession: remember last sent RB values. 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
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
Stefan Kost
d8167e3071 various (gst): add a missing G_PARAM_STATIC_STRINGS flags 2010-10-13 18:00:28 +03: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
Wim Taymans
8337c89c74 rtpsession: fix compilation 2010-09-24 14:10:26 +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
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
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
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
Wim Taymans
50f26c671b rtpsession: fix return value 2010-05-07 19:06:35 +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
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
Olivier Crête
a6dfe96169 rtpsession: Make it possible to favor new sources in case of SSRC conflict
Add a "favor-new" property that tells the session to favor new sources when
there is a SSRC conflict. This is useful for SIP calls and other such cases
where a remote loop is extremely unlikely.

Fixes #607615
2010-03-10 11:21:19 +01:00
Olivier Crête
f336ea283f rtpsession: Move SSRC conflicts lists into RTPSource
We will also need to track SSRC conflicts in remote sources.

See #607615
2010-03-10 11:21:18 +01:00
Wim Taymans
5a4ecc9da1 rtpbin: remove more ntpnstime and cleanups
Remove some code where we pass ntpnstime around, we can do most things with the
running_time just fine.
Rename a variable in the ArrivalStats struct so that it's clear that this is the
current system time.
2010-02-15 21:36:29 +01:00
Wim Taymans
83cb1aecc8 rtpbin: change how NTP time is calculated in RTCP
Don't calculate the NTP time based on the running_time of the pipeline but from
the systemclock. This allows us to generate more accurate NTP timestamps in case
the systemclock is synchronized with NTP or similar.
2010-02-15 21:36:29 +01:00
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
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
3f629f6001 rtpsession: whitespace fixes 2009-09-03 19:16:59 +02: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
Olivier Crête
e8c6bcdf8d rtpsession: Free conflicting addresses on finalize 2009-08-11 02:30:46 +01:00
Wim Taymans
d7a8663e05 rtpsession: add a comment 2009-08-11 02:30:46 +01:00