Commit graph

95 commits

Author SHA1 Message Date
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
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
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
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
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
Wim Taymans
a522a2d4d2 rtpbin: whitespace fixes 2009-08-31 16:33:26 +02:00
Olivier Crête
7f569ca9c8 rtpbin: Fix reference leak
Fixes #591476.
2009-08-14 13:47:18 +01:00
Wim Taymans
512ba93159 rtpbin: do better cleanup of the src ghostpads
Connect to the pad-removed signal of the ptdemux elements so that we remove the
ghostpads for them. Fixes cleanup when going to NULL as well as when releasing
the sinkpads.

Fixes #561752
2009-08-11 02:30:46 +01:00
Wim Taymans
c53e595d23 rtpbin: add SDES property
Remove all individual SDES properties and use one sdes property that takes a
GstStructure instead. This will allow us to add more custom stuff to the SDES
messages later.
2009-08-11 02:30:46 +01:00
Olivier Crête
cf873498d2 rtpbin: Transform the right session sdes message
Fixes #584165
2009-08-11 02:30:45 +01:00
Wim Taymans
51251d0fa8 rtpbin: remove ptdemux ghostpads 2009-08-11 02:30:44 +01:00
Wim Taymans
7d9c2d20df rtpbin: add to new signal to remove SSRC pads 2009-08-11 02:30:44 +01:00
Wim Taymans
48872d8215 rtpbin: use our ghostpads instead of its target
Since we keep a reference to our ghostpads, we can use them to track sessions.
This avoid us having to mess with the target of the ghostpad.
2009-08-11 02:30:44 +01:00
Wim Taymans
901b7f3b69 rtpbin: don't warn when getting request pads twice
Allow getting the request pads multiple times, just return the previously
created pads.
2009-08-11 02:30:44 +01:00
Wim Taymans
1719af9113 rtpbin: set target state on new elements
Set the state on newly added elements to the state of the parent.
Add some debug info and do some cleanups
2009-08-11 02:30:43 +01:00
Wim Taymans
9c92ee6209 rtpbin: unref requests pads after releasing 2009-08-11 02:30:43 +01:00
Olivier Crête
a1c0bb2488 rtpbin: Implement releasing the streams
See #561752
2009-08-11 02:30:43 +01:00
Olivier Crête
e77542d350 rtpbin: Keep jb signals handler
Keep the signal handlers so they can be disconnected at release time

See #561752
2009-08-11 02:30:43 +01:00
Wim Taymans
59d0590cd7 rtpbin: use the right lock for the sessions
Use the right lock when iterating the sessions.
2009-08-11 02:30:42 +01:00
Olivier Crête
a9d6f3558c rtpbin: Free session if request pads are released
Free the session when all the request pads are released.
Don't mess with the session list in free_session as it is called from a foreach
on that list.
Set the state of the upstream element to NULL first.

See #561752
2009-08-11 02:30:42 +01:00
Olivier Crête
46388b767f rtpbin: Implement relasing of the rtp recv pad 2009-08-11 02:30:42 +01:00
Olivier Crête
3509098468 rtpbin: Implement releasing of rtp send pads 2009-08-11 02:30:42 +01:00
Olivier Crête
2f6e9d7bf2 rtpbin: Implement release of the recv rtcp pad
See #561752
2009-08-11 02:30:42 +01:00
Olivier Crête
47d4bb90c1 rtpbin: Implement releasing of rtcp src pad
See #561752
2009-08-11 02:30:41 +01:00
Wim Taymans
d6c623e90c rtpbin: we should not provide a clock
There is no need to provide a clock.
2009-08-11 02:30:41 +01:00
Wim Taymans
918c9448f2 rtpbin: add on_npt_stop signal
Add the on_npt_stop signal to rtpbin and rtpjitterbuffer to notify the
application that the NPT stop position has been reached.
2009-08-11 02:30:41 +01:00
Wim Taymans
a80f7dc19a gst/rtpmanager/gstrtpbin.c: Reset the sync parameters when clearing the payload type map too.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_reset_sync),
(gst_rtp_bin_clear_pt_map):
Reset the sync parameters when clearing the payload type map too.
Fixes #562312.
2009-08-11 02:30:39 +01:00
Wim Taymans
a2d7487ee1 gst/rtpmanager/gstrtpbin.*: Remove a lot of per stream state that is not needed and pass new info in the method call.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (get_client),
(gst_rtp_bin_reset_sync), (gst_rtp_bin_associate),
(gst_rtp_bin_handle_sync), (create_stream),
(gst_rtp_bin_class_init), (new_ssrc_pad_found):
* gst/rtpmanager/gstrtpbin.h:
Remove a lot of per stream state that is not needed and pass new info in
the method call.
Add signal to reset sync parameters.
Avoid parsing the caps to get a clock_base, we get this from the sync
signal now.
2009-08-11 02:30:39 +01:00
Wim Taymans
c84ffd8460 gst/rtpmanager/gstrtpbin.c: Also unref the target pad for unknown pads.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_release_pad):
Also unref the target pad for unknown pads.
2009-08-11 02:30:39 +01:00
Olivier Crete
75580396d9 gst/rtpmanager/gstrtpbin.c: Release the right pads on rtpbin. Fixes #561752.
Original commit message from CVS:
Patch by: Olivier Crete <tester at tester dot ca>
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_release_pad):
Release the right pads on rtpbin. Fixes #561752.
2009-08-11 02:30:39 +01:00
Wim Taymans
592c3f222f gst/rtpmanager/gstrtpbin.c: Remove internal sync pad, use signals instead to 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.
2009-08-11 02:30:38 +01:00
Wim Taymans
5ab3e10594 gst/rtpmanager/gstrtpbin.c: Do not try to keep track of the clock-rate 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.
2009-08-11 02:30:38 +01:00
Håvard Graff
3bebd53b6f gst/rtpmanager/gstrtpbin-marshal.list: Add marshaller for new action signal.
Original commit message from CVS:
Patch by: Håvard Graff <havard dot graff at tandberg dot com>
* gst/rtpmanager/gstrtpbin-marshal.list:
Add marshaller for new action signal.
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_get_internal_session),
(gst_rtp_bin_class_init):
* gst/rtpmanager/gstrtpbin.h:
Add action signal to retrieve the internal RTPSession object.
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_get_property), (gst_rtp_session_release_pad):
Add property to access the internal RTPSession object.
* gst/rtpmanager/rtpsession.c: (rtp_session_class_init),
(check_collision):
* gst/rtpmanager/rtpsession.h:
Add action signal to retrieve an RTPSource object by SSRC.
See #555396.
2009-08-11 02:30:38 +01:00
Wim Taymans
bd8f4b6c58 gst/rtpmanager/gstrtpbin.c: Release pads of the session manager.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_pad),
(free_session), (gst_rtp_bin_dispose), (remove_recv_rtp),
(remove_recv_rtcp), (remove_send_rtp), (remove_rtcp),
(gst_rtp_bin_release_pad):
Release pads of the session manager.
Start implementing releasing pads of gstrtpbin.
* gst/rtpmanager/gstrtpsession.c: (remove_recv_rtp_sink),
(remove_recv_rtcp_sink), (remove_send_rtp_sink),
(remove_send_rtcp_src), (gst_rtp_session_release_pad):
Implement releasing pads in gstrtpsession.
2009-08-11 02:30:38 +01:00
Wim Taymans
5e98fa572f gst/rtpmanager/gstrtpbin.c: Do not try to adjust the offset of streams for which we have not yet seen an SR packet. A...
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session),
(gst_rtp_bin_associate), (gst_rtp_bin_sync_chain):
Do not try to adjust the offset of streams for which we have not yet
seen an SR packet. Avoids large ts-offsets in some cases.
2009-08-11 02:30:37 +01:00
Wim Taymans
85e26f6546 gst/rtpmanager/gstrtpbin.*: Add signal to notify listeners when a sender 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.
2009-08-11 02:30:37 +01:00
Wim Taymans
62ecaee748 gst/rtpmanager/gstrtpbin.c: Reset rtp timestamp interpollation when we detect a gap when the clock_base changed.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_associate),
(gst_rtp_bin_sync_chain), (new_ssrc_pad_found):
Reset rtp timestamp interpollation when we detect a gap when the
clock_base changed.
Don't try to adjust the ts-offset when it's too big (> 3seconds)
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_set_ssrc):
* gst/rtpmanager/gstrtpsession.h:
Add method to set session SSRC.
* gst/rtpmanager/rtpsession.c: (check_collision),
(rtp_session_set_internal_ssrc), (rtp_session_get_internal_ssrc),
(rtp_session_on_timeout):
* gst/rtpmanager/rtpsession.h:
Added debugging for the collision checks.
Add method to change the internal SSRC of the session.
* gst/rtpmanager/rtpsource.c: (rtp_source_process_rtp):
Reset the clock base when we detect large jumps in the seqnums.
2009-08-11 02:30:37 +01:00
Stefan Kost
cc74738d83 gst/rtpmanager/gstrtpbin.c: Print the pad-name in debug log.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c:
Print the pad-name in debug log.
* sys/dshowsrcwrapper/gstdshowaudiosrc.c:
* sys/dshowsrcwrapper/gstdshowvideosrc.c:
Use "-" instead of "_" in property names. Can we call them just
"device" like everywhere else?
2009-08-11 02:30:37 +01:00
Olivier Crete
2707a84d78 gst/rtpmanager/gstrtpbin.c: Release lock before emitting the request-pt-map signal.
Original commit message from CVS:
Patch by: Olivier Crete <tester at tester dot ca>
* gst/rtpmanager/gstrtpbin.c: (get_pt_map):
Release lock before emitting the request-pt-map signal.
Fixes #543480.
2009-08-11 02:30:37 +01:00
Stefan Kost
138c2b7cf9 gst/: More doc updates. More xrefs.
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.
2009-08-11 02:30:36 +01:00
Stefan Kost
2d1ccbf52e Do not use short_description in section docs for elements. We extract them 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.
2009-08-11 02:30:36 +01:00
Wim Taymans
8dc879f15e gst/rtpmanager/gstrtpbin.c: Fix deadlock when shutting down, use a new lock instead to properly shutdown.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_change_state):
Fix deadlock when shutting down, use a new lock instead to properly
shutdown.
2009-08-11 02:30:36 +01:00
Wim Taymans
fda8195d76 gst/rtpmanager/gstrtpbin.c: Break out of callbacks when we are shutting down.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c:
(gst_rtp_bin_propagate_property_to_jitterbuffer),
(gst_rtp_bin_change_state), (new_payload_found),
(new_ssrc_pad_found):
Break out of callbacks when we are shutting down.
Make sure no state changes can happen when we reconfigure.
2009-08-11 02:30:36 +01:00
Håvard Graff
b889dfad30 gst/rtpmanager/gstrtpbin.c: Propagate the do-lost and latency properties to the jitterbuffers when they are changed o...
Original commit message from CVS:
Patch by: Håvard Graff <havard dot graff at tandberg dot com>
* gst/rtpmanager/gstrtpbin.c:
(gst_rtp_bin_propagate_property_to_jitterbuffer),
(gst_rtp_bin_set_property):
Propagate the do-lost and latency properties to the jitterbuffers when
they are changed on rtpbin.
2009-08-11 02:30:36 +01:00
Wim Taymans
cd00eb71b4 gst/rtpmanager/gstrtpbin.c: Actually add the do-lost property to the object.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_class_init):
Actually add the do-lost property to the object.
2009-08-11 02:30:35 +01:00
Wim Taymans
d6c8809739 gst/rtpmanager/gstrtpbin.*: Expose new jitterbuffer property in rtpbin too.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_stream), (gst_rtp_bin_init),
(gst_rtp_bin_set_property), (gst_rtp_bin_get_property):
* gst/rtpmanager/gstrtpbin.h:
Expose new jitterbuffer property in rtpbin too.
2009-08-11 02:30:35 +01:00