Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
/* GStreamer
|
2007-12-10 15:34:19 +00:00
|
|
|
* Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com>
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-04 00:07:18 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2013-07-02 08:12:17 +00:00
|
|
|
* SECTION:element-rtpbin
|
2018-10-22 09:39:24 +00:00
|
|
|
* @title: rtpbin
|
2013-07-02 08:12:17 +00:00
|
|
|
* @see_also: rtpjitterbuffer, rtpsession, rtpptdemux, rtpssrcdemux
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
*
|
2009-11-20 09:25:49 +00:00
|
|
|
* RTP bin combines the functions of #GstRtpSession, #GstRtpSsrcDemux,
|
2008-06-16 07:03:58 +00:00
|
|
|
* #GstRtpJitterBuffer and #GstRtpPtDemux in one element. It allows for multiple
|
|
|
|
* RTP sessions that will be synchronized together using RTCP SR packets.
|
2009-08-31 14:33:26 +00:00
|
|
|
*
|
2008-06-16 07:03:58 +00:00
|
|
|
* #GstRtpBin is configured with a number of request pads that define the
|
|
|
|
* functionality that is activated, similar to the #GstRtpSession element.
|
2009-08-31 14:33:26 +00:00
|
|
|
*
|
2011-11-04 10:58:22 +00:00
|
|
|
* To use #GstRtpBin as an RTP receiver, request a recv_rtp_sink_\%u pad. The session
|
2009-08-31 14:33:26 +00:00
|
|
|
* number must be specified in the pad name.
|
2011-11-04 10:58:22 +00:00
|
|
|
* Data received on the recv_rtp_sink_\%u pad will be processed in the #GstRtpSession
|
2009-11-20 09:25:49 +00:00
|
|
|
* manager and after being validated forwarded on #GstRtpSsrcDemux element. Each
|
2008-06-16 07:03:58 +00:00
|
|
|
* RTP stream is demuxed based on the SSRC and send to a #GstRtpJitterBuffer. After
|
Rename elements to avoid conflict with farsight elements with the same name. 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-28 16:37:47 +00:00
|
|
|
* the packets are released from the jitterbuffer, they will be forwarded to a
|
2010-05-13 11:01:26 +00:00
|
|
|
* #GstRtpPtDemux element. The #GstRtpPtDemux element will demux the packets based
|
2011-11-04 10:58:22 +00:00
|
|
|
* on the payload type and will create a unique pad recv_rtp_src_\%u_\%u_\%u on
|
2013-07-02 08:12:17 +00:00
|
|
|
* rtpbin with the session number, SSRC and payload type respectively as the pad
|
2007-05-23 13:08:52 +00:00
|
|
|
* name.
|
2009-08-31 14:33:26 +00:00
|
|
|
*
|
2011-11-04 10:58:22 +00:00
|
|
|
* To also use #GstRtpBin as an RTCP receiver, request a recv_rtcp_sink_\%u pad. The
|
2007-05-23 13:08:52 +00:00
|
|
|
* session number must be specified in the pad name.
|
2009-08-31 14:33:26 +00:00
|
|
|
*
|
2007-05-23 13:08:52 +00:00
|
|
|
* If you want the session manager to generate and send RTCP packets, request
|
2011-11-04 10:58:22 +00:00
|
|
|
* the send_rtcp_src_\%u pad with the session number in the pad name. Packet pushed
|
2007-05-23 13:08:52 +00:00
|
|
|
* on this pad contain SR/RR RTCP reports that should be sent to all participants
|
|
|
|
* in the session.
|
2009-08-31 14:33:26 +00:00
|
|
|
*
|
2011-11-04 10:58:22 +00:00
|
|
|
* To use #GstRtpBin as a sender, request a send_rtp_sink_\%u pad, which will
|
|
|
|
* automatically create a send_rtp_src_\%u pad. If the session number is not provided,
|
2008-01-10 20:57:17 +00:00
|
|
|
* the pad from the lowest available session will be returned. The session manager will modify the
|
2019-09-02 12:27:35 +00:00
|
|
|
* SSRC in the RTP packets to its own SSRC and will forward the packets on the
|
2011-11-04 10:58:22 +00:00
|
|
|
* send_rtp_src_\%u pad after updating its internal state.
|
2009-08-31 14:33:26 +00:00
|
|
|
*
|
2007-05-23 13:08:52 +00:00
|
|
|
* The session manager needs the clock-rate of the payload types it is handling
|
2008-06-16 07:03:58 +00:00
|
|
|
* and will signal the #GstRtpSession::request-pt-map signal when it needs such a
|
|
|
|
* mapping. One can clear the cached values with the #GstRtpSession::clear-pt-map
|
2007-05-23 13:08:52 +00:00
|
|
|
* signal.
|
2009-08-31 14:33:26 +00:00
|
|
|
*
|
2013-07-02 08:12:17 +00:00
|
|
|
* Access to the internal statistics of rtpbin is provided with the
|
2010-12-23 10:10:55 +00:00
|
|
|
* get-internal-session property. This action signal gives access to the
|
|
|
|
* RTPSession object which further provides action signals to retrieve the
|
|
|
|
* internal source and other sources.
|
|
|
|
*
|
2013-12-30 13:56:07 +00:00
|
|
|
* #GstRtpBin also has signals (#GstRtpBin::request-rtp-encoder,
|
2013-12-05 23:53:52 +00:00
|
|
|
* #GstRtpBin::request-rtp-decoder, #GstRtpBin::request-rtcp-encoder and
|
|
|
|
* #GstRtpBin::request-rtp-decoder) to dynamically request for RTP and RTCP encoders
|
|
|
|
* and decoders in order to support SRTP. The encoders must provide the pads
|
2014-05-14 20:42:25 +00:00
|
|
|
* rtp_sink_\%u and rtp_src_\%u for RTP and rtcp_sink_\%u and rtcp_src_\%u for
|
2013-12-05 23:53:52 +00:00
|
|
|
* RTCP. The session number will be used in the pad name. The decoders must provide
|
|
|
|
* rtp_sink and rtp_src for RTP and rtcp_sink and rtcp_src for RTCP. The decoders will
|
|
|
|
* be placed before the #GstRtpSession element, thus they must support SSRC demuxing
|
|
|
|
* internally.
|
|
|
|
*
|
2013-12-31 12:16:46 +00:00
|
|
|
* #GstRtpBin has signals (#GstRtpBin::request-aux-sender and
|
|
|
|
* #GstRtpBin::request-aux-receiver to dynamically request an element that can be
|
|
|
|
* used to create or merge additional RTP streams. AUX elements are needed to
|
|
|
|
* implement FEC or retransmission (such as RFC 4588). An AUX sender must have one
|
|
|
|
* sink_\%u pad that matches the sessionid in the signal and it should have 1 or
|
|
|
|
* more src_\%u pads. For each src_%\u pad, a session will be made (if needed)
|
|
|
|
* and the pad will be linked to the session send_rtp_sink pad. Each session will
|
2014-11-10 07:46:01 +00:00
|
|
|
* then expose its source pad as send_rtp_src_\%u on #GstRtpBin.
|
2013-12-31 12:16:46 +00:00
|
|
|
* An AUX receiver has 1 src_\%u pad that much match the sessionid in the signal
|
|
|
|
* and 1 or more sink_\%u pads. A session will be made for each sink_\%u pad
|
|
|
|
* when the corresponding recv_rtp_sink_\%u pad is requested on #GstRtpBin.
|
2017-12-19 17:23:16 +00:00
|
|
|
* The #GstRtpBin::request-jitterbuffer signal can be used to provide a custom
|
|
|
|
* element to perform arrival time smoothing, reordering and optionally packet
|
|
|
|
* loss detection and retransmission requests.
|
2013-12-31 12:16:46 +00:00
|
|
|
*
|
2018-10-22 09:39:24 +00:00
|
|
|
* ## Example pipelines
|
2017-12-19 17:23:16 +00:00
|
|
|
*
|
2008-06-16 07:03:58 +00:00
|
|
|
* |[
|
2012-08-26 21:39:55 +00:00
|
|
|
* gst-launch-1.0 udpsrc port=5000 caps="application/x-rtp, ..." ! .recv_rtp_sink_0 \
|
2013-07-02 08:12:17 +00:00
|
|
|
* rtpbin ! rtptheoradepay ! theoradec ! xvimagesink
|
|
|
|
* ]| Receive RTP data from port 5000 and send to the session 0 in rtpbin.
|
2008-06-16 07:03:58 +00:00
|
|
|
* |[
|
2013-07-02 08:12:17 +00:00
|
|
|
* gst-launch-1.0 rtpbin name=rtpbin \
|
2012-08-26 21:39:55 +00:00
|
|
|
* v4l2src ! videoconvert ! ffenc_h263 ! rtph263ppay ! rtpbin.send_rtp_sink_0 \
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
* rtpbin.send_rtp_src_0 ! udpsink port=5000 \
|
|
|
|
* rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \
|
|
|
|
* udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \
|
|
|
|
* audiotestsrc ! amrnbenc ! rtpamrpay ! rtpbin.send_rtp_sink_1 \
|
|
|
|
* rtpbin.send_rtp_src_1 ! udpsink port=5002 \
|
|
|
|
* rtpbin.send_rtcp_src_1 ! udpsink port=5003 sync=false async=false \
|
2007-08-28 20:30:16 +00:00
|
|
|
* udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1
|
2008-06-16 07:03:58 +00:00
|
|
|
* ]| Encode and payload H263 video captured from a v4l2src. Encode and payload AMR
|
2007-08-28 20:30:16 +00:00
|
|
|
* audio generated from audiotestsrc. The video is sent to session 0 in rtpbin
|
|
|
|
* and the audio is sent to session 1. Video packets are sent on UDP port 5000
|
|
|
|
* and audio packets on port 5002. The video RTCP packets for session 0 are sent
|
|
|
|
* on port 5001 and the audio RTCP packets for session 0 are sent on port 5003.
|
|
|
|
* RTCP packets for session 0 are received on port 5005 and RTCP for session 1
|
|
|
|
* is received on port 5007. Since RTCP packets from the sender should be sent
|
2009-08-31 14:33:26 +00:00
|
|
|
* as soon as possible and do not participate in preroll, sync=false and
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
* async=false is configured on udpsink
|
2008-06-16 07:03:58 +00:00
|
|
|
* |[
|
2013-07-02 08:12:17 +00:00
|
|
|
* gst-launch-1.0 -v rtpbin name=rtpbin \
|
2007-08-28 20:30:16 +00:00
|
|
|
* udpsrc caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998" \
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
* port=5000 ! rtpbin.recv_rtp_sink_0 \
|
|
|
|
* rtpbin. ! rtph263pdepay ! ffdec_h263 ! xvimagesink \
|
|
|
|
* udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
|
|
|
|
* rtpbin.send_rtcp_src_0 ! udpsink port=5005 sync=false async=false \
|
|
|
|
* udpsrc caps="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)AMR,encoding-params=(string)1,octet-align=(string)1" \
|
|
|
|
* port=5002 ! rtpbin.recv_rtp_sink_1 \
|
|
|
|
* rtpbin. ! rtpamrdepay ! amrnbdec ! alsasink \
|
|
|
|
* udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \
|
|
|
|
* rtpbin.send_rtcp_src_1 ! udpsink port=5007 sync=false async=false
|
2008-06-16 07:03:58 +00:00
|
|
|
* ]| Receive H263 on port 5000, send it through rtpbin in session 0, depayload,
|
2007-08-28 20:30:16 +00:00
|
|
|
* decode and display the video.
|
|
|
|
* Receive AMR on port 5002, send it through rtpbin in session 1, depayload,
|
|
|
|
* decode and play the audio.
|
|
|
|
* Receive server RTCP packets for session 0 on port 5001 and RTCP packets for
|
|
|
|
* session 1 on port 5003. These packets will be used for session management and
|
|
|
|
* synchronisation.
|
|
|
|
* Send RTCP reports for session 0 on port 5005 and RTCP reports for session 1
|
|
|
|
* on port 5007.
|
2018-10-22 09:39:24 +00:00
|
|
|
*
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
2009-10-07 11:03:20 +00:00
|
|
|
#include <stdio.h>
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
#include <gst/rtp/gstrtpbuffer.h>
|
|
|
|
#include <gst/rtp/gstrtcpbuffer.h>
|
|
|
|
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
#include "gstrtpbin.h"
|
2008-10-07 18:54:41 +00:00
|
|
|
#include "rtpsession.h"
|
2008-08-13 14:31:02 +00:00
|
|
|
#include "gstrtpsession.h"
|
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.
2008-09-05 13:52:34 +00:00
|
|
|
#include "gstrtpjitterbuffer.h"
|
2022-04-20 07:53:16 +00:00
|
|
|
#include "gstrtputils.h"
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
|
2011-12-12 02:30:45 +00:00
|
|
|
#include <gst/glib-compat-private.h>
|
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
GST_DEBUG_CATEGORY_STATIC (gst_rtp_bin_debug);
|
|
|
|
#define GST_CAT_DEFAULT gst_rtp_bin_debug
|
|
|
|
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
/* sink pads */
|
|
|
|
static GstStaticPadTemplate rtpbin_recv_rtp_sink_template =
|
2013-12-05 23:53:52 +00:00
|
|
|
GST_STATIC_PAD_TEMPLATE ("recv_rtp_sink_%u",
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
GST_PAD_SINK,
|
|
|
|
GST_PAD_REQUEST,
|
2013-12-05 23:53:52 +00:00
|
|
|
GST_STATIC_CAPS ("application/x-rtp;application/x-srtp")
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
);
|
|
|
|
|
2020-10-06 01:13:30 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin!recv_fec_sink_%u_%u:
|
|
|
|
*
|
|
|
|
* Sink template for receiving Forward Error Correction packets,
|
|
|
|
* in the form recv_fec_sink_<session_idx>_<fec_stream_idx>
|
|
|
|
*
|
|
|
|
* See #GstRTPST_2022_1_FecDec for example usage
|
|
|
|
*
|
|
|
|
* Since: 1.20
|
|
|
|
*/
|
|
|
|
static GstStaticPadTemplate rtpbin_recv_fec_sink_template =
|
|
|
|
GST_STATIC_PAD_TEMPLATE ("recv_fec_sink_%u_%u",
|
|
|
|
GST_PAD_SINK,
|
|
|
|
GST_PAD_REQUEST,
|
|
|
|
GST_STATIC_CAPS ("application/x-rtp")
|
|
|
|
);
|
|
|
|
|
2020-10-06 01:03:13 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin!send_fec_src_%u_%u:
|
|
|
|
*
|
|
|
|
* Src template for sending Forward Error Correction packets,
|
|
|
|
* in the form send_fec_src_<session_idx>_<fec_stream_idx>
|
|
|
|
*
|
|
|
|
* See #GstRTPST_2022_1_FecEnc for example usage
|
|
|
|
*
|
|
|
|
* Since: 1.20
|
|
|
|
*/
|
|
|
|
static GstStaticPadTemplate rtpbin_send_fec_src_template =
|
|
|
|
GST_STATIC_PAD_TEMPLATE ("send_fec_src_%u_%u",
|
|
|
|
GST_PAD_SRC,
|
|
|
|
GST_PAD_SOMETIMES,
|
|
|
|
GST_STATIC_CAPS ("application/x-rtp")
|
|
|
|
);
|
|
|
|
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
static GstStaticPadTemplate rtpbin_recv_rtcp_sink_template =
|
2013-12-05 23:53:52 +00:00
|
|
|
GST_STATIC_PAD_TEMPLATE ("recv_rtcp_sink_%u",
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
GST_PAD_SINK,
|
|
|
|
GST_PAD_REQUEST,
|
2013-12-05 23:53:52 +00:00
|
|
|
GST_STATIC_CAPS ("application/x-rtcp;application/x-srtcp")
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
static GstStaticPadTemplate rtpbin_send_rtp_sink_template =
|
2011-11-04 10:58:22 +00:00
|
|
|
GST_STATIC_PAD_TEMPLATE ("send_rtp_sink_%u",
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
GST_PAD_SINK,
|
|
|
|
GST_PAD_REQUEST,
|
|
|
|
GST_STATIC_CAPS ("application/x-rtp")
|
|
|
|
);
|
|
|
|
|
|
|
|
/* src pads */
|
|
|
|
static GstStaticPadTemplate rtpbin_recv_rtp_src_template =
|
2011-11-04 10:58:22 +00:00
|
|
|
GST_STATIC_PAD_TEMPLATE ("recv_rtp_src_%u_%u_%u",
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
GST_PAD_SRC,
|
|
|
|
GST_PAD_SOMETIMES,
|
|
|
|
GST_STATIC_CAPS ("application/x-rtp")
|
|
|
|
);
|
|
|
|
|
gst/rtpmanager/async_jitter_queue.c: Fix the case where the buffer underruns and does not block.
Original commit message from CVS:
* gst/rtpmanager/async_jitter_queue.c: (signal_waiting_threads),
(async_jitter_queue_pop_intern_unlocked):
Fix the case where the buffer underruns and does not block.
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(create_recv_rtcp), (create_send_rtp), (create_rtcp),
(gst_rtp_bin_request_new_pad):
Rename RTCP send pad, like in the session manager.
Allow getting an RTCP pad for receiving even if we don't receive RTP.
fix handling of send_rtp_src pad.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
When no pt map could be found, fall back to the sinkpad caps.
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_process_rtp),
(gst_rtp_session_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink),
(create_send_rtcp_src):
Fix pad names.
* gst/rtpmanager/rtpsession.c: (source_push_rtp),
(rtp_session_create_source), (rtp_session_process_sr),
(rtp_session_send_rtp), (session_start_rtcp):
* gst/rtpmanager/rtpsession.h:
Unlock session when performing a callback.
Add callbacks for the internal session object.
Fix sending of RTP packets.
first attempt at adding NTP times in the SR packets.
Small debug and doc improvements.
* gst/rtpmanager/rtpsource.c: (rtp_source_send_rtp):
Update stats for SR reports.
2007-04-30 13:41:30 +00:00
|
|
|
static GstStaticPadTemplate rtpbin_send_rtcp_src_template =
|
2013-12-05 23:53:52 +00:00
|
|
|
GST_STATIC_PAD_TEMPLATE ("send_rtcp_src_%u",
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
GST_PAD_SRC,
|
|
|
|
GST_PAD_REQUEST,
|
2013-12-05 23:53:52 +00:00
|
|
|
GST_STATIC_CAPS ("application/x-rtcp;application/x-srtcp")
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
static GstStaticPadTemplate rtpbin_send_rtp_src_template =
|
2013-12-05 23:53:52 +00:00
|
|
|
GST_STATIC_PAD_TEMPLATE ("send_rtp_src_%u",
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
GST_PAD_SRC,
|
|
|
|
GST_PAD_SOMETIMES,
|
2013-12-05 23:53:52 +00:00
|
|
|
GST_STATIC_CAPS ("application/x-rtp;application/x-srtp")
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
);
|
|
|
|
|
2012-01-19 10:33:53 +00:00
|
|
|
#define GST_RTP_BIN_LOCK(bin) g_mutex_lock (&(bin)->priv->bin_lock)
|
|
|
|
#define GST_RTP_BIN_UNLOCK(bin) g_mutex_unlock (&(bin)->priv->bin_lock)
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
|
2008-06-06 13:01:05 +00:00
|
|
|
/* lock to protect dynamic callbacks, like pad-added and new ssrc. */
|
2012-01-19 10:33:53 +00:00
|
|
|
#define GST_RTP_BIN_DYN_LOCK(bin) g_mutex_lock (&(bin)->priv->dyn_lock)
|
|
|
|
#define GST_RTP_BIN_DYN_UNLOCK(bin) g_mutex_unlock (&(bin)->priv->dyn_lock)
|
2008-06-06 13:01:05 +00:00
|
|
|
|
2008-05-27 16:48:10 +00:00
|
|
|
/* lock for shutdown */
|
|
|
|
#define GST_RTP_BIN_SHUTDOWN_LOCK(bin,label) \
|
|
|
|
G_STMT_START { \
|
|
|
|
if (g_atomic_int_get (&bin->priv->shutdown)) \
|
|
|
|
goto label; \
|
2008-06-06 13:01:05 +00:00
|
|
|
GST_RTP_BIN_DYN_LOCK (bin); \
|
2008-05-27 16:48:10 +00:00
|
|
|
if (g_atomic_int_get (&bin->priv->shutdown)) { \
|
2008-06-06 13:01:05 +00:00
|
|
|
GST_RTP_BIN_DYN_UNLOCK (bin); \
|
2008-05-27 16:48:10 +00:00
|
|
|
goto label; \
|
|
|
|
} \
|
|
|
|
} G_STMT_END
|
|
|
|
|
|
|
|
/* unlock for shutdown */
|
|
|
|
#define GST_RTP_BIN_SHUTDOWN_UNLOCK(bin) \
|
2008-06-06 13:01:05 +00:00
|
|
|
GST_RTP_BIN_DYN_UNLOCK (bin); \
|
2008-05-27 16:48:10 +00:00
|
|
|
|
2017-09-14 11:00:56 +00:00
|
|
|
/* Minimum time offset to apply. This compensates for rounding errors in NTP to
|
|
|
|
* RTP timestamp conversions */
|
2018-05-29 14:24:02 +00:00
|
|
|
#define MIN_TS_OFFSET_ROUND_OFF_COMP (4 * GST_MSECOND)
|
2017-09-14 11:00:56 +00:00
|
|
|
|
2007-08-23 21:39:58 +00:00
|
|
|
struct _GstRtpBinPrivate
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
{
|
2012-01-19 10:33:53 +00:00
|
|
|
GMutex bin_lock;
|
gst/rtpmanager/gstrtpbin.c: Calculate and configure the NTP base time so 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-12 18:04:32 +00:00
|
|
|
|
2008-06-06 13:01:05 +00:00
|
|
|
/* lock protecting dynamic adding/removing */
|
2012-01-19 10:33:53 +00:00
|
|
|
GMutex dyn_lock;
|
2008-06-06 13:01:05 +00:00
|
|
|
|
2008-05-27 16:48:10 +00:00
|
|
|
/* if we are shutting down or not */
|
|
|
|
gint shutdown;
|
2009-12-21 14:05:09 +00:00
|
|
|
|
|
|
|
gboolean autoremove;
|
2011-08-08 10:09:41 +00:00
|
|
|
|
2015-06-12 21:06:24 +00:00
|
|
|
/* NTP time in ns of last SR sync used */
|
|
|
|
guint64 last_ntpnstime;
|
2013-12-30 15:28:57 +00:00
|
|
|
|
|
|
|
/* list of extra elements */
|
|
|
|
GList *elements;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* signals and args */
|
|
|
|
enum
|
|
|
|
{
|
2007-04-10 09:14:07 +00:00
|
|
|
SIGNAL_REQUEST_PT_MAP,
|
2009-09-08 11:59:56 +00:00
|
|
|
SIGNAL_PAYLOAD_TYPE_CHANGE,
|
2007-05-14 15:28:36 +00:00
|
|
|
SIGNAL_CLEAR_PT_MAP,
|
2008-11-26 11:44:37 +00:00
|
|
|
SIGNAL_RESET_SYNC,
|
2015-12-10 11:15:52 +00:00
|
|
|
SIGNAL_GET_SESSION,
|
2008-10-07 18:54:41 +00:00
|
|
|
SIGNAL_GET_INTERNAL_SESSION,
|
2018-04-02 21:04:06 +00:00
|
|
|
SIGNAL_GET_STORAGE,
|
2017-11-28 05:02:05 +00:00
|
|
|
SIGNAL_GET_INTERNAL_STORAGE,
|
2020-09-24 17:13:00 +00:00
|
|
|
SIGNAL_CLEAR_SSRC,
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
|
|
|
|
SIGNAL_ON_NEW_SSRC,
|
|
|
|
SIGNAL_ON_SSRC_COLLISION,
|
|
|
|
SIGNAL_ON_SSRC_VALIDATED,
|
2007-09-20 14:34:57 +00:00
|
|
|
SIGNAL_ON_SSRC_ACTIVE,
|
2007-12-10 15:34:19 +00:00
|
|
|
SIGNAL_ON_SSRC_SDES,
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
SIGNAL_ON_BYE_SSRC,
|
|
|
|
SIGNAL_ON_BYE_TIMEOUT,
|
|
|
|
SIGNAL_ON_TIMEOUT,
|
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.
2008-09-05 13:52:34 +00:00
|
|
|
SIGNAL_ON_SENDER_TIMEOUT,
|
2009-03-27 16:44:57 +00:00
|
|
|
SIGNAL_ON_NPT_STOP,
|
2013-12-05 23:53:52 +00:00
|
|
|
|
|
|
|
SIGNAL_REQUEST_RTP_ENCODER,
|
|
|
|
SIGNAL_REQUEST_RTP_DECODER,
|
|
|
|
SIGNAL_REQUEST_RTCP_ENCODER,
|
|
|
|
SIGNAL_REQUEST_RTCP_DECODER,
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
SIGNAL_REQUEST_FEC_DECODER,
|
2021-12-07 22:43:21 +00:00
|
|
|
SIGNAL_REQUEST_FEC_DECODER_FULL,
|
2017-11-28 05:02:05 +00:00
|
|
|
SIGNAL_REQUEST_FEC_ENCODER,
|
|
|
|
|
2017-12-19 17:23:16 +00:00
|
|
|
SIGNAL_REQUEST_JITTERBUFFER,
|
|
|
|
|
2013-12-30 15:52:28 +00:00
|
|
|
SIGNAL_NEW_JITTERBUFFER,
|
2017-11-28 05:02:05 +00:00
|
|
|
SIGNAL_NEW_STORAGE,
|
2013-12-30 15:52:28 +00:00
|
|
|
|
2013-12-31 11:31:25 +00:00
|
|
|
SIGNAL_REQUEST_AUX_SENDER,
|
|
|
|
SIGNAL_REQUEST_AUX_RECEIVER,
|
|
|
|
|
2015-10-02 07:16:32 +00:00
|
|
|
SIGNAL_ON_NEW_SENDER_SSRC,
|
|
|
|
SIGNAL_ON_SENDER_SSRC_ACTIVE,
|
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
SIGNAL_ON_BUNDLED_SSRC,
|
|
|
|
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
LAST_SIGNAL
|
|
|
|
};
|
|
|
|
|
2010-08-26 08:58:26 +00:00
|
|
|
#define DEFAULT_LATENCY_MS 200
|
2012-08-16 23:51:16 +00:00
|
|
|
#define DEFAULT_DROP_ON_LATENCY FALSE
|
2009-06-29 14:37:54 +00:00
|
|
|
#define DEFAULT_SDES NULL
|
2008-04-25 11:32:09 +00:00
|
|
|
#define DEFAULT_DO_LOST FALSE
|
2009-09-08 15:37:15 +00:00
|
|
|
#define DEFAULT_IGNORE_PT FALSE
|
2010-08-27 15:58:47 +00:00
|
|
|
#define DEFAULT_NTP_SYNC FALSE
|
2009-12-21 14:05:09 +00:00
|
|
|
#define DEFAULT_AUTOREMOVE FALSE
|
2009-10-05 11:32:17 +00:00
|
|
|
#define DEFAULT_BUFFER_MODE RTP_JITTER_BUFFER_MODE_SLAVE
|
2010-08-26 08:58:26 +00:00
|
|
|
#define DEFAULT_USE_PIPELINE_CLOCK FALSE
|
2011-08-08 10:15:20 +00:00
|
|
|
#define DEFAULT_RTCP_SYNC GST_RTP_BIN_RTCP_SYNC_ALWAYS
|
2011-08-08 10:09:41 +00:00
|
|
|
#define DEFAULT_RTCP_SYNC_INTERVAL 0
|
2013-07-03 16:41:42 +00:00
|
|
|
#define DEFAULT_DO_SYNC_EVENT FALSE
|
2013-08-23 09:55:02 +00:00
|
|
|
#define DEFAULT_DO_RETRANSMISSION FALSE
|
2015-06-15 17:25:12 +00:00
|
|
|
#define DEFAULT_RTP_PROFILE GST_RTP_PROFILE_AVP
|
2015-06-12 21:29:19 +00:00
|
|
|
#define DEFAULT_NTP_TIME_SOURCE GST_RTP_NTP_TIME_SOURCE_NTP
|
2015-09-16 17:28:11 +00:00
|
|
|
#define DEFAULT_RTCP_SYNC_SEND_TIME TRUE
|
2015-09-21 11:47:21 +00:00
|
|
|
#define DEFAULT_MAX_RTCP_RTP_TIME_DIFF 1000
|
2015-10-07 11:02:12 +00:00
|
|
|
#define DEFAULT_MAX_DROPOUT_TIME 60000
|
|
|
|
#define DEFAULT_MAX_MISORDER_TIME 2000
|
2016-01-05 14:15:16 +00:00
|
|
|
#define DEFAULT_RFC7273_SYNC FALSE
|
2022-03-15 11:56:28 +00:00
|
|
|
#define DEFAULT_ADD_REFERENCE_TIMESTAMP_META FALSE
|
2016-05-06 07:44:42 +00:00
|
|
|
#define DEFAULT_MAX_STREAMS G_MAXUINT
|
2017-10-07 14:55:24 +00:00
|
|
|
#define DEFAULT_MAX_TS_OFFSET_ADJUSTMENT G_GUINT64_CONSTANT(0)
|
|
|
|
#define DEFAULT_MAX_TS_OFFSET G_GINT64_CONSTANT(3000000000)
|
2018-05-29 14:24:02 +00:00
|
|
|
#define DEFAULT_MIN_TS_OFFSET MIN_TS_OFFSET_ROUND_OFF_COMP
|
2021-11-23 08:03:28 +00:00
|
|
|
#define DEFAULT_TS_OFFSET_SMOOTHING_FACTOR 0
|
2022-11-22 16:32:57 +00:00
|
|
|
#define DEFAULT_UPDATE_NTP64_HEADER_EXT TRUE
|
2023-06-16 19:53:11 +00:00
|
|
|
#define DEFAULT_TIMEOUT_INACTIVE_SOURCES TRUE
|
2007-04-25 15:48:46 +00:00
|
|
|
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
enum
|
|
|
|
{
|
2007-04-25 15:48:46 +00:00
|
|
|
PROP_0,
|
2007-12-10 14:03:32 +00:00
|
|
|
PROP_LATENCY,
|
2012-08-16 23:51:16 +00:00
|
|
|
PROP_DROP_ON_LATENCY,
|
2009-06-29 14:37:54 +00:00
|
|
|
PROP_SDES,
|
2008-04-25 11:32:09 +00:00
|
|
|
PROP_DO_LOST,
|
2009-09-08 15:37:15 +00:00
|
|
|
PROP_IGNORE_PT,
|
2010-08-27 15:58:47 +00:00
|
|
|
PROP_NTP_SYNC,
|
2011-08-08 10:15:20 +00:00
|
|
|
PROP_RTCP_SYNC,
|
2011-08-08 10:09:41 +00:00
|
|
|
PROP_RTCP_SYNC_INTERVAL,
|
2009-12-21 14:05:09 +00:00
|
|
|
PROP_AUTOREMOVE,
|
2009-10-05 11:32:17 +00:00
|
|
|
PROP_BUFFER_MODE,
|
2010-08-26 08:58:26 +00:00
|
|
|
PROP_USE_PIPELINE_CLOCK,
|
2013-07-03 16:41:42 +00:00
|
|
|
PROP_DO_SYNC_EVENT,
|
2015-05-21 11:13:56 +00:00
|
|
|
PROP_DO_RETRANSMISSION,
|
2015-06-12 21:29:19 +00:00
|
|
|
PROP_RTP_PROFILE,
|
2015-09-16 17:28:11 +00:00
|
|
|
PROP_NTP_TIME_SOURCE,
|
2015-09-21 11:47:21 +00:00
|
|
|
PROP_RTCP_SYNC_SEND_TIME,
|
2015-10-07 11:02:12 +00:00
|
|
|
PROP_MAX_RTCP_RTP_TIME_DIFF,
|
|
|
|
PROP_MAX_DROPOUT_TIME,
|
2016-01-05 14:15:16 +00:00
|
|
|
PROP_MAX_MISORDER_TIME,
|
2016-05-06 07:44:42 +00:00
|
|
|
PROP_RFC7273_SYNC,
|
2022-03-15 11:56:28 +00:00
|
|
|
PROP_ADD_REFERENCE_TIMESTAMP_META,
|
2017-09-14 09:20:17 +00:00
|
|
|
PROP_MAX_STREAMS,
|
2017-09-14 11:00:56 +00:00
|
|
|
PROP_MAX_TS_OFFSET_ADJUSTMENT,
|
2017-11-28 05:02:05 +00:00
|
|
|
PROP_MAX_TS_OFFSET,
|
2018-05-29 14:24:02 +00:00
|
|
|
PROP_MIN_TS_OFFSET,
|
2021-11-23 08:03:28 +00:00
|
|
|
PROP_TS_OFFSET_SMOOTHING_FACTOR,
|
2020-10-06 01:13:30 +00:00
|
|
|
PROP_FEC_DECODERS,
|
2020-10-06 01:03:13 +00:00
|
|
|
PROP_FEC_ENCODERS,
|
2022-11-22 16:32:57 +00:00
|
|
|
PROP_UPDATE_NTP64_HEADER_EXT,
|
2023-06-16 19:53:11 +00:00
|
|
|
PROP_TIMEOUT_INACTIVE_SOURCES,
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
};
|
|
|
|
|
2011-08-08 10:15:20 +00:00
|
|
|
#define GST_RTP_BIN_RTCP_SYNC_TYPE (gst_rtp_bin_rtcp_sync_get_type())
|
|
|
|
static GType
|
|
|
|
gst_rtp_bin_rtcp_sync_get_type (void)
|
|
|
|
{
|
|
|
|
static GType rtcp_sync_type = 0;
|
|
|
|
static const GEnumValue rtcp_sync_types[] = {
|
|
|
|
{GST_RTP_BIN_RTCP_SYNC_ALWAYS, "always", "always"},
|
|
|
|
{GST_RTP_BIN_RTCP_SYNC_INITIAL, "initial", "initial"},
|
2024-04-17 10:44:38 +00:00
|
|
|
{GST_RTP_BIN_RTCP_SYNC_RTP_INFO, "rtp-info", "rtp-info"},
|
2011-08-08 10:15:20 +00:00
|
|
|
{0, NULL, NULL},
|
|
|
|
};
|
|
|
|
|
|
|
|
if (!rtcp_sync_type) {
|
|
|
|
rtcp_sync_type = g_enum_register_static ("GstRTCPSync", rtcp_sync_types);
|
|
|
|
}
|
|
|
|
return rtcp_sync_type;
|
|
|
|
}
|
|
|
|
|
2007-04-03 11:35:39 +00:00
|
|
|
/* helper objects */
|
2007-08-23 21:39:58 +00:00
|
|
|
typedef struct _GstRtpBinSession GstRtpBinSession;
|
|
|
|
typedef struct _GstRtpBinStream GstRtpBinStream;
|
|
|
|
typedef struct _GstRtpBinClient GstRtpBinClient;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
static guint gst_rtp_bin_signals[LAST_SIGNAL] = { 0 };
|
|
|
|
|
2007-04-12 08:18:32 +00:00
|
|
|
static GstCaps *pt_map_requested (GstElement * element, guint pt,
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBinSession * session);
|
2009-09-08 11:59:56 +00:00
|
|
|
static void payload_type_change (GstElement * element, guint pt,
|
|
|
|
GstRtpBinSession * session);
|
2012-03-07 14:22:36 +00:00
|
|
|
static void remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session);
|
|
|
|
static void remove_recv_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session);
|
2020-10-06 01:13:30 +00:00
|
|
|
static void remove_recv_fec (GstRtpBin * rtpbin, GstRtpBinSession * session);
|
2012-03-07 14:22:36 +00:00
|
|
|
static void remove_send_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session);
|
2020-10-06 01:03:13 +00:00
|
|
|
static void remove_send_fec (GstRtpBin * rtpbin, GstRtpBinSession * session);
|
2012-03-07 14:22:36 +00:00
|
|
|
static void remove_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session);
|
2009-09-08 11:18:29 +00:00
|
|
|
static void free_client (GstRtpBinClient * client, GstRtpBin * bin);
|
2011-09-26 21:42:51 +00:00
|
|
|
static void free_stream (GstRtpBinStream * stream, GstRtpBin * bin);
|
2016-11-16 07:56:34 +00:00
|
|
|
static GstRtpBinSession *create_session (GstRtpBin * rtpbin, gint id);
|
|
|
|
static GstPad *complete_session_sink (GstRtpBin * rtpbin,
|
2018-12-19 13:28:54 +00:00
|
|
|
GstRtpBinSession * session);
|
2016-11-16 07:56:34 +00:00
|
|
|
static void
|
|
|
|
complete_session_receiver (GstRtpBin * rtpbin, GstRtpBinSession * session,
|
|
|
|
guint sessid);
|
|
|
|
static GstPad *complete_session_rtcp (GstRtpBin * rtpbin,
|
2018-12-19 13:28:54 +00:00
|
|
|
GstRtpBinSession * session, guint sessid);
|
2017-12-19 17:23:16 +00:00
|
|
|
static GstElement *session_request_element (GstRtpBinSession * session,
|
|
|
|
guint signal);
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
|
2024-04-17 14:01:21 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_RTP_BIN_STREAM_SYNCED_NONE,
|
|
|
|
GST_RTP_BIN_STREAM_SYNCED_RTCP,
|
|
|
|
GST_RTP_BIN_STREAM_SYNCED_RTP_INFO
|
|
|
|
} GstRtpBinStreamSynced;
|
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
/* Manages the RTP stream for one SSRC.
|
|
|
|
*
|
2019-09-02 12:27:35 +00:00
|
|
|
* We pipe the stream (coming from the SSRC demuxer) into a jitterbuffer.
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
* If we see an SDES RTCP packet that links multiple SSRCs together based on a
|
2007-08-23 21:39:58 +00:00
|
|
|
* common CNAME, we create a GstRtpBinClient structure to group the SSRCs
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
* together (see below).
|
|
|
|
*/
|
2007-08-23 21:39:58 +00:00
|
|
|
struct _GstRtpBinStream
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
{
|
|
|
|
/* the SSRC of this stream */
|
|
|
|
guint32 ssrc;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
/* parent bin */
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBin *bin;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
/* the session this SSRC belongs to */
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBinSession *session;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
/* the jitterbuffer of the SSRC */
|
|
|
|
GstElement *buffer;
|
2009-05-21 23:16:11 +00:00
|
|
|
gulong buffer_handlesync_sig;
|
|
|
|
gulong buffer_ptreq_sig;
|
|
|
|
gulong buffer_ntpstop_sig;
|
2009-10-05 17:45:35 +00:00
|
|
|
gint percent;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
/* the PT demuxer of the SSRC */
|
|
|
|
GstElement *demux;
|
|
|
|
gulong demux_newpad_sig;
|
2009-06-29 16:48:33 +00:00
|
|
|
gulong demux_padremoved_sig;
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
gulong demux_ptreq_sig;
|
2009-09-08 11:59:56 +00:00
|
|
|
gulong demux_ptchange_sig;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
2024-04-17 14:01:21 +00:00
|
|
|
/* if we have synced this stream */
|
|
|
|
GstRtpBinStreamSynced have_sync;
|
|
|
|
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
/* mapping to local RTP and NTP time */
|
2024-04-17 14:01:21 +00:00
|
|
|
gint64 rt_delta; /* based on RTCP */
|
|
|
|
gint64 rtp_delta; /* based on RTP-Info */
|
|
|
|
|
|
|
|
/* base RTP time */
|
|
|
|
gint64 base_rtptime;
|
|
|
|
guint64 base_time;
|
|
|
|
|
|
|
|
/* clock-base for RTP-Info */
|
|
|
|
guint64 clock_base;
|
|
|
|
|
|
|
|
/* Smoothing of ts-offset adjustments */
|
2019-02-26 15:39:55 +00:00
|
|
|
gint64 avg_ts_offset;
|
|
|
|
gboolean is_initialized;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
};
|
|
|
|
|
2012-01-19 10:33:53 +00:00
|
|
|
#define GST_RTP_SESSION_LOCK(sess) g_mutex_lock (&(sess)->lock)
|
|
|
|
#define GST_RTP_SESSION_UNLOCK(sess) g_mutex_unlock (&(sess)->lock)
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
/* Manages the receiving end of the packets.
|
|
|
|
*
|
|
|
|
* There is one such structure for each RTP session (audio/video/...).
|
|
|
|
* We get the RTP/RTCP packets and stuff them into the session manager. From
|
|
|
|
* there they are pushed into an SSRC demuxer that splits the stream based on
|
|
|
|
* SSRC. Each of the SSRC streams go into their own jitterbuffer (managed with
|
2007-08-23 21:39:58 +00:00
|
|
|
* the GstRtpBinStream above).
|
2017-11-28 05:02:05 +00:00
|
|
|
*
|
|
|
|
* Before the SSRC demuxer, a storage element may be inserted for the purpose
|
|
|
|
* of Forward Error Correction.
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
*/
|
2007-08-23 21:39:58 +00:00
|
|
|
struct _GstRtpBinSession
|
2007-04-03 11:35:39 +00:00
|
|
|
{
|
|
|
|
/* session id */
|
|
|
|
gint id;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
/* the parent bin */
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBin *bin;
|
2007-04-03 11:35:39 +00:00
|
|
|
/* the session element */
|
|
|
|
GstElement *session;
|
|
|
|
/* the SSRC demuxer */
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
GstElement *demux;
|
|
|
|
gulong demux_newpad_sig;
|
2009-05-21 23:43:50 +00:00
|
|
|
gulong demux_padremoved_sig;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
/* Fec support */
|
|
|
|
GstElement *storage;
|
|
|
|
|
2012-01-19 10:33:53 +00:00
|
|
|
GMutex lock;
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
|
2007-08-23 21:39:58 +00:00
|
|
|
/* list of GstRtpBinStream */
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
GSList *streams;
|
2007-04-03 11:35:39 +00:00
|
|
|
|
2013-12-30 16:36:42 +00:00
|
|
|
/* list of elements */
|
|
|
|
GSList *elements;
|
2013-12-05 23:53:52 +00:00
|
|
|
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
/* mapping of payload type to caps */
|
|
|
|
GHashTable *ptmap;
|
|
|
|
|
2007-04-03 11:35:39 +00:00
|
|
|
/* the pads of the session */
|
|
|
|
GstPad *recv_rtp_sink;
|
2009-05-22 13:36:17 +00:00
|
|
|
GstPad *recv_rtp_sink_ghost;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
GstPad *recv_rtp_src;
|
2007-04-03 11:35:39 +00:00
|
|
|
GstPad *recv_rtcp_sink;
|
2009-05-22 13:36:17 +00:00
|
|
|
GstPad *recv_rtcp_sink_ghost;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
GstPad *sync_src;
|
2007-04-03 11:35:39 +00:00
|
|
|
GstPad *send_rtp_sink;
|
2009-05-22 13:36:17 +00:00
|
|
|
GstPad *send_rtp_sink_ghost;
|
2009-05-21 22:44:51 +00:00
|
|
|
GstPad *send_rtp_src_ghost;
|
gst/rtpmanager/async_jitter_queue.c: Fix the case where the buffer underruns and does not block.
Original commit message from CVS:
* gst/rtpmanager/async_jitter_queue.c: (signal_waiting_threads),
(async_jitter_queue_pop_intern_unlocked):
Fix the case where the buffer underruns and does not block.
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(create_recv_rtcp), (create_send_rtp), (create_rtcp),
(gst_rtp_bin_request_new_pad):
Rename RTCP send pad, like in the session manager.
Allow getting an RTCP pad for receiving even if we don't receive RTP.
fix handling of send_rtp_src pad.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
When no pt map could be found, fall back to the sinkpad caps.
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_process_rtp),
(gst_rtp_session_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink),
(create_send_rtcp_src):
Fix pad names.
* gst/rtpmanager/rtpsession.c: (source_push_rtp),
(rtp_session_create_source), (rtp_session_process_sr),
(rtp_session_send_rtp), (session_start_rtcp):
* gst/rtpmanager/rtpsession.h:
Unlock session when performing a callback.
Add callbacks for the internal session object.
Fix sending of RTP packets.
first attempt at adding NTP times in the SR packets.
Small debug and doc improvements.
* gst/rtpmanager/rtpsource.c: (rtp_source_send_rtp):
Update stats for SR reports.
2007-04-30 13:41:30 +00:00
|
|
|
GstPad *send_rtcp_src;
|
2009-05-22 13:36:17 +00:00
|
|
|
GstPad *send_rtcp_src_ghost;
|
2020-10-06 01:13:30 +00:00
|
|
|
|
|
|
|
GSList *recv_fec_sinks;
|
|
|
|
GSList *recv_fec_sink_ghosts;
|
2021-11-09 04:10:06 +00:00
|
|
|
/* fec decoder placed before the rtpjitterbuffer but after the rtpssrcdemux.
|
|
|
|
* XXX: This does not yet support multiple ssrc's in the same rtp session
|
|
|
|
*/
|
|
|
|
GstElement *early_fec_decoder;
|
2020-10-06 01:03:13 +00:00
|
|
|
|
|
|
|
GSList *send_fec_src_ghosts;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
};
|
2007-04-03 11:35:39 +00:00
|
|
|
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
/* Manages the RTP streams that come from one client and should therefore be
|
|
|
|
* synchronized.
|
|
|
|
*/
|
|
|
|
struct _GstRtpBinClient
|
|
|
|
{
|
|
|
|
/* the common CNAME for the streams */
|
|
|
|
gchar *cname;
|
|
|
|
guint cname_len;
|
|
|
|
|
|
|
|
/* the streams */
|
|
|
|
guint nstreams;
|
|
|
|
GSList *streams;
|
|
|
|
};
|
|
|
|
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
/* find a session with the given id. Must be called with RTP_BIN_LOCK */
|
2007-08-23 21:39:58 +00:00
|
|
|
static GstRtpBinSession *
|
|
|
|
find_session_by_id (GstRtpBin * rtpbin, gint id)
|
2007-04-03 11:35:39 +00:00
|
|
|
{
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
GSList *walk;
|
2007-04-03 11:35:39 +00:00
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
for (walk = rtpbin->sessions; walk; walk = g_slist_next (walk)) {
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBinSession *sess = (GstRtpBinSession *) walk->data;
|
2007-04-03 11:35:39 +00:00
|
|
|
|
|
|
|
if (sess->id == id)
|
|
|
|
return sess;
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2020-10-06 01:13:30 +00:00
|
|
|
static gboolean
|
|
|
|
pad_is_recv_fec (GstRtpBinSession * session, GstPad * pad)
|
|
|
|
{
|
|
|
|
return g_slist_find (session->recv_fec_sink_ghosts, pad) != NULL;
|
|
|
|
}
|
|
|
|
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
/* find a session with the given request pad. Must be called with RTP_BIN_LOCK */
|
|
|
|
static GstRtpBinSession *
|
|
|
|
find_session_by_pad (GstRtpBin * rtpbin, GstPad * pad)
|
|
|
|
{
|
|
|
|
GSList *walk;
|
|
|
|
|
|
|
|
for (walk = rtpbin->sessions; walk; walk = g_slist_next (walk)) {
|
|
|
|
GstRtpBinSession *sess = (GstRtpBinSession *) walk->data;
|
|
|
|
|
2009-05-22 13:45:19 +00:00
|
|
|
if ((sess->recv_rtp_sink_ghost == pad) ||
|
|
|
|
(sess->recv_rtcp_sink_ghost == pad) ||
|
2020-10-06 01:13:30 +00:00
|
|
|
(sess->send_rtp_sink_ghost == pad) ||
|
|
|
|
(sess->send_rtcp_src_ghost == pad) || pad_is_recv_fec (sess, pad))
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
return sess;
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
static void
|
2007-08-23 21:39:58 +00:00
|
|
|
on_new_ssrc (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
{
|
|
|
|
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_NEW_SSRC], 0,
|
|
|
|
sess->id, ssrc);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2007-08-23 21:39:58 +00:00
|
|
|
on_ssrc_collision (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
{
|
|
|
|
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_SSRC_COLLISION], 0,
|
|
|
|
sess->id, ssrc);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2007-08-23 21:39:58 +00:00
|
|
|
on_ssrc_validated (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
{
|
|
|
|
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_SSRC_VALIDATED], 0,
|
|
|
|
sess->id, ssrc);
|
|
|
|
}
|
|
|
|
|
2007-09-20 14:34:57 +00:00
|
|
|
static void
|
|
|
|
on_ssrc_active (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
|
|
|
{
|
|
|
|
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_SSRC_ACTIVE], 0,
|
|
|
|
sess->id, ssrc);
|
|
|
|
}
|
|
|
|
|
2007-12-10 15:34:19 +00:00
|
|
|
static void
|
|
|
|
on_ssrc_sdes (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
|
|
|
{
|
|
|
|
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_SSRC_SDES], 0,
|
|
|
|
sess->id, ssrc);
|
|
|
|
}
|
|
|
|
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
static void
|
2007-08-23 21:39:58 +00:00
|
|
|
on_bye_ssrc (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
{
|
|
|
|
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_BYE_SSRC], 0,
|
|
|
|
sess->id, ssrc);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2007-08-23 21:39:58 +00:00
|
|
|
on_bye_timeout (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
{
|
|
|
|
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_BYE_TIMEOUT], 0,
|
|
|
|
sess->id, ssrc);
|
2009-12-21 14:05:09 +00:00
|
|
|
|
|
|
|
if (sess->bin->priv->autoremove)
|
|
|
|
g_signal_emit_by_name (sess->demux, "clear-ssrc", ssrc, NULL);
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2007-08-23 21:39:58 +00:00
|
|
|
on_timeout (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
{
|
|
|
|
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_TIMEOUT], 0,
|
|
|
|
sess->id, ssrc);
|
2009-12-21 14:05:09 +00:00
|
|
|
|
|
|
|
if (sess->bin->priv->autoremove)
|
|
|
|
g_signal_emit_by_name (sess->demux, "clear-ssrc", ssrc, NULL);
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
}
|
|
|
|
|
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.
2008-09-05 13:52:34 +00:00
|
|
|
static void
|
|
|
|
on_sender_timeout (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
|
|
|
{
|
|
|
|
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_SENDER_TIMEOUT], 0,
|
|
|
|
sess->id, ssrc);
|
|
|
|
}
|
|
|
|
|
2009-03-27 16:44:57 +00:00
|
|
|
static void
|
|
|
|
on_npt_stop (GstElement * jbuf, GstRtpBinStream * stream)
|
|
|
|
{
|
|
|
|
g_signal_emit (stream->bin, gst_rtp_bin_signals[SIGNAL_ON_NPT_STOP], 0,
|
|
|
|
stream->session->id, stream->ssrc);
|
|
|
|
}
|
|
|
|
|
2015-10-02 07:16:32 +00:00
|
|
|
static void
|
|
|
|
on_new_sender_ssrc (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
|
|
|
{
|
|
|
|
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_NEW_SENDER_SSRC], 0,
|
|
|
|
sess->id, ssrc);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
on_sender_ssrc_active (GstElement * session, guint32 ssrc,
|
|
|
|
GstRtpBinSession * sess)
|
|
|
|
{
|
|
|
|
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_SENDER_SSRC_ACTIVE],
|
|
|
|
0, sess->id, ssrc);
|
|
|
|
}
|
|
|
|
|
2009-05-21 23:43:50 +00:00
|
|
|
/* must be called with the SESSION lock */
|
|
|
|
static GstRtpBinStream *
|
|
|
|
find_stream_by_ssrc (GstRtpBinSession * session, guint32 ssrc)
|
|
|
|
{
|
|
|
|
GSList *walk;
|
|
|
|
|
|
|
|
for (walk = session->streams; walk; walk = g_slist_next (walk)) {
|
|
|
|
GstRtpBinStream *stream = (GstRtpBinStream *) walk->data;
|
|
|
|
|
|
|
|
if (stream->ssrc == ssrc)
|
|
|
|
return stream;
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-05-22 14:41:19 +00:00
|
|
|
ssrc_demux_pad_removed (GstElement * element, guint ssrc, GstPad * pad,
|
2009-05-21 23:43:50 +00:00
|
|
|
GstRtpBinSession * session)
|
|
|
|
{
|
|
|
|
GstRtpBinStream *stream = NULL;
|
2011-09-26 21:42:51 +00:00
|
|
|
GstRtpBin *rtpbin;
|
|
|
|
|
|
|
|
rtpbin = session->bin;
|
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
2009-05-21 23:43:50 +00:00
|
|
|
|
|
|
|
GST_RTP_SESSION_LOCK (session);
|
2009-05-22 14:41:19 +00:00
|
|
|
if ((stream = find_stream_by_ssrc (session, ssrc)))
|
2009-05-21 23:43:50 +00:00
|
|
|
session->streams = g_slist_remove (session->streams, stream);
|
|
|
|
GST_RTP_SESSION_UNLOCK (session);
|
2009-05-22 14:41:19 +00:00
|
|
|
|
|
|
|
if (stream)
|
2011-09-26 21:42:51 +00:00
|
|
|
free_stream (stream, rtpbin);
|
|
|
|
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
2009-05-21 23:43:50 +00:00
|
|
|
}
|
|
|
|
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
/* create a session with the given id. Must be called with RTP_BIN_LOCK */
|
2007-08-23 21:39:58 +00:00
|
|
|
static GstRtpBinSession *
|
|
|
|
create_session (GstRtpBin * rtpbin, gint id)
|
2007-04-03 11:35:39 +00:00
|
|
|
{
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBinSession *sess;
|
configure.ac: Disable rtpmanager for now because it depends on CVS -base.
Original commit message from CVS:
* configure.ac:
Disable rtpmanager for now because it depends on CVS -base.
* gst/rtpmanager/Makefile.am:
Added new files for session manager.
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(create_stream), (pt_map_requested), (new_ssrc_pad_found):
Some cleanups.
the session manager can now also request a pt-map.
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (rtcp_thread), (start_rtcp_thread),
(stop_rtcp_thread), (gst_rtp_session_change_state),
(gst_rtp_session_process_rtp), (gst_rtp_session_send_rtp),
(gst_rtp_session_send_rtcp), (gst_rtp_session_clock_rate),
(gst_rtp_session_get_time), (gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_event_send_rtp_sink),
(gst_rtp_session_chain_send_rtp), (create_send_rtcp_src),
(gst_rtp_session_request_new_pad):
* gst/rtpmanager/gstrtpsession.h:
We can ask for pt-map now too when the session manager needs it.
Hook up to the new session manager, implement the needed callbacks for
pushing data, getting clock time and requesting clock-rates.
Rename rtcp_src to send_rtcp_src to make it clear that this RTCP is to
be send to clients.
Add code to start and stop the thread that will schedule RTCP through
the session manager.
* gst/rtpmanager/rtpsession.c: (rtp_session_class_init),
(rtp_session_init), (rtp_session_finalize),
(rtp_session_set_property), (rtp_session_get_property),
(on_new_ssrc), (on_ssrc_collision), (on_ssrc_validated),
(on_bye_ssrc), (rtp_session_new), (rtp_session_set_callbacks),
(rtp_session_set_bandwidth), (rtp_session_get_bandwidth),
(rtp_session_set_rtcp_bandwidth), (rtp_session_get_rtcp_bandwidth),
(source_push_rtp), (source_clock_rate), (check_collision),
(obtain_source), (rtp_session_add_source),
(rtp_session_get_num_sources),
(rtp_session_get_num_active_sources),
(rtp_session_get_source_by_ssrc),
(rtp_session_get_source_by_cname), (rtp_session_create_source),
(update_arrival_stats), (rtp_session_process_rtp),
(rtp_session_process_sr), (rtp_session_process_rr),
(rtp_session_process_sdes), (rtp_session_process_bye),
(rtp_session_process_app), (rtp_session_process_rtcp),
(rtp_session_send_rtp), (rtp_session_get_rtcp_interval),
(rtp_session_produce_rtcp):
* gst/rtpmanager/rtpsession.h:
The advanced beginnings of the main session manager that handles the
participant database of RTPSources, SSRC probation, SSRC collisions,
parse RTCP to update source stats. etc..
* gst/rtpmanager/rtpsource.c: (rtp_source_class_init),
(rtp_source_init), (rtp_source_finalize), (rtp_source_new),
(rtp_source_set_callbacks), (rtp_source_set_as_csrc),
(rtp_source_set_rtp_from), (rtp_source_set_rtcp_from),
(push_packet), (get_clock_rate), (calculate_jitter),
(rtp_source_process_rtp), (rtp_source_process_bye),
(rtp_source_send_rtp), (rtp_source_process_sr),
(rtp_source_process_rb):
* gst/rtpmanager/rtpsource.h:
Object that encapsulates an SSRC and its state in the database.
Calculates the jitter and transit times of data packets.
* gst/rtpmanager/rtpstats.c: (rtp_stats_init_defaults),
(rtp_stats_calculate_rtcp_interval), (rtp_stats_add_rtcp_jitter):
* gst/rtpmanager/rtpstats.h:
Various stats regarding the session and sources.
Used to calculate the RTCP interval.
2007-04-18 18:58:53 +00:00
|
|
|
GstElement *session, *demux;
|
2017-11-28 05:02:05 +00:00
|
|
|
GstElement *storage = NULL;
|
2009-05-22 10:20:13 +00:00
|
|
|
GstState target;
|
2007-04-03 11:35:39 +00:00
|
|
|
|
2011-11-24 00:52:40 +00:00
|
|
|
if (!(session = gst_element_factory_make ("rtpsession", NULL)))
|
2007-04-03 11:35:39 +00:00
|
|
|
goto no_session;
|
|
|
|
|
2011-11-24 00:52:40 +00:00
|
|
|
if (!(demux = gst_element_factory_make ("rtpssrcdemux", NULL)))
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
goto no_demux;
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
if (!(storage = gst_element_factory_make ("rtpstorage", NULL)))
|
|
|
|
goto no_storage;
|
|
|
|
|
2018-11-06 21:02:21 +00:00
|
|
|
/* need to sink the storage or otherwise signal handlers from bindings will
|
|
|
|
* take ownership of it and we don't own it anymore */
|
|
|
|
gst_object_ref_sink (storage);
|
2017-11-28 05:02:05 +00:00
|
|
|
g_signal_emit (rtpbin, gst_rtp_bin_signals[SIGNAL_NEW_STORAGE], 0, storage,
|
|
|
|
id);
|
|
|
|
|
2007-08-23 21:39:58 +00:00
|
|
|
sess = g_new0 (GstRtpBinSession, 1);
|
2012-01-19 10:33:53 +00:00
|
|
|
g_mutex_init (&sess->lock);
|
2007-04-03 11:35:39 +00:00
|
|
|
sess->id = id;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
sess->bin = rtpbin;
|
configure.ac: Disable rtpmanager for now because it depends on CVS -base.
Original commit message from CVS:
* configure.ac:
Disable rtpmanager for now because it depends on CVS -base.
* gst/rtpmanager/Makefile.am:
Added new files for session manager.
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(create_stream), (pt_map_requested), (new_ssrc_pad_found):
Some cleanups.
the session manager can now also request a pt-map.
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (rtcp_thread), (start_rtcp_thread),
(stop_rtcp_thread), (gst_rtp_session_change_state),
(gst_rtp_session_process_rtp), (gst_rtp_session_send_rtp),
(gst_rtp_session_send_rtcp), (gst_rtp_session_clock_rate),
(gst_rtp_session_get_time), (gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_event_send_rtp_sink),
(gst_rtp_session_chain_send_rtp), (create_send_rtcp_src),
(gst_rtp_session_request_new_pad):
* gst/rtpmanager/gstrtpsession.h:
We can ask for pt-map now too when the session manager needs it.
Hook up to the new session manager, implement the needed callbacks for
pushing data, getting clock time and requesting clock-rates.
Rename rtcp_src to send_rtcp_src to make it clear that this RTCP is to
be send to clients.
Add code to start and stop the thread that will schedule RTCP through
the session manager.
* gst/rtpmanager/rtpsession.c: (rtp_session_class_init),
(rtp_session_init), (rtp_session_finalize),
(rtp_session_set_property), (rtp_session_get_property),
(on_new_ssrc), (on_ssrc_collision), (on_ssrc_validated),
(on_bye_ssrc), (rtp_session_new), (rtp_session_set_callbacks),
(rtp_session_set_bandwidth), (rtp_session_get_bandwidth),
(rtp_session_set_rtcp_bandwidth), (rtp_session_get_rtcp_bandwidth),
(source_push_rtp), (source_clock_rate), (check_collision),
(obtain_source), (rtp_session_add_source),
(rtp_session_get_num_sources),
(rtp_session_get_num_active_sources),
(rtp_session_get_source_by_ssrc),
(rtp_session_get_source_by_cname), (rtp_session_create_source),
(update_arrival_stats), (rtp_session_process_rtp),
(rtp_session_process_sr), (rtp_session_process_rr),
(rtp_session_process_sdes), (rtp_session_process_bye),
(rtp_session_process_app), (rtp_session_process_rtcp),
(rtp_session_send_rtp), (rtp_session_get_rtcp_interval),
(rtp_session_produce_rtcp):
* gst/rtpmanager/rtpsession.h:
The advanced beginnings of the main session manager that handles the
participant database of RTPSources, SSRC probation, SSRC collisions,
parse RTCP to update source stats. etc..
* gst/rtpmanager/rtpsource.c: (rtp_source_class_init),
(rtp_source_init), (rtp_source_finalize), (rtp_source_new),
(rtp_source_set_callbacks), (rtp_source_set_as_csrc),
(rtp_source_set_rtp_from), (rtp_source_set_rtcp_from),
(push_packet), (get_clock_rate), (calculate_jitter),
(rtp_source_process_rtp), (rtp_source_process_bye),
(rtp_source_send_rtp), (rtp_source_process_sr),
(rtp_source_process_rb):
* gst/rtpmanager/rtpsource.h:
Object that encapsulates an SSRC and its state in the database.
Calculates the jitter and transit times of data packets.
* gst/rtpmanager/rtpstats.c: (rtp_stats_init_defaults),
(rtp_stats_calculate_rtcp_interval), (rtp_stats_add_rtcp_jitter):
* gst/rtpmanager/rtpstats.h:
Various stats regarding the session and sources.
Used to calculate the RTCP interval.
2007-04-18 18:58:53 +00:00
|
|
|
sess->session = session;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
sess->demux = demux;
|
2017-11-28 05:02:05 +00:00
|
|
|
sess->storage = storage;
|
2016-11-16 07:56:34 +00:00
|
|
|
|
2008-04-21 08:26:37 +00:00
|
|
|
sess->ptmap = g_hash_table_new_full (NULL, NULL, NULL,
|
|
|
|
(GDestroyNotify) gst_caps_unref);
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
rtpbin->sessions = g_slist_prepend (rtpbin->sessions, sess);
|
|
|
|
|
2007-12-10 14:03:32 +00:00
|
|
|
/* configure SDES items */
|
|
|
|
GST_OBJECT_LOCK (rtpbin);
|
2016-09-14 14:49:26 +00:00
|
|
|
g_object_set (demux, "max-streams", rtpbin->max_streams, NULL);
|
2015-06-12 21:29:19 +00:00
|
|
|
g_object_set (session, "sdes", rtpbin->sdes, "rtp-profile",
|
2015-09-16 17:28:11 +00:00
|
|
|
rtpbin->rtp_profile, "rtcp-sync-send-time", rtpbin->rtcp_sync_send_time,
|
|
|
|
NULL);
|
2015-06-12 21:29:19 +00:00
|
|
|
if (rtpbin->use_pipeline_clock)
|
|
|
|
g_object_set (session, "use-pipeline-clock", rtpbin->use_pipeline_clock,
|
|
|
|
NULL);
|
|
|
|
else
|
|
|
|
g_object_set (session, "ntp-time-source", rtpbin->ntp_time_source, NULL);
|
2015-10-07 11:02:12 +00:00
|
|
|
|
|
|
|
g_object_set (session, "max-dropout-time", rtpbin->max_dropout_time,
|
|
|
|
"max-misorder-time", rtpbin->max_misorder_time, NULL);
|
2022-11-22 16:32:57 +00:00
|
|
|
|
|
|
|
g_object_set (session, "update-ntp64-header-ext",
|
|
|
|
rtpbin->update_ntp64_header_ext, NULL);
|
|
|
|
|
2023-06-16 19:53:11 +00:00
|
|
|
g_object_set (session, "timeout-inactive-sources",
|
|
|
|
rtpbin->timeout_inactive_sources, NULL);
|
|
|
|
|
2007-12-10 14:03:32 +00:00
|
|
|
GST_OBJECT_UNLOCK (rtpbin);
|
2007-09-15 18:48:03 +00:00
|
|
|
|
configure.ac: Disable rtpmanager for now because it depends on CVS -base.
Original commit message from CVS:
* configure.ac:
Disable rtpmanager for now because it depends on CVS -base.
* gst/rtpmanager/Makefile.am:
Added new files for session manager.
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(create_stream), (pt_map_requested), (new_ssrc_pad_found):
Some cleanups.
the session manager can now also request a pt-map.
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (rtcp_thread), (start_rtcp_thread),
(stop_rtcp_thread), (gst_rtp_session_change_state),
(gst_rtp_session_process_rtp), (gst_rtp_session_send_rtp),
(gst_rtp_session_send_rtcp), (gst_rtp_session_clock_rate),
(gst_rtp_session_get_time), (gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_event_send_rtp_sink),
(gst_rtp_session_chain_send_rtp), (create_send_rtcp_src),
(gst_rtp_session_request_new_pad):
* gst/rtpmanager/gstrtpsession.h:
We can ask for pt-map now too when the session manager needs it.
Hook up to the new session manager, implement the needed callbacks for
pushing data, getting clock time and requesting clock-rates.
Rename rtcp_src to send_rtcp_src to make it clear that this RTCP is to
be send to clients.
Add code to start and stop the thread that will schedule RTCP through
the session manager.
* gst/rtpmanager/rtpsession.c: (rtp_session_class_init),
(rtp_session_init), (rtp_session_finalize),
(rtp_session_set_property), (rtp_session_get_property),
(on_new_ssrc), (on_ssrc_collision), (on_ssrc_validated),
(on_bye_ssrc), (rtp_session_new), (rtp_session_set_callbacks),
(rtp_session_set_bandwidth), (rtp_session_get_bandwidth),
(rtp_session_set_rtcp_bandwidth), (rtp_session_get_rtcp_bandwidth),
(source_push_rtp), (source_clock_rate), (check_collision),
(obtain_source), (rtp_session_add_source),
(rtp_session_get_num_sources),
(rtp_session_get_num_active_sources),
(rtp_session_get_source_by_ssrc),
(rtp_session_get_source_by_cname), (rtp_session_create_source),
(update_arrival_stats), (rtp_session_process_rtp),
(rtp_session_process_sr), (rtp_session_process_rr),
(rtp_session_process_sdes), (rtp_session_process_bye),
(rtp_session_process_app), (rtp_session_process_rtcp),
(rtp_session_send_rtp), (rtp_session_get_rtcp_interval),
(rtp_session_produce_rtcp):
* gst/rtpmanager/rtpsession.h:
The advanced beginnings of the main session manager that handles the
participant database of RTPSources, SSRC probation, SSRC collisions,
parse RTCP to update source stats. etc..
* gst/rtpmanager/rtpsource.c: (rtp_source_class_init),
(rtp_source_init), (rtp_source_finalize), (rtp_source_new),
(rtp_source_set_callbacks), (rtp_source_set_as_csrc),
(rtp_source_set_rtp_from), (rtp_source_set_rtcp_from),
(push_packet), (get_clock_rate), (calculate_jitter),
(rtp_source_process_rtp), (rtp_source_process_bye),
(rtp_source_send_rtp), (rtp_source_process_sr),
(rtp_source_process_rb):
* gst/rtpmanager/rtpsource.h:
Object that encapsulates an SSRC and its state in the database.
Calculates the jitter and transit times of data packets.
* gst/rtpmanager/rtpstats.c: (rtp_stats_init_defaults),
(rtp_stats_calculate_rtcp_interval), (rtp_stats_add_rtcp_jitter):
* gst/rtpmanager/rtpstats.h:
Various stats regarding the session and sources.
Used to calculate the RTCP interval.
2007-04-18 18:58:53 +00:00
|
|
|
/* provide clock_rate to the session manager when needed */
|
|
|
|
g_signal_connect (session, "request-pt-map",
|
|
|
|
(GCallback) pt_map_requested, sess);
|
|
|
|
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
g_signal_connect (sess->session, "on-new-ssrc",
|
|
|
|
(GCallback) on_new_ssrc, sess);
|
|
|
|
g_signal_connect (sess->session, "on-ssrc-collision",
|
|
|
|
(GCallback) on_ssrc_collision, sess);
|
|
|
|
g_signal_connect (sess->session, "on-ssrc-validated",
|
|
|
|
(GCallback) on_ssrc_validated, sess);
|
2007-09-20 14:34:57 +00:00
|
|
|
g_signal_connect (sess->session, "on-ssrc-active",
|
|
|
|
(GCallback) on_ssrc_active, sess);
|
2007-12-10 15:34:19 +00:00
|
|
|
g_signal_connect (sess->session, "on-ssrc-sdes",
|
|
|
|
(GCallback) on_ssrc_sdes, sess);
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
g_signal_connect (sess->session, "on-bye-ssrc",
|
|
|
|
(GCallback) on_bye_ssrc, sess);
|
|
|
|
g_signal_connect (sess->session, "on-bye-timeout",
|
|
|
|
(GCallback) on_bye_timeout, sess);
|
|
|
|
g_signal_connect (sess->session, "on-timeout", (GCallback) on_timeout, sess);
|
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.
2008-09-05 13:52:34 +00:00
|
|
|
g_signal_connect (sess->session, "on-sender-timeout",
|
|
|
|
(GCallback) on_sender_timeout, sess);
|
2015-10-02 07:16:32 +00:00
|
|
|
g_signal_connect (sess->session, "on-new-sender-ssrc",
|
|
|
|
(GCallback) on_new_sender_ssrc, sess);
|
|
|
|
g_signal_connect (sess->session, "on-sender-ssrc-active",
|
|
|
|
(GCallback) on_sender_ssrc_active, sess);
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
|
configure.ac: Disable rtpmanager for now because it depends on CVS -base.
Original commit message from CVS:
* configure.ac:
Disable rtpmanager for now because it depends on CVS -base.
* gst/rtpmanager/Makefile.am:
Added new files for session manager.
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(create_stream), (pt_map_requested), (new_ssrc_pad_found):
Some cleanups.
the session manager can now also request a pt-map.
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (rtcp_thread), (start_rtcp_thread),
(stop_rtcp_thread), (gst_rtp_session_change_state),
(gst_rtp_session_process_rtp), (gst_rtp_session_send_rtp),
(gst_rtp_session_send_rtcp), (gst_rtp_session_clock_rate),
(gst_rtp_session_get_time), (gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_event_send_rtp_sink),
(gst_rtp_session_chain_send_rtp), (create_send_rtcp_src),
(gst_rtp_session_request_new_pad):
* gst/rtpmanager/gstrtpsession.h:
We can ask for pt-map now too when the session manager needs it.
Hook up to the new session manager, implement the needed callbacks for
pushing data, getting clock time and requesting clock-rates.
Rename rtcp_src to send_rtcp_src to make it clear that this RTCP is to
be send to clients.
Add code to start and stop the thread that will schedule RTCP through
the session manager.
* gst/rtpmanager/rtpsession.c: (rtp_session_class_init),
(rtp_session_init), (rtp_session_finalize),
(rtp_session_set_property), (rtp_session_get_property),
(on_new_ssrc), (on_ssrc_collision), (on_ssrc_validated),
(on_bye_ssrc), (rtp_session_new), (rtp_session_set_callbacks),
(rtp_session_set_bandwidth), (rtp_session_get_bandwidth),
(rtp_session_set_rtcp_bandwidth), (rtp_session_get_rtcp_bandwidth),
(source_push_rtp), (source_clock_rate), (check_collision),
(obtain_source), (rtp_session_add_source),
(rtp_session_get_num_sources),
(rtp_session_get_num_active_sources),
(rtp_session_get_source_by_ssrc),
(rtp_session_get_source_by_cname), (rtp_session_create_source),
(update_arrival_stats), (rtp_session_process_rtp),
(rtp_session_process_sr), (rtp_session_process_rr),
(rtp_session_process_sdes), (rtp_session_process_bye),
(rtp_session_process_app), (rtp_session_process_rtcp),
(rtp_session_send_rtp), (rtp_session_get_rtcp_interval),
(rtp_session_produce_rtcp):
* gst/rtpmanager/rtpsession.h:
The advanced beginnings of the main session manager that handles the
participant database of RTPSources, SSRC probation, SSRC collisions,
parse RTCP to update source stats. etc..
* gst/rtpmanager/rtpsource.c: (rtp_source_class_init),
(rtp_source_init), (rtp_source_finalize), (rtp_source_new),
(rtp_source_set_callbacks), (rtp_source_set_as_csrc),
(rtp_source_set_rtp_from), (rtp_source_set_rtcp_from),
(push_packet), (get_clock_rate), (calculate_jitter),
(rtp_source_process_rtp), (rtp_source_process_bye),
(rtp_source_send_rtp), (rtp_source_process_sr),
(rtp_source_process_rb):
* gst/rtpmanager/rtpsource.h:
Object that encapsulates an SSRC and its state in the database.
Calculates the jitter and transit times of data packets.
* gst/rtpmanager/rtpstats.c: (rtp_stats_init_defaults),
(rtp_stats_calculate_rtcp_interval), (rtp_stats_add_rtcp_jitter):
* gst/rtpmanager/rtpstats.h:
Various stats regarding the session and sources.
Used to calculate the RTCP interval.
2007-04-18 18:58:53 +00:00
|
|
|
gst_bin_add (GST_BIN_CAST (rtpbin), session);
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
gst_bin_add (GST_BIN_CAST (rtpbin), demux);
|
2017-11-28 05:02:05 +00:00
|
|
|
gst_bin_add (GST_BIN_CAST (rtpbin), storage);
|
2009-05-22 10:20:13 +00:00
|
|
|
|
2018-11-06 21:02:21 +00:00
|
|
|
/* unref the storage again, the bin has a reference now and
|
|
|
|
* we don't need it anymore */
|
|
|
|
gst_object_unref (storage);
|
|
|
|
|
2009-05-22 10:20:13 +00:00
|
|
|
GST_OBJECT_LOCK (rtpbin);
|
|
|
|
target = GST_STATE_TARGET (rtpbin);
|
|
|
|
GST_OBJECT_UNLOCK (rtpbin);
|
|
|
|
|
|
|
|
/* change state only to what's needed */
|
|
|
|
gst_element_set_state (demux, target);
|
|
|
|
gst_element_set_state (session, target);
|
2017-11-28 05:02:05 +00:00
|
|
|
gst_element_set_state (storage, target);
|
2007-04-03 11:35:39 +00:00
|
|
|
|
|
|
|
return sess;
|
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
no_session:
|
|
|
|
{
|
2013-09-23 13:36:32 +00:00
|
|
|
g_warning ("rtpbin: could not create rtpsession element");
|
2007-04-03 11:35:39 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
no_demux:
|
|
|
|
{
|
configure.ac: Disable rtpmanager for now because it depends on CVS -base.
Original commit message from CVS:
* configure.ac:
Disable rtpmanager for now because it depends on CVS -base.
* gst/rtpmanager/Makefile.am:
Added new files for session manager.
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(create_stream), (pt_map_requested), (new_ssrc_pad_found):
Some cleanups.
the session manager can now also request a pt-map.
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (rtcp_thread), (start_rtcp_thread),
(stop_rtcp_thread), (gst_rtp_session_change_state),
(gst_rtp_session_process_rtp), (gst_rtp_session_send_rtp),
(gst_rtp_session_send_rtcp), (gst_rtp_session_clock_rate),
(gst_rtp_session_get_time), (gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_event_send_rtp_sink),
(gst_rtp_session_chain_send_rtp), (create_send_rtcp_src),
(gst_rtp_session_request_new_pad):
* gst/rtpmanager/gstrtpsession.h:
We can ask for pt-map now too when the session manager needs it.
Hook up to the new session manager, implement the needed callbacks for
pushing data, getting clock time and requesting clock-rates.
Rename rtcp_src to send_rtcp_src to make it clear that this RTCP is to
be send to clients.
Add code to start and stop the thread that will schedule RTCP through
the session manager.
* gst/rtpmanager/rtpsession.c: (rtp_session_class_init),
(rtp_session_init), (rtp_session_finalize),
(rtp_session_set_property), (rtp_session_get_property),
(on_new_ssrc), (on_ssrc_collision), (on_ssrc_validated),
(on_bye_ssrc), (rtp_session_new), (rtp_session_set_callbacks),
(rtp_session_set_bandwidth), (rtp_session_get_bandwidth),
(rtp_session_set_rtcp_bandwidth), (rtp_session_get_rtcp_bandwidth),
(source_push_rtp), (source_clock_rate), (check_collision),
(obtain_source), (rtp_session_add_source),
(rtp_session_get_num_sources),
(rtp_session_get_num_active_sources),
(rtp_session_get_source_by_ssrc),
(rtp_session_get_source_by_cname), (rtp_session_create_source),
(update_arrival_stats), (rtp_session_process_rtp),
(rtp_session_process_sr), (rtp_session_process_rr),
(rtp_session_process_sdes), (rtp_session_process_bye),
(rtp_session_process_app), (rtp_session_process_rtcp),
(rtp_session_send_rtp), (rtp_session_get_rtcp_interval),
(rtp_session_produce_rtcp):
* gst/rtpmanager/rtpsession.h:
The advanced beginnings of the main session manager that handles the
participant database of RTPSources, SSRC probation, SSRC collisions,
parse RTCP to update source stats. etc..
* gst/rtpmanager/rtpsource.c: (rtp_source_class_init),
(rtp_source_init), (rtp_source_finalize), (rtp_source_new),
(rtp_source_set_callbacks), (rtp_source_set_as_csrc),
(rtp_source_set_rtp_from), (rtp_source_set_rtcp_from),
(push_packet), (get_clock_rate), (calculate_jitter),
(rtp_source_process_rtp), (rtp_source_process_bye),
(rtp_source_send_rtp), (rtp_source_process_sr),
(rtp_source_process_rb):
* gst/rtpmanager/rtpsource.h:
Object that encapsulates an SSRC and its state in the database.
Calculates the jitter and transit times of data packets.
* gst/rtpmanager/rtpstats.c: (rtp_stats_init_defaults),
(rtp_stats_calculate_rtcp_interval), (rtp_stats_add_rtcp_jitter):
* gst/rtpmanager/rtpstats.h:
Various stats regarding the session and sources.
Used to calculate the RTCP interval.
2007-04-18 18:58:53 +00:00
|
|
|
gst_object_unref (session);
|
2013-09-23 13:36:32 +00:00
|
|
|
g_warning ("rtpbin: could not create rtpssrcdemux element");
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2017-11-28 05:02:05 +00:00
|
|
|
no_storage:
|
|
|
|
{
|
|
|
|
gst_object_unref (session);
|
|
|
|
gst_object_unref (demux);
|
|
|
|
g_warning ("rtpbin: could not create rtpstorage element");
|
|
|
|
return NULL;
|
|
|
|
}
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
}
|
|
|
|
|
2013-12-30 15:28:57 +00:00
|
|
|
static gboolean
|
|
|
|
bin_manage_element (GstRtpBin * bin, GstElement * element)
|
|
|
|
{
|
|
|
|
GstRtpBinPrivate *priv = bin->priv;
|
|
|
|
|
|
|
|
if (g_list_find (priv->elements, element)) {
|
|
|
|
GST_DEBUG_OBJECT (bin, "requested element %p already in bin", element);
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (bin, "adding requested element %p", element);
|
2018-01-15 17:13:37 +00:00
|
|
|
|
|
|
|
if (g_object_is_floating (element))
|
|
|
|
element = gst_object_ref_sink (element);
|
|
|
|
|
2013-12-30 15:28:57 +00:00
|
|
|
if (!gst_bin_add (GST_BIN_CAST (bin), element))
|
|
|
|
goto add_failed;
|
|
|
|
if (!gst_element_sync_state_with_parent (element))
|
|
|
|
GST_WARNING_OBJECT (bin, "unable to sync element state with rtpbin");
|
|
|
|
}
|
|
|
|
/* we add the element multiple times, each we need an equal number of
|
|
|
|
* removes to really remove the element from the bin */
|
|
|
|
priv->elements = g_list_prepend (priv->elements, element);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
add_failed:
|
|
|
|
{
|
|
|
|
GST_WARNING_OBJECT (bin, "unable to add element");
|
2018-01-15 17:13:37 +00:00
|
|
|
gst_object_unref (element);
|
2013-12-30 15:28:57 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-05 23:53:52 +00:00
|
|
|
static void
|
|
|
|
remove_bin_element (GstElement * element, GstRtpBin * bin)
|
|
|
|
{
|
2013-12-30 15:28:57 +00:00
|
|
|
GstRtpBinPrivate *priv = bin->priv;
|
|
|
|
GList *find;
|
|
|
|
|
|
|
|
find = g_list_find (priv->elements, element);
|
|
|
|
if (find) {
|
|
|
|
priv->elements = g_list_delete_link (priv->elements, find);
|
|
|
|
|
2018-01-15 17:13:37 +00:00
|
|
|
if (!g_list_find (priv->elements, element)) {
|
|
|
|
gst_element_set_locked_state (element, TRUE);
|
2013-12-30 15:28:57 +00:00
|
|
|
gst_bin_remove (GST_BIN_CAST (bin), element);
|
2018-01-15 17:13:37 +00:00
|
|
|
gst_element_set_state (element, GST_STATE_NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_object_unref (element);
|
2013-12-30 15:28:57 +00:00
|
|
|
}
|
2013-12-05 23:53:52 +00:00
|
|
|
}
|
|
|
|
|
2012-03-26 16:22:03 +00:00
|
|
|
/* called with RTP_BIN_LOCK */
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
static void
|
2009-05-22 10:20:13 +00:00
|
|
|
free_session (GstRtpBinSession * sess, GstRtpBin * bin)
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
{
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
GST_DEBUG_OBJECT (bin, "freeing session %p", sess);
|
|
|
|
|
2009-08-31 16:46:51 +00:00
|
|
|
gst_element_set_locked_state (sess->demux, TRUE);
|
|
|
|
gst_element_set_locked_state (sess->session, TRUE);
|
2019-02-08 09:09:17 +00:00
|
|
|
gst_element_set_locked_state (sess->storage, TRUE);
|
2009-08-31 16:46:51 +00:00
|
|
|
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
gst_element_set_state (sess->demux, GST_STATE_NULL);
|
2009-05-21 23:03:55 +00:00
|
|
|
gst_element_set_state (sess->session, GST_STATE_NULL);
|
2019-02-08 09:09:17 +00:00
|
|
|
gst_element_set_state (sess->storage, GST_STATE_NULL);
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
|
2012-03-07 14:22:36 +00:00
|
|
|
remove_recv_rtp (bin, sess);
|
|
|
|
remove_recv_rtcp (bin, sess);
|
2020-10-06 01:13:30 +00:00
|
|
|
remove_recv_fec (bin, sess);
|
2012-03-07 14:22:36 +00:00
|
|
|
remove_send_rtp (bin, sess);
|
2020-10-06 01:03:13 +00:00
|
|
|
remove_send_fec (bin, sess);
|
2012-03-07 14:22:36 +00:00
|
|
|
remove_rtcp (bin, sess);
|
2008-04-09 22:27:50 +00:00
|
|
|
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
gst_bin_remove (GST_BIN_CAST (bin), sess->session);
|
|
|
|
gst_bin_remove (GST_BIN_CAST (bin), sess->demux);
|
2019-02-08 09:09:17 +00:00
|
|
|
gst_bin_remove (GST_BIN_CAST (bin), sess->storage);
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
|
2013-12-30 16:36:42 +00:00
|
|
|
g_slist_foreach (sess->elements, (GFunc) remove_bin_element, bin);
|
|
|
|
g_slist_free (sess->elements);
|
2020-09-23 19:25:36 +00:00
|
|
|
sess->elements = NULL;
|
2013-12-05 23:53:52 +00:00
|
|
|
|
2011-09-26 21:42:51 +00:00
|
|
|
g_slist_foreach (sess->streams, (GFunc) free_stream, bin);
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
g_slist_free (sess->streams);
|
|
|
|
|
2012-01-19 10:33:53 +00:00
|
|
|
g_mutex_clear (&sess->lock);
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
g_hash_table_destroy (sess->ptmap);
|
|
|
|
|
|
|
|
g_free (sess);
|
|
|
|
}
|
|
|
|
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
/* get the payload type caps for the specific payload @pt in @session */
|
|
|
|
static GstCaps *
|
2007-08-23 21:39:58 +00:00
|
|
|
get_pt_map (GstRtpBinSession * session, guint pt)
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
{
|
|
|
|
GstCaps *caps = NULL;
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBin *bin;
|
2007-04-12 08:18:32 +00:00
|
|
|
GValue ret = { 0 };
|
|
|
|
GValue args[3] = { {0}, {0}, {0} };
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
GST_DEBUG ("searching pt %u in cache", pt);
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
GST_RTP_SESSION_LOCK (session);
|
|
|
|
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
/* first look in the cache */
|
|
|
|
caps = g_hash_table_lookup (session->ptmap, GINT_TO_POINTER (pt));
|
2008-04-21 08:26:37 +00:00
|
|
|
if (caps) {
|
|
|
|
gst_caps_ref (caps);
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
goto done;
|
2008-04-21 08:26:37 +00:00
|
|
|
}
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
|
|
|
|
bin = session->bin;
|
|
|
|
|
2019-09-02 12:27:35 +00:00
|
|
|
GST_DEBUG ("emitting signal for pt %u in session %u", pt, session->id);
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
|
|
|
|
/* not in cache, send signal to request caps */
|
2007-04-12 08:18:32 +00:00
|
|
|
g_value_init (&args[0], GST_TYPE_ELEMENT);
|
|
|
|
g_value_set_object (&args[0], bin);
|
|
|
|
g_value_init (&args[1], G_TYPE_UINT);
|
|
|
|
g_value_set_uint (&args[1], session->id);
|
|
|
|
g_value_init (&args[2], G_TYPE_UINT);
|
|
|
|
g_value_set_uint (&args[2], pt);
|
|
|
|
|
|
|
|
g_value_init (&ret, GST_TYPE_CAPS);
|
|
|
|
g_value_set_boxed (&ret, NULL);
|
|
|
|
|
2008-08-05 08:58:27 +00:00
|
|
|
GST_RTP_SESSION_UNLOCK (session);
|
|
|
|
|
2007-04-12 08:18:32 +00:00
|
|
|
g_signal_emitv (args, gst_rtp_bin_signals[SIGNAL_REQUEST_PT_MAP], 0, &ret);
|
|
|
|
|
2008-08-05 08:58:27 +00:00
|
|
|
GST_RTP_SESSION_LOCK (session);
|
|
|
|
|
2008-04-17 07:31:44 +00:00
|
|
|
g_value_unset (&args[0]);
|
|
|
|
g_value_unset (&args[1]);
|
|
|
|
g_value_unset (&args[2]);
|
2008-08-05 08:58:27 +00:00
|
|
|
|
|
|
|
/* look in the cache again because we let the lock go */
|
|
|
|
caps = g_hash_table_lookup (session->ptmap, GINT_TO_POINTER (pt));
|
|
|
|
if (caps) {
|
|
|
|
gst_caps_ref (caps);
|
|
|
|
g_value_unset (&ret);
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
2008-04-17 07:31:44 +00:00
|
|
|
caps = (GstCaps *) g_value_dup_boxed (&ret);
|
|
|
|
g_value_unset (&ret);
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
if (!caps)
|
|
|
|
goto no_caps;
|
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
GST_DEBUG ("caching pt %u as %" GST_PTR_FORMAT, pt, caps);
|
2007-04-12 08:18:32 +00:00
|
|
|
|
2008-04-21 08:26:37 +00:00
|
|
|
/* store in cache, take additional ref */
|
|
|
|
g_hash_table_insert (session->ptmap, GINT_TO_POINTER (pt),
|
|
|
|
gst_caps_ref (caps));
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
|
|
|
|
done:
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
GST_RTP_SESSION_UNLOCK (session);
|
|
|
|
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
return caps;
|
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
no_caps:
|
|
|
|
{
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
GST_RTP_SESSION_UNLOCK (session);
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
GST_DEBUG ("no pt map could be obtained");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-05-15 03:45:45 +00:00
|
|
|
static gboolean
|
|
|
|
return_true (gpointer key, gpointer value, gpointer user_data)
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2008-11-26 12:02:21 +00:00
|
|
|
static void
|
|
|
|
gst_rtp_bin_reset_sync (GstRtpBin * rtpbin)
|
|
|
|
{
|
|
|
|
GSList *clients, *streams;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "Reset sync on all clients");
|
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
for (clients = rtpbin->clients; clients; clients = g_slist_next (clients)) {
|
|
|
|
GstRtpBinClient *client = (GstRtpBinClient *) clients->data;
|
|
|
|
|
|
|
|
/* reset sync on all streams for this client */
|
|
|
|
for (streams = client->streams; streams; streams = g_slist_next (streams)) {
|
|
|
|
GstRtpBinStream *stream = (GstRtpBinStream *) streams->data;
|
|
|
|
|
|
|
|
/* make use require a new SR packet for this stream before we attempt new
|
|
|
|
* lip-sync */
|
2024-04-17 14:01:21 +00:00
|
|
|
stream->have_sync = GST_RTP_BIN_STREAM_SYNCED_NONE;
|
|
|
|
stream->rt_delta = G_MININT64;
|
|
|
|
stream->rtp_delta = G_MININT64;
|
|
|
|
stream->base_rtptime = -1;
|
|
|
|
stream->base_time = GST_CLOCK_TIME_NONE;
|
|
|
|
stream->clock_base = -1;
|
|
|
|
|
2019-02-26 15:39:55 +00:00
|
|
|
stream->avg_ts_offset = 0;
|
|
|
|
stream->is_initialized = FALSE;
|
2024-04-17 14:01:21 +00:00
|
|
|
|
2008-11-26 12:02:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
}
|
|
|
|
|
2007-05-14 15:28:36 +00:00
|
|
|
static void
|
2007-08-23 21:39:58 +00:00
|
|
|
gst_rtp_bin_clear_pt_map (GstRtpBin * bin)
|
2007-05-14 15:28:36 +00:00
|
|
|
{
|
2007-10-08 10:39:35 +00:00
|
|
|
GSList *sessions, *streams;
|
2007-05-14 15:28:36 +00:00
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (bin);
|
2007-08-28 20:30:16 +00:00
|
|
|
GST_DEBUG_OBJECT (bin, "clearing pt map");
|
2007-10-08 10:39:35 +00:00
|
|
|
for (sessions = bin->sessions; sessions; sessions = g_slist_next (sessions)) {
|
|
|
|
GstRtpBinSession *session = (GstRtpBinSession *) sessions->data;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin, "clearing session %p", session);
|
|
|
|
g_signal_emit_by_name (session->session, "clear-pt-map", NULL);
|
2007-05-14 15:28:36 +00:00
|
|
|
|
|
|
|
GST_RTP_SESSION_LOCK (session);
|
2007-05-15 03:45:45 +00:00
|
|
|
g_hash_table_foreach_remove (session->ptmap, return_true, NULL);
|
2007-10-08 10:39:35 +00:00
|
|
|
|
|
|
|
for (streams = session->streams; streams; streams = g_slist_next (streams)) {
|
|
|
|
GstRtpBinStream *stream = (GstRtpBinStream *) streams->data;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin, "clearing stream %p", stream);
|
2017-12-19 17:23:16 +00:00
|
|
|
if (g_signal_lookup ("clear-pt-map", G_OBJECT_TYPE (stream->buffer)) != 0)
|
|
|
|
g_signal_emit_by_name (stream->buffer, "clear-pt-map", NULL);
|
2009-09-08 15:37:15 +00:00
|
|
|
if (stream->demux)
|
|
|
|
g_signal_emit_by_name (stream->demux, "clear-pt-map", NULL);
|
2007-10-08 10:39:35 +00:00
|
|
|
}
|
2007-05-14 15:28:36 +00:00
|
|
|
GST_RTP_SESSION_UNLOCK (session);
|
|
|
|
}
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
2008-11-26 12:02:21 +00:00
|
|
|
|
|
|
|
/* reset sync too */
|
|
|
|
gst_rtp_bin_reset_sync (bin);
|
2007-05-14 15:28:36 +00:00
|
|
|
}
|
|
|
|
|
2015-12-10 11:15:52 +00:00
|
|
|
static GstElement *
|
|
|
|
gst_rtp_bin_get_session (GstRtpBin * bin, guint session_id)
|
|
|
|
{
|
|
|
|
GstRtpBinSession *session;
|
|
|
|
GstElement *ret = NULL;
|
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (bin);
|
2016-11-16 07:56:34 +00:00
|
|
|
GST_DEBUG_OBJECT (bin, "retrieving GstRtpSession, index: %u", session_id);
|
2015-12-10 11:15:52 +00:00
|
|
|
session = find_session_by_id (bin, (gint) session_id);
|
|
|
|
if (session) {
|
|
|
|
ret = gst_object_ref (session->session);
|
|
|
|
}
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2008-10-07 18:54:41 +00:00
|
|
|
static RTPSession *
|
|
|
|
gst_rtp_bin_get_internal_session (GstRtpBin * bin, guint session_id)
|
|
|
|
{
|
|
|
|
RTPSession *internal_session = NULL;
|
|
|
|
GstRtpBinSession *session;
|
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (bin);
|
2016-11-16 07:56:34 +00:00
|
|
|
GST_DEBUG_OBJECT (bin, "retrieving internal RTPSession object, index: %u",
|
2008-10-07 18:54:41 +00:00
|
|
|
session_id);
|
|
|
|
session = find_session_by_id (bin, (gint) session_id);
|
|
|
|
if (session) {
|
|
|
|
g_object_get (session->session, "internal-session", &internal_session,
|
|
|
|
NULL);
|
|
|
|
}
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
|
|
|
|
|
|
|
return internal_session;
|
|
|
|
}
|
|
|
|
|
2018-04-02 21:04:06 +00:00
|
|
|
static GstElement *
|
|
|
|
gst_rtp_bin_get_storage (GstRtpBin * bin, guint session_id)
|
|
|
|
{
|
|
|
|
GstRtpBinSession *session;
|
|
|
|
GstElement *res = NULL;
|
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (bin);
|
|
|
|
GST_DEBUG_OBJECT (bin, "retrieving internal storage object, index: %u",
|
|
|
|
session_id);
|
|
|
|
session = find_session_by_id (bin, (gint) session_id);
|
|
|
|
if (session && session->storage) {
|
|
|
|
res = gst_object_ref (session->storage);
|
|
|
|
}
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
static GObject *
|
|
|
|
gst_rtp_bin_get_internal_storage (GstRtpBin * bin, guint session_id)
|
|
|
|
{
|
|
|
|
GObject *internal_storage = NULL;
|
|
|
|
GstRtpBinSession *session;
|
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (bin);
|
|
|
|
GST_DEBUG_OBJECT (bin, "retrieving internal storage object, index: %u",
|
|
|
|
session_id);
|
|
|
|
session = find_session_by_id (bin, (gint) session_id);
|
|
|
|
if (session && session->storage) {
|
|
|
|
g_object_get (session->storage, "internal-storage", &internal_storage,
|
|
|
|
NULL);
|
|
|
|
}
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
|
|
|
|
|
|
|
return internal_storage;
|
|
|
|
}
|
|
|
|
|
2020-09-24 17:13:00 +00:00
|
|
|
static void
|
|
|
|
gst_rtp_bin_clear_ssrc (GstRtpBin * bin, guint session_id, guint32 ssrc)
|
|
|
|
{
|
|
|
|
GstRtpBinSession *session;
|
|
|
|
GstElement *demux = NULL;
|
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (bin);
|
|
|
|
GST_DEBUG_OBJECT (bin, "clearing ssrc %u for session %u", ssrc, session_id);
|
|
|
|
session = find_session_by_id (bin, (gint) session_id);
|
|
|
|
if (session)
|
|
|
|
demux = gst_object_ref (session->demux);
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
|
|
|
|
|
|
|
if (demux) {
|
|
|
|
g_signal_emit_by_name (demux, "clear-ssrc", ssrc, NULL);
|
|
|
|
gst_object_unref (demux);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-05 23:53:52 +00:00
|
|
|
static GstElement *
|
|
|
|
gst_rtp_bin_request_encoder (GstRtpBin * bin, guint session_id)
|
|
|
|
{
|
2013-12-30 13:56:07 +00:00
|
|
|
GST_DEBUG_OBJECT (bin, "return NULL encoder");
|
2013-12-05 23:53:52 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GstElement *
|
|
|
|
gst_rtp_bin_request_decoder (GstRtpBin * bin, guint session_id)
|
|
|
|
{
|
2013-12-30 13:56:07 +00:00
|
|
|
GST_DEBUG_OBJECT (bin, "return NULL decoder");
|
2013-12-05 23:53:52 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2017-12-19 17:23:16 +00:00
|
|
|
static GstElement *
|
|
|
|
gst_rtp_bin_request_jitterbuffer (GstRtpBin * bin, guint session_id)
|
|
|
|
{
|
|
|
|
return gst_element_factory_make ("rtpjitterbuffer", NULL);
|
|
|
|
}
|
|
|
|
|
2008-05-26 10:00:24 +00:00
|
|
|
static void
|
|
|
|
gst_rtp_bin_propagate_property_to_jitterbuffer (GstRtpBin * bin,
|
|
|
|
const gchar * name, const GValue * value)
|
|
|
|
{
|
|
|
|
GSList *sessions, *streams;
|
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (bin);
|
|
|
|
for (sessions = bin->sessions; sessions; sessions = g_slist_next (sessions)) {
|
|
|
|
GstRtpBinSession *session = (GstRtpBinSession *) sessions->data;
|
|
|
|
|
|
|
|
GST_RTP_SESSION_LOCK (session);
|
|
|
|
for (streams = session->streams; streams; streams = g_slist_next (streams)) {
|
|
|
|
GstRtpBinStream *stream = (GstRtpBinStream *) streams->data;
|
2017-12-19 17:23:16 +00:00
|
|
|
GObjectClass *jb_class;
|
2008-05-26 10:00:24 +00:00
|
|
|
|
2017-12-19 17:23:16 +00:00
|
|
|
jb_class = G_OBJECT_GET_CLASS (G_OBJECT (stream->buffer));
|
|
|
|
if (g_object_class_find_property (jb_class, name))
|
|
|
|
g_object_set_property (G_OBJECT (stream->buffer), name, value);
|
|
|
|
else
|
|
|
|
GST_WARNING_OBJECT (bin,
|
|
|
|
"Stream jitterbuffer does not expose property %s", name);
|
2008-05-26 10:00:24 +00:00
|
|
|
}
|
|
|
|
GST_RTP_SESSION_UNLOCK (session);
|
|
|
|
}
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
|
|
|
}
|
|
|
|
|
2015-10-07 11:02:12 +00:00
|
|
|
static void
|
|
|
|
gst_rtp_bin_propagate_property_to_session (GstRtpBin * bin,
|
|
|
|
const gchar * name, const GValue * value)
|
|
|
|
{
|
|
|
|
GSList *sessions;
|
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (bin);
|
|
|
|
for (sessions = bin->sessions; sessions; sessions = g_slist_next (sessions)) {
|
|
|
|
GstRtpBinSession *sess = (GstRtpBinSession *) sessions->data;
|
|
|
|
|
|
|
|
g_object_set_property (G_OBJECT (sess->session), name, value);
|
|
|
|
}
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
|
|
|
}
|
|
|
|
|
2008-04-17 07:31:44 +00:00
|
|
|
/* get a client with the given SDES name. Must be called with RTP_BIN_LOCK */
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
static GstRtpBinClient *
|
2024-04-17 10:33:41 +00:00
|
|
|
get_client (GstRtpBin * bin, guint8 len, const guint8 * data)
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
{
|
|
|
|
GstRtpBinClient *result = NULL;
|
|
|
|
GSList *walk;
|
|
|
|
|
|
|
|
for (walk = bin->clients; walk; walk = g_slist_next (walk)) {
|
|
|
|
GstRtpBinClient *client = (GstRtpBinClient *) walk->data;
|
|
|
|
|
|
|
|
if (len != client->cname_len)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (!strncmp ((gchar *) data, client->cname, client->cname_len)) {
|
|
|
|
GST_DEBUG_OBJECT (bin, "found existing client %p with CNAME %s", client,
|
|
|
|
client->cname);
|
|
|
|
result = client;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* nothing found, create one */
|
|
|
|
if (result == NULL) {
|
|
|
|
result = g_new0 (GstRtpBinClient, 1);
|
|
|
|
result->cname = g_strndup ((gchar *) data, len);
|
|
|
|
result->cname_len = len;
|
|
|
|
bin->clients = g_slist_prepend (bin->clients, result);
|
|
|
|
GST_DEBUG_OBJECT (bin, "created new client %p with CNAME %s", result,
|
|
|
|
result->cname);
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
static void
|
2009-05-22 10:20:13 +00:00
|
|
|
free_client (GstRtpBinClient * client, GstRtpBin * bin)
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
{
|
2009-05-22 10:20:13 +00:00
|
|
|
GST_DEBUG_OBJECT (bin, "freeing client %p", client);
|
2008-04-17 07:31:44 +00:00
|
|
|
g_slist_free (client->streams);
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
g_free (client->cname);
|
|
|
|
g_free (client);
|
|
|
|
}
|
|
|
|
|
2010-08-27 15:58:47 +00:00
|
|
|
static void
|
|
|
|
get_current_times (GstRtpBin * bin, GstClockTime * running_time,
|
|
|
|
guint64 * ntpnstime)
|
|
|
|
{
|
2016-03-24 06:57:11 +00:00
|
|
|
guint64 ntpns = -1;
|
2010-08-27 15:58:47 +00:00
|
|
|
GstClock *clock;
|
|
|
|
GstClockTime base_time, rt, clock_time;
|
|
|
|
|
|
|
|
GST_OBJECT_LOCK (bin);
|
|
|
|
if ((clock = GST_ELEMENT_CLOCK (bin))) {
|
|
|
|
base_time = GST_ELEMENT_CAST (bin)->base_time;
|
|
|
|
gst_object_ref (clock);
|
|
|
|
GST_OBJECT_UNLOCK (bin);
|
|
|
|
|
2015-06-12 21:29:19 +00:00
|
|
|
/* get current clock time and convert to running time */
|
2010-08-27 15:58:47 +00:00
|
|
|
clock_time = gst_clock_get_time (clock);
|
2015-06-12 21:29:19 +00:00
|
|
|
rt = clock_time - base_time;
|
2010-08-27 15:58:47 +00:00
|
|
|
|
|
|
|
if (bin->use_pipeline_clock) {
|
2015-06-12 21:29:19 +00:00
|
|
|
ntpns = rt;
|
|
|
|
/* add constant to convert from 1970 based time to 1900 based time */
|
2022-04-20 07:53:16 +00:00
|
|
|
ntpns += (GST_RTP_NTP_UNIX_OFFSET * GST_SECOND);
|
2010-08-27 15:58:47 +00:00
|
|
|
} else {
|
2015-06-12 21:29:19 +00:00
|
|
|
switch (bin->ntp_time_source) {
|
|
|
|
case GST_RTP_NTP_TIME_SOURCE_NTP:
|
|
|
|
case GST_RTP_NTP_TIME_SOURCE_UNIX:{
|
|
|
|
/* get current NTP time */
|
2019-10-11 12:20:15 +00:00
|
|
|
ntpns = g_get_real_time () * GST_USECOND;
|
2015-06-12 21:29:19 +00:00
|
|
|
|
|
|
|
/* add constant to convert from 1970 based time to 1900 based time */
|
|
|
|
if (bin->ntp_time_source == GST_RTP_NTP_TIME_SOURCE_NTP)
|
2022-04-20 07:53:16 +00:00
|
|
|
ntpns += (GST_RTP_NTP_UNIX_OFFSET * GST_SECOND);
|
2015-06-12 21:29:19 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case GST_RTP_NTP_TIME_SOURCE_RUNNING_TIME:
|
|
|
|
ntpns = rt;
|
|
|
|
break;
|
|
|
|
case GST_RTP_NTP_TIME_SOURCE_CLOCK_TIME:
|
|
|
|
ntpns = clock_time;
|
|
|
|
break;
|
|
|
|
default:
|
2015-09-17 14:58:23 +00:00
|
|
|
ntpns = -1; /* Fix uninited compiler warning */
|
2015-06-12 21:29:19 +00:00
|
|
|
g_assert_not_reached ();
|
|
|
|
break;
|
|
|
|
}
|
2010-08-27 15:58:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gst_object_unref (clock);
|
|
|
|
} else {
|
|
|
|
GST_OBJECT_UNLOCK (bin);
|
|
|
|
rt = -1;
|
|
|
|
ntpns = -1;
|
|
|
|
}
|
|
|
|
if (running_time)
|
|
|
|
*running_time = rt;
|
|
|
|
if (ntpnstime)
|
|
|
|
*ntpnstime = ntpns;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
stream_set_ts_offset (GstRtpBin * bin, GstRtpBinStream * stream,
|
2018-05-29 14:24:02 +00:00
|
|
|
gint64 ts_offset, gint64 max_ts_offset, guint64 min_ts_offset,
|
2017-09-14 11:00:56 +00:00
|
|
|
gboolean allow_positive_ts_offset)
|
2010-08-27 15:58:47 +00:00
|
|
|
{
|
|
|
|
gint64 prev_ts_offset;
|
2017-12-19 17:23:16 +00:00
|
|
|
GObjectClass *jb_class;
|
|
|
|
|
|
|
|
jb_class = G_OBJECT_GET_CLASS (G_OBJECT (stream->buffer));
|
|
|
|
|
|
|
|
if (!g_object_class_find_property (jb_class, "ts-offset")) {
|
|
|
|
GST_LOG_OBJECT (bin,
|
|
|
|
"stream's jitterbuffer does not expose ts-offset property");
|
|
|
|
return;
|
|
|
|
}
|
2010-08-27 15:58:47 +00:00
|
|
|
|
2021-11-23 08:03:28 +00:00
|
|
|
if (bin->ts_offset_smoothing_factor > 0) {
|
|
|
|
if (!stream->is_initialized) {
|
|
|
|
stream->avg_ts_offset = ts_offset;
|
|
|
|
stream->is_initialized = TRUE;
|
|
|
|
} else {
|
2022-01-18 16:53:30 +00:00
|
|
|
/* RMA algorithm using smoothing factor is following, but split into
|
|
|
|
* parts to check for overflows:
|
|
|
|
* stream->avg_ts_offset =
|
|
|
|
* ((bin->ts_offset_smoothing_factor - 1) * stream->avg_ts_offset
|
|
|
|
* + ts_offset) / bin->ts_offset_smoothing_factor
|
|
|
|
*/
|
2022-04-11 11:40:56 +00:00
|
|
|
guint64 max_possible_smoothing_factor = G_MAXUINT64;
|
2022-01-18 16:53:30 +00:00
|
|
|
gint64 cur_avg_product =
|
|
|
|
(bin->ts_offset_smoothing_factor - 1) * stream->avg_ts_offset;
|
2022-04-11 11:40:56 +00:00
|
|
|
if (stream->avg_ts_offset != 0)
|
|
|
|
max_possible_smoothing_factor =
|
|
|
|
G_MAXINT64 / ABS (stream->avg_ts_offset);
|
2022-01-18 16:53:30 +00:00
|
|
|
|
|
|
|
if ((max_possible_smoothing_factor < bin->ts_offset_smoothing_factor) ||
|
|
|
|
(cur_avg_product > 0 && G_MAXINT64 - cur_avg_product < ts_offset) ||
|
|
|
|
(cur_avg_product < 0 && G_MININT64 - cur_avg_product > ts_offset)) {
|
|
|
|
GST_WARNING_OBJECT (bin,
|
|
|
|
"ts-offset-smoothing-factor calculation overflow, fallback to using ts-offset directly");
|
|
|
|
stream->avg_ts_offset = ts_offset;
|
|
|
|
} else {
|
|
|
|
stream->avg_ts_offset =
|
|
|
|
(cur_avg_product + ts_offset) / bin->ts_offset_smoothing_factor;
|
|
|
|
}
|
2021-11-23 08:03:28 +00:00
|
|
|
}
|
2019-02-26 15:39:55 +00:00
|
|
|
} else {
|
2021-11-23 08:03:28 +00:00
|
|
|
stream->avg_ts_offset = ts_offset;
|
2019-02-26 15:39:55 +00:00
|
|
|
}
|
|
|
|
|
2010-08-27 15:58:47 +00:00
|
|
|
g_object_get (stream->buffer, "ts-offset", &prev_ts_offset, NULL);
|
|
|
|
|
|
|
|
/* delta changed, see how much */
|
2019-02-26 15:39:55 +00:00
|
|
|
if (prev_ts_offset != stream->avg_ts_offset) {
|
2010-08-27 15:58:47 +00:00
|
|
|
gint64 diff;
|
|
|
|
|
2019-02-26 15:39:55 +00:00
|
|
|
diff = prev_ts_offset - stream->avg_ts_offset;
|
2010-08-27 15:58:47 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"ts-offset %" G_GINT64_FORMAT ", prev %" G_GINT64_FORMAT
|
2019-02-26 15:39:55 +00:00
|
|
|
", diff: %" G_GINT64_FORMAT, stream->avg_ts_offset, prev_ts_offset,
|
|
|
|
diff);
|
2010-08-27 15:58:47 +00:00
|
|
|
|
2017-09-14 11:00:56 +00:00
|
|
|
/* ignore minor offsets */
|
|
|
|
if (ABS (diff) < min_ts_offset) {
|
|
|
|
GST_DEBUG_OBJECT (bin, "offset too small, ignoring");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* sanity check offset */
|
|
|
|
if (max_ts_offset > 0) {
|
2019-02-26 15:39:55 +00:00
|
|
|
if (stream->avg_ts_offset > 0 && !allow_positive_ts_offset) {
|
2017-09-14 11:00:56 +00:00
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"offset is positive (clocks are out of sync), ignoring");
|
2012-10-17 10:24:22 +00:00
|
|
|
return;
|
|
|
|
}
|
2019-02-26 15:39:55 +00:00
|
|
|
if (ABS (stream->avg_ts_offset) > max_ts_offset) {
|
2017-09-14 11:00:56 +00:00
|
|
|
GST_DEBUG_OBJECT (bin, "offset too large, ignoring");
|
2012-10-17 10:24:22 +00:00
|
|
|
return;
|
2010-08-27 15:58:47 +00:00
|
|
|
}
|
|
|
|
}
|
2017-09-14 11:00:56 +00:00
|
|
|
|
2019-02-26 15:39:55 +00:00
|
|
|
g_object_set (stream->buffer, "ts-offset", stream->avg_ts_offset, NULL);
|
2010-08-27 15:58:47 +00:00
|
|
|
}
|
|
|
|
GST_DEBUG_OBJECT (bin, "stream SSRC %08x, delta %" G_GINT64_FORMAT,
|
2019-02-26 15:39:55 +00:00
|
|
|
stream->ssrc, stream->avg_ts_offset);
|
2010-08-27 15:58:47 +00:00
|
|
|
}
|
|
|
|
|
2013-07-03 16:41:42 +00:00
|
|
|
static void
|
|
|
|
gst_rtp_bin_send_sync_event (GstRtpBinStream * stream)
|
|
|
|
{
|
|
|
|
if (stream->bin->send_sync_event) {
|
|
|
|
GstEvent *event;
|
|
|
|
GstPad *srcpad;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (stream->bin,
|
|
|
|
"sending GstRTCPSRReceived event downstream");
|
|
|
|
|
|
|
|
event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM,
|
2013-07-24 12:17:45 +00:00
|
|
|
gst_structure_new_empty ("GstRTCPSRReceived"));
|
2013-07-03 16:41:42 +00:00
|
|
|
|
|
|
|
srcpad = gst_element_get_static_pad (stream->buffer, "src");
|
|
|
|
gst_pad_push_event (srcpad, event);
|
|
|
|
gst_object_unref (srcpad);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
/* associate a stream to the given CNAME. This will make sure all streams for
|
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.
2008-11-19 09:06:29 +00:00
|
|
|
* that CNAME are synchronized together.
|
2024-04-17 10:29:08 +00:00
|
|
|
*
|
|
|
|
* @len: length of CNAME in @data
|
|
|
|
* @data: CNAME
|
|
|
|
* @ntpnstime: NTP time in nanoseconds that corresponds to RTP time @extrtptime.
|
|
|
|
* @extrtptime: Extended RTP time that corresponds to NTP time @ntpnstime.
|
|
|
|
* @base_rtptime: Extended RTP time that corresponds to the local time @base_time.
|
|
|
|
* @base_time: Local time that corresponds to RTP time @base_rtptime.
|
|
|
|
* @clock_rate: RTP clock rate for this stream.
|
|
|
|
* @rtp_clock_base: RTP time signalled in RTSP RTP-Info for this stream, which
|
|
|
|
* corresponds to the NPT start of the PLAY request.
|
|
|
|
*
|
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.
2008-11-19 09:06:29 +00:00
|
|
|
* Must be called with GST_RTP_BIN_LOCK */
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
static void
|
2024-04-17 13:50:30 +00:00
|
|
|
gst_rtp_bin_associate (GstRtpBin * bin, GstRtpBinStream * stream,
|
|
|
|
const guint8 len, const guint8 * data, const guint64 ntpnstime,
|
|
|
|
const guint64 extrtptime, const guint64 base_rtptime,
|
|
|
|
const guint64 base_time, const guint clock_rate,
|
|
|
|
const guint64 rtp_clock_base)
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
{
|
2024-04-17 10:21:08 +00:00
|
|
|
/* Don't do any stream offsetting in RFC7273 sync mode. Everything is
|
|
|
|
* handled inside rtpjitterbuffer for this case. */
|
|
|
|
if (bin->rfc7273_sync) {
|
|
|
|
GST_DEBUG_OBJECT (bin, "Doing RFC7273 sync");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2024-04-17 10:30:42 +00:00
|
|
|
/* In case of NTP sync we can directly calculate the offset for this stream
|
|
|
|
* here and return immediately */
|
|
|
|
if (bin->ntp_sync) {
|
|
|
|
GstClockTime rtp_running_time, diff_rtp;
|
|
|
|
GstClockTime local_running_time, local_ntpnstime;
|
|
|
|
gint64 ntpdiff, rtdiff;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin, "Doing NTP sync");
|
|
|
|
|
|
|
|
if (!GST_CLOCK_TIME_IS_VALID (extrtptime)
|
|
|
|
|| !GST_CLOCK_TIME_IS_VALID (ntpnstime)
|
|
|
|
|| extrtptime < base_rtptime) {
|
|
|
|
GST_DEBUG_OBJECT (bin, "invalidated sync data, bailing out");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Take the extended rtptime we found in the SR packet and map it to the
|
|
|
|
* local rtptime. The local rtp time is used to construct timestamps on the
|
|
|
|
* buffers so we will calculate what running_time corresponds to the RTP
|
|
|
|
* timestamp in the SR packet. */
|
|
|
|
diff_rtp = extrtptime - base_rtptime;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"base RTP time %" G_GUINT64_FORMAT ", SR RTP time %" G_GUINT64_FORMAT
|
|
|
|
", RTP time difference %" G_GUINT64_FORMAT ", clock-rate %d",
|
|
|
|
base_rtptime, extrtptime, diff_rtp, clock_rate);
|
|
|
|
|
|
|
|
/* calculate local RTP time in GStreamer timestamp units, we essentially
|
|
|
|
* perform the same conversion that a jitterbuffer would use to convert an
|
|
|
|
* rtp timestamp into a corresponding gstreamer timestamp. Note that the
|
|
|
|
* base_time also contains the drift between sender and receiver. */
|
|
|
|
rtp_running_time =
|
|
|
|
gst_util_uint64_scale_int (diff_rtp, GST_SECOND, clock_rate);
|
|
|
|
rtp_running_time += base_time;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"RTP running time %" GST_TIME_FORMAT ", SR NTP time %" GST_TIME_FORMAT,
|
|
|
|
GST_TIME_ARGS (rtp_running_time), GST_TIME_ARGS (ntpnstime));
|
|
|
|
|
|
|
|
/* For NTP sync we need to first get a snapshot of running_time and NTP
|
|
|
|
* time. We know at what running_time we play a certain RTP time, we also
|
|
|
|
* calculated when we would play the RTP time in the SR packet. Now we need
|
|
|
|
* to know how the running_time and the NTP time relate to each other. */
|
|
|
|
get_current_times (bin, &local_running_time, &local_ntpnstime);
|
|
|
|
|
|
|
|
/* see how far away the NTP time is. This is the difference between the
|
|
|
|
* current NTP time and the NTP time in the last SR packet. */
|
|
|
|
ntpdiff = local_ntpnstime - ntpnstime;
|
|
|
|
|
|
|
|
/* see how far away the running_time is. This is the difference between the
|
|
|
|
* current running_time and the running_time of the RTP timestamp in the
|
|
|
|
* last SR packet. */
|
|
|
|
rtdiff = local_running_time - rtp_running_time;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"local NTP time %" G_GUINT64_FORMAT ", SR NTP time %" G_GUINT64_FORMAT,
|
|
|
|
local_ntpnstime, ntpnstime);
|
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"local running time %" G_GUINT64_FORMAT ", SR RTP running time %"
|
|
|
|
G_GUINT64_FORMAT, local_running_time, rtp_running_time);
|
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"NTP diff %" G_GINT64_FORMAT ", RT diff %" G_GINT64_FORMAT, ntpdiff,
|
|
|
|
rtdiff);
|
|
|
|
|
|
|
|
/* combine to get the final diff to apply to the running_time */
|
|
|
|
stream->rt_delta = rtdiff - ntpdiff;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"Calculated ts-offset %" GST_STIME_FORMAT " for SSRC %08x",
|
|
|
|
GST_STIME_ARGS (stream->rt_delta), stream->ssrc);
|
|
|
|
|
|
|
|
stream_set_ts_offset (bin, stream, stream->rt_delta, bin->max_ts_offset,
|
|
|
|
bin->min_ts_offset, FALSE);
|
|
|
|
|
|
|
|
gst_rtp_bin_send_sync_event (stream);
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* For all other cases (not RFC7273 and not NTP sync) we have to look how
|
|
|
|
* all streams of a client relate to each other */
|
|
|
|
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
/* first find or create the CNAME */
|
2024-04-17 10:44:38 +00:00
|
|
|
GstRtpBinClient *client = get_client (bin, len, data);
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
|
|
|
/* find stream in the client */
|
2024-04-17 10:44:38 +00:00
|
|
|
GSList *walk;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
for (walk = client->streams; walk; walk = g_slist_next (walk)) {
|
|
|
|
GstRtpBinStream *ostream = (GstRtpBinStream *) walk->data;
|
|
|
|
|
|
|
|
if (ostream == stream)
|
|
|
|
break;
|
|
|
|
}
|
2024-04-17 10:44:38 +00:00
|
|
|
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
/* not found, add it to the list */
|
|
|
|
if (walk == NULL) {
|
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"new association of SSRC %08x with client %p with CNAME %s",
|
|
|
|
stream->ssrc, client, client->cname);
|
|
|
|
client->streams = g_slist_prepend (client->streams, stream);
|
|
|
|
client->nstreams++;
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"found association of SSRC %08x with client %p with CNAME %s",
|
|
|
|
stream->ssrc, client, client->cname);
|
|
|
|
}
|
|
|
|
|
2024-04-17 10:44:38 +00:00
|
|
|
/* First decide whether to do RTP-Info or RTCP / NTP header extension sync */
|
|
|
|
gboolean rtp_info_sync = FALSE;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin, "RTCP sync mode %d", bin->rtcp_sync);
|
|
|
|
switch (bin->rtcp_sync) {
|
|
|
|
case GST_RTP_BIN_RTCP_SYNC_ALWAYS:
|
|
|
|
case GST_RTP_BIN_RTCP_SYNC_INITIAL:{
|
|
|
|
if (!GST_CLOCK_TIME_IS_VALID (extrtptime)
|
|
|
|
|| !GST_CLOCK_TIME_IS_VALID (ntpnstime)
|
|
|
|
|| extrtptime < base_rtptime) {
|
|
|
|
GST_DEBUG_OBJECT (bin, "invalidated sync data, bailing out");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin, "Doing RTCP sync");
|
|
|
|
break;
|
2011-08-24 12:37:52 +00:00
|
|
|
}
|
2024-04-17 10:44:38 +00:00
|
|
|
case GST_RTP_BIN_RTCP_SYNC_RTP_INFO:{
|
|
|
|
rtp_info_sync = TRUE;
|
|
|
|
GST_DEBUG_OBJECT (bin, "Doing RTP-Info sync");
|
2011-08-24 12:37:52 +00:00
|
|
|
|
2024-04-17 10:44:38 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
2024-04-17 10:44:38 +00:00
|
|
|
gboolean all_sync = TRUE;
|
|
|
|
gint64 min = G_MAXINT64, rtp_min = G_MAXINT64;
|
2010-08-27 15:58:47 +00:00
|
|
|
|
2024-04-17 10:44:38 +00:00
|
|
|
/* recalc inter stream playout offset based on the selected mode */
|
|
|
|
if (rtp_info_sync) {
|
2024-04-17 10:30:42 +00:00
|
|
|
guint64 ext_base = -1;
|
2024-04-17 10:44:38 +00:00
|
|
|
guint64 rtp_clock_base_ext;
|
|
|
|
gint64 diff_rtp;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"base RTP time %" G_GUINT64_FORMAT ", clock-rate %d, " "clock-base %"
|
|
|
|
G_GUINT64_FORMAT, base_rtptime, clock_rate, rtp_clock_base);
|
2024-04-17 10:30:42 +00:00
|
|
|
|
|
|
|
/* convert to extended RTP time */
|
2024-04-17 10:44:38 +00:00
|
|
|
rtp_clock_base_ext =
|
|
|
|
gst_rtp_buffer_ext_timestamp (&ext_base, rtp_clock_base);
|
|
|
|
|
|
|
|
if (rtp_clock_base_ext >= base_rtptime) {
|
|
|
|
diff_rtp =
|
|
|
|
gst_util_uint64_scale_int (rtp_clock_base_ext - base_rtptime,
|
|
|
|
GST_SECOND, clock_rate);
|
2012-01-20 16:03:21 +00:00
|
|
|
} else {
|
2024-04-17 10:44:38 +00:00
|
|
|
diff_rtp =
|
|
|
|
-gst_util_uint64_scale_int (base_rtptime - rtp_clock_base_ext,
|
|
|
|
GST_SECOND, clock_rate);
|
2011-08-08 10:15:20 +00:00
|
|
|
}
|
2024-04-17 10:44:38 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin, "RTP time difference %" GST_STIME_FORMAT,
|
|
|
|
GST_STIME_ARGS (diff_rtp));
|
|
|
|
|
|
|
|
/* Calculate the difference between NPT start (0) and the local time */
|
|
|
|
stream->rtp_delta = 0 - (base_time + diff_rtp);
|
|
|
|
|
|
|
|
for (walk = client->streams; walk; walk = g_slist_next (walk)) {
|
|
|
|
GstRtpBinStream *ostream = (GstRtpBinStream *) walk->data;
|
|
|
|
|
|
|
|
/* if not set yet for the other stream then ignore it */
|
2024-04-17 14:01:21 +00:00
|
|
|
if (ostream->rtp_delta == G_MININT64) {
|
2024-04-17 10:44:38 +00:00
|
|
|
all_sync = FALSE;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* change in current stream's base from previously init'ed value leads
|
|
|
|
* to reset of all stream's base, e.g. after a seek */
|
|
|
|
if (stream != ostream && stream->clock_base >= 0 &&
|
|
|
|
(stream->clock_base != rtp_clock_base)) {
|
|
|
|
GST_DEBUG_OBJECT (bin, "reset upon clock base change");
|
2024-04-17 14:01:21 +00:00
|
|
|
ostream->clock_base = -1;
|
|
|
|
ostream->rtp_delta = G_MININT64;
|
|
|
|
if (ostream->have_sync == GST_RTP_BIN_STREAM_SYNCED_RTP_INFO)
|
|
|
|
ostream->have_sync = GST_RTP_BIN_STREAM_SYNCED_NONE;
|
|
|
|
continue;
|
2024-04-17 10:44:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (ostream->rtp_delta < rtp_min)
|
|
|
|
rtp_min = ostream->rtp_delta;
|
2024-04-17 10:30:42 +00:00
|
|
|
}
|
|
|
|
} else {
|
2024-04-17 10:44:38 +00:00
|
|
|
GstClockTime rtp_running_time;
|
|
|
|
guint64 diff_rtp;
|
2011-08-08 10:15:20 +00:00
|
|
|
|
2024-04-17 10:44:38 +00:00
|
|
|
/* Take the extended rtptime we found in the SR packet and map it to the
|
|
|
|
* local rtptime. The local rtp time is used to construct timestamps on the
|
|
|
|
* buffers so we will calculate what running_time corresponds to the RTP
|
|
|
|
* timestamp in the SR packet.
|
|
|
|
*
|
|
|
|
* Note: this is always positive!
|
|
|
|
*/
|
|
|
|
diff_rtp = extrtptime - base_rtptime;
|
2011-08-08 10:15:20 +00:00
|
|
|
|
2024-04-17 10:44:38 +00:00
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"base RTP time %" G_GUINT64_FORMAT ", SR RTP time %" G_GUINT64_FORMAT
|
|
|
|
", RTP time difference %" G_GUINT64_FORMAT ", clock-rate %d",
|
|
|
|
base_rtptime, extrtptime, diff_rtp, clock_rate);
|
2008-09-13 01:37:50 +00:00
|
|
|
|
2024-04-17 10:44:38 +00:00
|
|
|
/* calculate local RTP time in gstreamer timestamp, we essentially perform the
|
|
|
|
* same conversion that a jitterbuffer would use to convert an rtp timestamp
|
|
|
|
* into a corresponding gstreamer timestamp. Note that the base_time also
|
|
|
|
* contains the drift between sender and receiver. */
|
|
|
|
rtp_running_time =
|
|
|
|
gst_util_uint64_scale_int (diff_rtp, GST_SECOND, clock_rate);
|
|
|
|
rtp_running_time += base_time;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"SR RTP running time %" GST_TIME_FORMAT ", SR NTP %" GST_TIME_FORMAT,
|
|
|
|
GST_TIME_ARGS (rtp_running_time), GST_TIME_ARGS (ntpnstime));
|
|
|
|
|
|
|
|
/* calculate delta between server and receiver. ntpnstime is created by
|
|
|
|
* converting the ntptime in the last SR packet to a gstreamer timestamp. This
|
|
|
|
* delta expresses the difference to our timeline and the server timeline. The
|
|
|
|
* difference in itself doesn't mean much but we can combine the delta of
|
|
|
|
* multiple streams to create a stream specific offset.
|
|
|
|
*/
|
|
|
|
stream->rt_delta = ntpnstime - rtp_running_time;
|
|
|
|
|
|
|
|
for (walk = client->streams; walk; walk = g_slist_next (walk)) {
|
|
|
|
GstRtpBinStream *ostream = (GstRtpBinStream *) walk->data;
|
|
|
|
|
|
|
|
/* if not set yet for the other stream then ignore it */
|
2024-04-17 14:01:21 +00:00
|
|
|
if (ostream->rt_delta == G_MININT64) {
|
2024-04-17 10:44:38 +00:00
|
|
|
all_sync = FALSE;
|
|
|
|
continue;
|
|
|
|
}
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
2024-04-17 10:44:38 +00:00
|
|
|
if (ostream->rt_delta < min)
|
|
|
|
min = ostream->rt_delta;
|
|
|
|
}
|
2024-04-17 10:30:42 +00:00
|
|
|
}
|
2011-08-08 10:15:20 +00:00
|
|
|
|
2024-04-17 10:44:38 +00:00
|
|
|
/* Above we calculated the min of all deltas for either mode, ignoring
|
|
|
|
* streams that did not yet have a valid delta because we did not yet
|
|
|
|
* receive an SR packet for those streams yet (RTCP mode) or no RTP base
|
|
|
|
* time (RTP-Info mode).
|
|
|
|
*
|
|
|
|
* We calculate the minimum because we would like to only apply positive
|
|
|
|
* offsets to streams, delaying their playback instead of trying to speed up
|
|
|
|
* other streams (which might be impossible when we have to create negative
|
|
|
|
* latencies).
|
|
|
|
*
|
|
|
|
* The stream that has the smallest diff is selected as the reference stream,
|
|
|
|
* all other streams will have a positive offset to this difference.
|
|
|
|
*
|
|
|
|
* we also assume that RTP-Info and RTCP sync give the same results.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* arrange to re-sync for each stream upon significant change, e.g. post-seek
|
|
|
|
* or when the RTP base time changes because of a jitterbuffer reset */
|
2024-04-17 14:01:21 +00:00
|
|
|
all_sync = all_sync && stream->base_rtptime == base_rtptime &&
|
|
|
|
((rtp_info_sync && stream->clock_base == rtp_clock_base)
|
|
|
|
|| (!rtp_info_sync && stream->base_time == base_time));
|
|
|
|
stream->base_rtptime = base_rtptime;
|
|
|
|
if (rtp_info_sync) {
|
|
|
|
stream->clock_base = rtp_clock_base;
|
|
|
|
} else {
|
|
|
|
stream->base_time = base_time;
|
|
|
|
}
|
2011-08-08 10:15:20 +00:00
|
|
|
|
2024-04-17 10:30:42 +00:00
|
|
|
/* may need init performed above later on, but nothing more to do now */
|
|
|
|
if (client->nstreams <= 1)
|
|
|
|
return;
|
2011-08-08 10:15:20 +00:00
|
|
|
|
2024-04-17 10:44:38 +00:00
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"client %p RTP-Info sync %d, min delta %" G_GINT64_FORMAT
|
|
|
|
", min RTP delta %" G_GINT64_FORMAT ", all sync %d", client,
|
|
|
|
rtp_info_sync, min, rtp_min, all_sync);
|
|
|
|
|
|
|
|
/* if all have been synced already, do not bother further */
|
|
|
|
if (bin->rtcp_sync == GST_RTP_BIN_RTCP_SYNC_INITIAL && all_sync) {
|
|
|
|
GST_DEBUG_OBJECT (bin, "all streams already synced; done");
|
|
|
|
return;
|
2024-04-17 10:30:42 +00:00
|
|
|
}
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
2024-04-17 10:30:42 +00:00
|
|
|
/* bail out if we adjusted recently enough */
|
2024-04-17 10:44:38 +00:00
|
|
|
if (all_sync && !rtp_info_sync && GST_CLOCK_TIME_IS_VALID (ntpnstime)
|
|
|
|
&& GST_CLOCK_TIME_IS_VALID (bin->priv->last_ntpnstime)
|
|
|
|
&& ntpnstime - bin->priv->last_ntpnstime <
|
2024-04-17 10:30:42 +00:00
|
|
|
bin->rtcp_sync_interval * GST_MSECOND) {
|
2024-04-17 10:44:38 +00:00
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"discarding RTCP sender packet for sync; "
|
|
|
|
"previous sender info too recent " "(previous NTP %" G_GUINT64_FORMAT
|
|
|
|
")", bin->priv->last_ntpnstime);
|
2024-04-17 10:30:42 +00:00
|
|
|
return;
|
|
|
|
}
|
2024-04-17 10:44:38 +00:00
|
|
|
if (!rtp_info_sync)
|
|
|
|
bin->priv->last_ntpnstime = ntpnstime;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
2024-04-17 10:30:42 +00:00
|
|
|
/* calculate offsets for each stream */
|
|
|
|
for (walk = client->streams; walk; walk = g_slist_next (walk)) {
|
|
|
|
GstRtpBinStream *ostream = (GstRtpBinStream *) walk->data;
|
|
|
|
gint64 ts_offset;
|
|
|
|
|
|
|
|
/* ignore streams for which we didn't receive an SR packet yet, we
|
|
|
|
* can't synchronize them yet. We can however sync other streams just
|
|
|
|
* fine. */
|
2024-04-17 14:01:21 +00:00
|
|
|
if ((rtp_info_sync && ostream->rtp_delta == G_MININT64) ||
|
|
|
|
(!rtp_info_sync && ostream->rt_delta == G_MININT64)) {
|
2024-04-17 10:30:42 +00:00
|
|
|
continue;
|
2024-04-17 14:01:21 +00:00
|
|
|
}
|
2024-04-17 10:30:42 +00:00
|
|
|
|
|
|
|
/* calculate offset to our reference stream, this should always give a
|
|
|
|
* positive number. */
|
2024-04-17 10:44:38 +00:00
|
|
|
if (rtp_info_sync)
|
2024-04-17 10:30:42 +00:00
|
|
|
ts_offset = ostream->rtp_delta - rtp_min;
|
|
|
|
else
|
|
|
|
ts_offset = ostream->rt_delta - min;
|
|
|
|
|
2024-04-17 10:44:38 +00:00
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"Calculated ts-offset %" GST_STIME_FORMAT " for SSRC %08x",
|
|
|
|
GST_STIME_ARGS (ts_offset), ostream->ssrc);
|
|
|
|
|
2024-04-17 10:30:42 +00:00
|
|
|
stream_set_ts_offset (bin, ostream, ts_offset, bin->max_ts_offset,
|
|
|
|
bin->min_ts_offset, TRUE);
|
2024-04-17 14:01:21 +00:00
|
|
|
|
|
|
|
if (rtp_info_sync)
|
|
|
|
ostream->have_sync = GST_RTP_BIN_STREAM_SYNCED_RTP_INFO;
|
|
|
|
else
|
|
|
|
ostream->have_sync = GST_RTP_BIN_STREAM_SYNCED_RTCP;;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
}
|
2024-04-17 10:30:42 +00:00
|
|
|
|
2013-07-03 16:41:42 +00:00
|
|
|
gst_rtp_bin_send_sync_event (stream);
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define GST_RTCP_BUFFER_FOR_PACKETS(b,buffer,packet) \
|
|
|
|
for ((b) = gst_rtcp_buffer_get_first_packet ((buffer), (packet)); (b); \
|
|
|
|
(b) = gst_rtcp_packet_move_to_next ((packet)))
|
|
|
|
|
|
|
|
#define GST_RTCP_SDES_FOR_ITEMS(b,packet) \
|
|
|
|
for ((b) = gst_rtcp_packet_sdes_first_item ((packet)); (b); \
|
|
|
|
(b) = gst_rtcp_packet_sdes_next_item ((packet)))
|
|
|
|
|
|
|
|
#define GST_RTCP_SDES_FOR_ENTRIES(b,packet) \
|
|
|
|
for ((b) = gst_rtcp_packet_sdes_first_entry ((packet)); (b); \
|
|
|
|
(b) = gst_rtcp_packet_sdes_next_entry ((packet)))
|
|
|
|
|
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.
2008-11-19 09:06:29 +00:00
|
|
|
static void
|
|
|
|
gst_rtp_bin_handle_sync (GstElement * jitterbuffer, GstStructure * s,
|
|
|
|
GstRtpBinStream * stream)
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
{
|
|
|
|
GstRtpBin *bin;
|
|
|
|
GstRTCPPacket packet;
|
|
|
|
guint32 ssrc;
|
2022-04-07 15:59:07 +00:00
|
|
|
guint64 ntpnstime, inband_ntpnstime;
|
2022-04-29 20:13:15 +00:00
|
|
|
gboolean have_sr;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
gboolean more;
|
2010-08-27 09:07:34 +00:00
|
|
|
guint64 base_rtptime;
|
|
|
|
guint64 base_time;
|
2008-11-17 15:17:52 +00:00
|
|
|
guint clock_rate;
|
2011-08-08 10:15:20 +00:00
|
|
|
guint64 clock_base;
|
2022-04-07 15:59:07 +00:00
|
|
|
guint64 extrtptime, inband_ext_rtptime;
|
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.
2008-11-19 09:06:29 +00:00
|
|
|
GstBuffer *buffer;
|
2022-04-07 15:59:07 +00:00
|
|
|
const gchar *cname;
|
2011-12-09 09:51:14 +00:00
|
|
|
GstRTCPBuffer rtcp = { NULL, };
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
|
|
|
bin = stream->bin;
|
|
|
|
|
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.
2008-11-19 09:06:29 +00:00
|
|
|
GST_DEBUG_OBJECT (bin, "sync handler called");
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
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.
2008-09-05 13:52:34 +00:00
|
|
|
/* get the last relation between the rtp timestamps and the gstreamer
|
|
|
|
* timestamps. We get this info directly from the jitterbuffer which
|
2008-09-13 01:37:50 +00:00
|
|
|
* constructs gstreamer timestamps from rtp timestamps and so it know exactly
|
|
|
|
* what the current situation is. */
|
2022-04-07 15:59:07 +00:00
|
|
|
if (!gst_structure_get_uint64 (s, "base-rtptime", &base_rtptime) ||
|
|
|
|
!gst_structure_get_uint64 (s, "base-time", &base_time) ||
|
|
|
|
!gst_structure_get_uint (s, "clock-rate", &clock_rate) ||
|
|
|
|
!gst_structure_get_uint64 (s, "clock-base", &clock_base)) {
|
|
|
|
/* invalid structure */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2022-04-11 16:25:43 +00:00
|
|
|
cname = gst_structure_get_string (s, "cname");
|
|
|
|
|
2022-04-07 15:59:07 +00:00
|
|
|
/* if the jitterbuffer directly got the NTP timestamp then don't work
|
|
|
|
* through the RTCP SR, otherwise extract it from there */
|
|
|
|
if (gst_structure_get_uint64 (s, "inband-ntpnstime", &inband_ntpnstime)
|
|
|
|
&& gst_structure_get_uint64 (s, "inband-ext-rtptime", &inband_ext_rtptime)
|
|
|
|
&& (cname = gst_structure_get_string (s, "cname"))
|
|
|
|
&& gst_structure_get_uint (s, "ssrc", &ssrc)) {
|
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"handle sync from inband NTP-64 information for SSRC %08x", ssrc);
|
|
|
|
|
|
|
|
if (ssrc != stream->ssrc)
|
|
|
|
return;
|
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (bin);
|
|
|
|
gst_rtp_bin_associate (bin, stream, strlen (cname), (const guint8 *) cname,
|
|
|
|
inband_ntpnstime, inband_ext_rtptime, base_rtptime, base_time,
|
|
|
|
clock_rate, clock_base);
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!gst_structure_get_uint64 (s, "sr-ext-rtptime", &extrtptime)
|
|
|
|
|| !gst_structure_has_field_typed (s, "sr-buffer", GST_TYPE_BUFFER)) {
|
|
|
|
/* invalid structure */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin, "handle sync from RTCP SR information");
|
|
|
|
|
2022-04-18 13:22:50 +00:00
|
|
|
/* get RTCP SR ntpnstime if available */
|
|
|
|
if (gst_structure_get_uint64 (s, "sr-ntpnstime", &ntpnstime) && cname) {
|
|
|
|
GST_RTP_BIN_LOCK (bin);
|
|
|
|
/* associate the stream to CNAME */
|
|
|
|
gst_rtp_bin_associate (bin, stream, strlen (cname),
|
|
|
|
(const guint8 *) cname, ntpnstime, extrtptime, base_rtptime,
|
|
|
|
base_time, clock_rate, clock_base);
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* otherwise parse the RTCP packet */
|
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.
2008-11-19 09:06:29 +00:00
|
|
|
buffer = gst_value_get_buffer (gst_structure_get_value (s, "sr-buffer"));
|
2008-08-13 14:31:02 +00:00
|
|
|
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
have_sr = FALSE;
|
2011-06-13 15:51:40 +00:00
|
|
|
|
|
|
|
gst_rtcp_buffer_map (buffer, GST_MAP_READ, &rtcp);
|
|
|
|
|
|
|
|
GST_RTCP_BUFFER_FOR_PACKETS (more, &rtcp, &packet) {
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
/* first packet must be SR or RR or else the validate would have failed */
|
|
|
|
switch (gst_rtcp_packet_get_type (&packet)) {
|
|
|
|
case GST_RTCP_TYPE_SR:
|
|
|
|
/* only parse first. There is only supposed to be one SR in the packet
|
2022-04-29 20:13:15 +00:00
|
|
|
* but we will deal with malformed packets gracefully by trying the
|
|
|
|
* next RTCP packet. */
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
if (have_sr)
|
2022-04-29 20:13:15 +00:00
|
|
|
continue;
|
|
|
|
|
|
|
|
/* get NTP time */
|
2022-04-07 15:59:07 +00:00
|
|
|
gst_rtcp_packet_sr_get_sender_info (&packet, &ssrc, &ntpnstime, NULL,
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
NULL, NULL);
|
|
|
|
|
2022-04-07 15:59:07 +00:00
|
|
|
/* convert ntptime to nanoseconds */
|
|
|
|
ntpnstime = gst_util_uint64_scale (ntpnstime, GST_SECOND,
|
|
|
|
(G_GINT64_CONSTANT (1) << 32));
|
|
|
|
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
GST_DEBUG_OBJECT (bin, "received sync packet from SSRC %08x", ssrc);
|
2022-04-29 20:13:15 +00:00
|
|
|
|
|
|
|
/* ignore SR that is not ours and check the next RTCP packet */
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
if (ssrc != stream->ssrc)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
have_sr = TRUE;
|
2022-04-11 16:25:43 +00:00
|
|
|
|
|
|
|
/* If we already have the CNAME don't require parsing SDES */
|
|
|
|
if (cname) {
|
|
|
|
GST_RTP_BIN_LOCK (bin);
|
|
|
|
/* associate the stream to CNAME */
|
|
|
|
gst_rtp_bin_associate (bin, stream, strlen (cname),
|
|
|
|
(const guint8 *) cname, ntpnstime, extrtptime, base_rtptime,
|
|
|
|
base_time, clock_rate, clock_base);
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
2022-04-29 20:13:15 +00:00
|
|
|
|
|
|
|
goto out;
|
2022-04-11 16:25:43 +00:00
|
|
|
}
|
|
|
|
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
break;
|
|
|
|
case GST_RTCP_TYPE_SDES:
|
|
|
|
{
|
2022-04-29 20:13:15 +00:00
|
|
|
gboolean more_items;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
2022-04-29 20:13:15 +00:00
|
|
|
/* Bail out if we have not seen an SR item yet. */
|
|
|
|
if (!have_sr)
|
|
|
|
goto out;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
|
|
|
GST_RTCP_SDES_FOR_ITEMS (more_items, &packet) {
|
2022-04-29 20:13:15 +00:00
|
|
|
gboolean more_entries;
|
|
|
|
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
/* skip items that are not about the SSRC of the sender */
|
|
|
|
if (gst_rtcp_packet_sdes_get_ssrc (&packet) != ssrc)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* find the CNAME entry */
|
|
|
|
GST_RTCP_SDES_FOR_ENTRIES (more_entries, &packet) {
|
|
|
|
GstRTCPSDESType type;
|
|
|
|
guint8 len;
|
2022-04-29 20:13:15 +00:00
|
|
|
const guint8 *data;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
2022-04-29 20:13:15 +00:00
|
|
|
gst_rtcp_packet_sdes_get_entry (&packet, &type, &len,
|
|
|
|
(guint8 **) & data);
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
|
|
|
if (type == GST_RTCP_SDES_CNAME) {
|
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.
2008-11-19 09:06:29 +00:00
|
|
|
GST_RTP_BIN_LOCK (bin);
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
/* associate the stream to CNAME */
|
2008-11-26 11:44:37 +00:00
|
|
|
gst_rtp_bin_associate (bin, stream, len, data,
|
2022-04-07 15:59:07 +00:00
|
|
|
ntpnstime, extrtptime, base_rtptime, base_time, clock_rate,
|
2011-08-08 10:15:20 +00:00
|
|
|
clock_base);
|
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.
2008-11-19 09:06:29 +00:00
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
2022-04-29 20:13:15 +00:00
|
|
|
|
|
|
|
goto out;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-04-29 20:13:15 +00:00
|
|
|
|
|
|
|
/* only deal with first SDES, there is only supposed to be one SDES in
|
|
|
|
* the RTCP packet but we deal with bad packets gracefully. */
|
|
|
|
goto out;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
/* we can ignore these packets */
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2022-04-29 20:13:15 +00:00
|
|
|
out:
|
2011-06-13 15:51:40 +00:00
|
|
|
gst_rtcp_buffer_unmap (&rtcp);
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
}
|
|
|
|
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
/* create a new stream with @ssrc in @session. Must be called with
|
|
|
|
* RTP_SESSION_LOCK. */
|
2007-08-23 21:39:58 +00:00
|
|
|
static GstRtpBinStream *
|
|
|
|
create_stream (GstRtpBinSession * session, guint32 ssrc)
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
{
|
2009-09-08 15:37:15 +00:00
|
|
|
GstElement *buffer, *demux = NULL;
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBinStream *stream;
|
2009-05-22 10:20:13 +00:00
|
|
|
GstRtpBin *rtpbin;
|
|
|
|
GstState target;
|
2017-12-19 17:23:16 +00:00
|
|
|
GObjectClass *jb_class;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
2009-09-08 15:37:15 +00:00
|
|
|
rtpbin = session->bin;
|
|
|
|
|
2016-05-06 07:44:42 +00:00
|
|
|
if (g_slist_length (session->streams) >= rtpbin->max_streams)
|
|
|
|
goto max_streams;
|
|
|
|
|
2017-12-19 17:23:16 +00:00
|
|
|
if (!(buffer =
|
|
|
|
session_request_element (session, SIGNAL_REQUEST_JITTERBUFFER)))
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
goto no_jitterbuffer;
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
if (!rtpbin->ignore_pt) {
|
2011-11-24 00:52:40 +00:00
|
|
|
if (!(demux = gst_element_factory_make ("rtpptdemux", NULL)))
|
2009-09-08 15:37:15 +00:00
|
|
|
goto no_demux;
|
2017-11-28 05:02:05 +00:00
|
|
|
}
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
2007-08-23 21:39:58 +00:00
|
|
|
stream = g_new0 (GstRtpBinStream, 1);
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
stream->ssrc = ssrc;
|
2009-05-22 10:20:13 +00:00
|
|
|
stream->bin = rtpbin;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
stream->session = session;
|
2017-12-19 17:23:16 +00:00
|
|
|
stream->buffer = gst_object_ref (buffer);
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
stream->demux = demux;
|
2009-09-08 15:37:15 +00:00
|
|
|
|
2024-04-17 14:01:21 +00:00
|
|
|
stream->have_sync = GST_RTP_BIN_STREAM_SYNCED_NONE;
|
|
|
|
stream->rt_delta = G_MININT64;
|
|
|
|
stream->rtp_delta = G_MININT64;
|
|
|
|
stream->base_rtptime = -1;
|
|
|
|
stream->base_time = GST_CLOCK_TIME_NONE;
|
|
|
|
stream->clock_base = -1;
|
|
|
|
|
2019-02-26 15:39:55 +00:00
|
|
|
stream->avg_ts_offset = 0;
|
|
|
|
stream->is_initialized = FALSE;
|
2024-04-17 14:01:21 +00:00
|
|
|
|
2009-10-05 17:45:35 +00:00
|
|
|
stream->percent = 100;
|
2024-04-17 14:01:21 +00:00
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
session->streams = g_slist_prepend (session->streams, stream);
|
|
|
|
|
2017-12-19 17:23:16 +00:00
|
|
|
jb_class = G_OBJECT_GET_CLASS (G_OBJECT (buffer));
|
|
|
|
|
|
|
|
if (g_signal_lookup ("request-pt-map", G_OBJECT_TYPE (buffer)) != 0) {
|
|
|
|
/* provide clock_rate to the jitterbuffer when needed */
|
|
|
|
stream->buffer_ptreq_sig = g_signal_connect (buffer, "request-pt-map",
|
|
|
|
(GCallback) pt_map_requested, session);
|
|
|
|
}
|
|
|
|
if (g_signal_lookup ("on-npt-stop", G_OBJECT_TYPE (buffer)) != 0) {
|
|
|
|
stream->buffer_ntpstop_sig = g_signal_connect (buffer, "on-npt-stop",
|
|
|
|
(GCallback) on_npt_stop, stream);
|
|
|
|
}
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
|
2009-10-05 19:31:59 +00:00
|
|
|
g_object_set_data (G_OBJECT (buffer), "GstRTPBin.session", session);
|
|
|
|
g_object_set_data (G_OBJECT (buffer), "GstRTPBin.stream", stream);
|
2009-10-05 17:45:35 +00:00
|
|
|
|
2008-04-25 11:32:09 +00:00
|
|
|
/* configure latency and packet lost */
|
2024-02-13 17:57:05 +00:00
|
|
|
if (g_object_class_find_property (jb_class, "latency"))
|
|
|
|
g_object_set (buffer, "latency", rtpbin->latency_ms, NULL);
|
2017-12-19 17:23:16 +00:00
|
|
|
if (g_object_class_find_property (jb_class, "drop-on-latency"))
|
|
|
|
g_object_set (buffer, "drop-on-latency", rtpbin->drop_on_latency, NULL);
|
|
|
|
if (g_object_class_find_property (jb_class, "do-lost"))
|
|
|
|
g_object_set (buffer, "do-lost", rtpbin->do_lost, NULL);
|
|
|
|
if (g_object_class_find_property (jb_class, "mode"))
|
|
|
|
g_object_set (buffer, "mode", rtpbin->buffer_mode, NULL);
|
|
|
|
if (g_object_class_find_property (jb_class, "do-retransmission"))
|
|
|
|
g_object_set (buffer, "do-retransmission", rtpbin->do_retransmission, NULL);
|
|
|
|
if (g_object_class_find_property (jb_class, "max-rtcp-rtp-time-diff"))
|
|
|
|
g_object_set (buffer, "max-rtcp-rtp-time-diff",
|
|
|
|
rtpbin->max_rtcp_rtp_time_diff, NULL);
|
|
|
|
if (g_object_class_find_property (jb_class, "max-dropout-time"))
|
|
|
|
g_object_set (buffer, "max-dropout-time", rtpbin->max_dropout_time, NULL);
|
|
|
|
if (g_object_class_find_property (jb_class, "max-misorder-time"))
|
2020-02-20 02:43:13 +00:00
|
|
|
g_object_set (buffer, "max-misorder-time", rtpbin->max_misorder_time, NULL);
|
2017-12-19 17:23:16 +00:00
|
|
|
if (g_object_class_find_property (jb_class, "rfc7273-sync"))
|
|
|
|
g_object_set (buffer, "rfc7273-sync", rtpbin->rfc7273_sync, NULL);
|
2022-03-15 11:56:28 +00:00
|
|
|
if (g_object_class_find_property (jb_class, "add-reference-timestamp-meta"))
|
|
|
|
g_object_set (buffer, "add-reference-timestamp-meta",
|
|
|
|
rtpbin->add_reference_timestamp_meta, NULL);
|
2017-12-19 17:23:16 +00:00
|
|
|
if (g_object_class_find_property (jb_class, "max-ts-offset-adjustment"))
|
|
|
|
g_object_set (buffer, "max-ts-offset-adjustment",
|
|
|
|
rtpbin->max_ts_offset_adjustment, NULL);
|
2022-04-18 08:50:48 +00:00
|
|
|
if (g_object_class_find_property (jb_class, "sync-interval"))
|
|
|
|
g_object_set (buffer, "sync-interval", rtpbin->rtcp_sync_interval, NULL);
|
2007-04-25 15:48:46 +00:00
|
|
|
|
2013-12-30 15:52:28 +00:00
|
|
|
g_signal_emit (rtpbin, gst_rtp_bin_signals[SIGNAL_NEW_JITTERBUFFER], 0,
|
|
|
|
buffer, session->id, ssrc);
|
|
|
|
|
2009-09-08 15:37:15 +00:00
|
|
|
if (!rtpbin->ignore_pt)
|
|
|
|
gst_bin_add (GST_BIN_CAST (rtpbin), demux);
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
|
|
|
/* link stuff */
|
2009-09-08 15:37:15 +00:00
|
|
|
if (demux)
|
2013-09-25 15:36:15 +00:00
|
|
|
gst_element_link_pads_full (buffer, "src", demux, "sink",
|
|
|
|
GST_PAD_LINK_CHECK_NOTHING);
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
2010-05-03 09:51:37 +00:00
|
|
|
if (rtpbin->buffering) {
|
|
|
|
guint64 last_out;
|
|
|
|
|
2017-12-19 17:23:16 +00:00
|
|
|
if (g_signal_lookup ("set-active", G_OBJECT_TYPE (buffer)) != 0) {
|
|
|
|
GST_INFO_OBJECT (rtpbin,
|
|
|
|
"bin is buffering, set jitterbuffer as not active");
|
|
|
|
g_signal_emit_by_name (buffer, "set-active", FALSE, (gint64) 0,
|
|
|
|
&last_out);
|
|
|
|
}
|
2010-05-03 09:51:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-05-22 10:20:13 +00:00
|
|
|
GST_OBJECT_LOCK (rtpbin);
|
|
|
|
target = GST_STATE_TARGET (rtpbin);
|
|
|
|
GST_OBJECT_UNLOCK (rtpbin);
|
|
|
|
|
|
|
|
/* from sink to source */
|
2009-09-08 15:37:15 +00:00
|
|
|
if (demux)
|
|
|
|
gst_element_set_state (demux, target);
|
|
|
|
|
2009-05-22 10:20:13 +00:00
|
|
|
gst_element_set_state (buffer, target);
|
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
return stream;
|
|
|
|
|
|
|
|
/* ERRORS */
|
2016-05-06 07:44:42 +00:00
|
|
|
max_streams:
|
|
|
|
{
|
2019-09-02 12:27:35 +00:00
|
|
|
GST_WARNING_OBJECT (rtpbin, "stream exceeds maximum (%d)",
|
2016-05-06 07:44:42 +00:00
|
|
|
rtpbin->max_streams);
|
|
|
|
return NULL;
|
|
|
|
}
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
no_jitterbuffer:
|
|
|
|
{
|
2013-09-23 13:36:32 +00:00
|
|
|
g_warning ("rtpbin: could not create rtpjitterbuffer element");
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
no_demux:
|
|
|
|
{
|
|
|
|
gst_object_unref (buffer);
|
2013-09-23 13:36:32 +00:00
|
|
|
g_warning ("rtpbin: could not create rtpptdemux element");
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2007-04-03 11:35:39 +00:00
|
|
|
}
|
|
|
|
|
2011-09-26 21:42:51 +00:00
|
|
|
/* called with RTP_BIN_LOCK */
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
static void
|
2011-09-26 21:42:51 +00:00
|
|
|
free_stream (GstRtpBinStream * stream, GstRtpBin * bin)
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
{
|
2020-09-23 19:25:36 +00:00
|
|
|
GstRtpBinSession *sess = stream->session;
|
2011-09-26 21:42:51 +00:00
|
|
|
GSList *clients, *next_client;
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
|
2011-09-26 21:42:51 +00:00
|
|
|
GST_DEBUG_OBJECT (bin, "freeing stream %p", stream);
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
|
2019-12-19 22:48:09 +00:00
|
|
|
gst_element_set_locked_state (stream->buffer, TRUE);
|
|
|
|
if (stream->demux)
|
|
|
|
gst_element_set_locked_state (stream->demux, TRUE);
|
|
|
|
|
|
|
|
gst_element_set_state (stream->buffer, GST_STATE_NULL);
|
|
|
|
if (stream->demux)
|
|
|
|
gst_element_set_state (stream->demux, GST_STATE_NULL);
|
|
|
|
|
2009-09-08 15:37:15 +00:00
|
|
|
if (stream->demux) {
|
|
|
|
g_signal_handler_disconnect (stream->demux, stream->demux_newpad_sig);
|
|
|
|
g_signal_handler_disconnect (stream->demux, stream->demux_ptreq_sig);
|
|
|
|
g_signal_handler_disconnect (stream->demux, stream->demux_ptchange_sig);
|
2019-12-19 22:48:09 +00:00
|
|
|
g_signal_handler_disconnect (stream->demux, stream->demux_padremoved_sig);
|
2009-09-08 15:37:15 +00:00
|
|
|
}
|
2017-12-19 17:23:16 +00:00
|
|
|
|
|
|
|
if (stream->buffer_handlesync_sig)
|
|
|
|
g_signal_handler_disconnect (stream->buffer, stream->buffer_handlesync_sig);
|
|
|
|
if (stream->buffer_ptreq_sig)
|
|
|
|
g_signal_handler_disconnect (stream->buffer, stream->buffer_ptreq_sig);
|
|
|
|
if (stream->buffer_ntpstop_sig)
|
|
|
|
g_signal_handler_disconnect (stream->buffer, stream->buffer_ntpstop_sig);
|
|
|
|
|
2020-09-23 19:25:36 +00:00
|
|
|
sess->elements = g_slist_remove (sess->elements, stream->buffer);
|
|
|
|
remove_bin_element (stream->buffer, bin);
|
2017-12-19 17:23:16 +00:00
|
|
|
gst_object_unref (stream->buffer);
|
2020-09-23 19:25:36 +00:00
|
|
|
|
2009-09-08 15:37:15 +00:00
|
|
|
if (stream->demux)
|
2011-09-26 21:42:51 +00:00
|
|
|
gst_bin_remove (GST_BIN_CAST (bin), stream->demux);
|
|
|
|
|
|
|
|
for (clients = bin->clients; clients; clients = next_client) {
|
|
|
|
GstRtpBinClient *client = (GstRtpBinClient *) clients->data;
|
|
|
|
GSList *streams, *next_stream;
|
|
|
|
|
|
|
|
next_client = g_slist_next (clients);
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
|
2011-09-26 21:42:51 +00:00
|
|
|
for (streams = client->streams; streams; streams = next_stream) {
|
|
|
|
GstRtpBinStream *ostream = (GstRtpBinStream *) streams->data;
|
|
|
|
|
|
|
|
next_stream = g_slist_next (streams);
|
|
|
|
|
|
|
|
if (ostream == stream) {
|
|
|
|
client->streams = g_slist_delete_link (client->streams, streams);
|
|
|
|
/* If this was the last stream belonging to this client,
|
|
|
|
* clean up the client. */
|
|
|
|
if (--client->nstreams == 0) {
|
|
|
|
bin->clients = g_slist_delete_link (bin->clients, clients);
|
|
|
|
free_client (client, bin);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
g_free (stream);
|
|
|
|
}
|
|
|
|
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
/* GObject vmethods */
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
static void gst_rtp_bin_dispose (GObject * object);
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
static void gst_rtp_bin_finalize (GObject * object);
|
|
|
|
static void gst_rtp_bin_set_property (GObject * object, guint prop_id,
|
|
|
|
const GValue * value, GParamSpec * pspec);
|
|
|
|
static void gst_rtp_bin_get_property (GObject * object, guint prop_id,
|
|
|
|
GValue * value, GParamSpec * pspec);
|
|
|
|
|
|
|
|
/* GstElement vmethods */
|
|
|
|
static GstStateChangeReturn gst_rtp_bin_change_state (GstElement * element,
|
|
|
|
GstStateChange transition);
|
|
|
|
static GstPad *gst_rtp_bin_request_new_pad (GstElement * element,
|
2011-06-13 15:51:40 +00:00
|
|
|
GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
static void gst_rtp_bin_release_pad (GstElement * element, GstPad * pad);
|
2007-12-10 18:36:04 +00:00
|
|
|
static void gst_rtp_bin_handle_message (GstBin * bin, GstMessage * message);
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
|
2011-06-13 15:51:40 +00:00
|
|
|
#define gst_rtp_bin_parent_class parent_class
|
2018-06-23 21:44:19 +00:00
|
|
|
G_DEFINE_TYPE_WITH_PRIVATE (GstRtpBin, gst_rtp_bin, GST_TYPE_BIN);
|
2021-02-16 13:24:33 +00:00
|
|
|
GST_ELEMENT_REGISTER_DEFINE (rtpbin, "rtpbin", GST_RANK_NONE, GST_TYPE_RTP_BIN);
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
|
2013-12-30 13:56:07 +00:00
|
|
|
static gboolean
|
|
|
|
_gst_element_accumulator (GSignalInvocationHint * ihint,
|
|
|
|
GValue * return_accu, const GValue * handler_return, gpointer dummy)
|
|
|
|
{
|
|
|
|
GstElement *element;
|
|
|
|
|
|
|
|
element = g_value_get_object (handler_return);
|
|
|
|
GST_DEBUG ("got element %" GST_PTR_FORMAT, element);
|
|
|
|
|
2021-03-19 08:35:09 +00:00
|
|
|
g_value_set_object (return_accu, element);
|
2013-12-30 13:56:07 +00:00
|
|
|
|
|
|
|
/* stop emission if we have an element */
|
|
|
|
return (element == NULL);
|
|
|
|
}
|
|
|
|
|
2014-01-21 14:48:20 +00:00
|
|
|
static gboolean
|
|
|
|
_gst_caps_accumulator (GSignalInvocationHint * ihint,
|
|
|
|
GValue * return_accu, const GValue * handler_return, gpointer dummy)
|
|
|
|
{
|
|
|
|
GstCaps *caps;
|
|
|
|
|
|
|
|
caps = g_value_get_boxed (handler_return);
|
|
|
|
GST_DEBUG ("got caps %" GST_PTR_FORMAT, caps);
|
|
|
|
|
2021-03-19 08:35:09 +00:00
|
|
|
g_value_set_boxed (return_accu, caps);
|
2014-01-21 14:48:20 +00:00
|
|
|
|
|
|
|
/* stop emission if we have a caps */
|
|
|
|
return (caps == NULL);
|
|
|
|
}
|
|
|
|
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
static void
|
2007-08-23 21:39:58 +00:00
|
|
|
gst_rtp_bin_class_init (GstRtpBinClass * klass)
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
{
|
|
|
|
GObjectClass *gobject_class;
|
|
|
|
GstElementClass *gstelement_class;
|
2007-12-10 18:36:04 +00:00
|
|
|
GstBinClass *gstbin_class;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
|
|
|
|
gobject_class = (GObjectClass *) klass;
|
|
|
|
gstelement_class = (GstElementClass *) klass;
|
2007-12-10 18:36:04 +00:00
|
|
|
gstbin_class = (GstBinClass *) klass;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
gobject_class->dispose = gst_rtp_bin_dispose;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
gobject_class->finalize = gst_rtp_bin_finalize;
|
|
|
|
gobject_class->set_property = gst_rtp_bin_set_property;
|
|
|
|
gobject_class->get_property = gst_rtp_bin_get_property;
|
|
|
|
|
2007-04-25 15:48:46 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_LATENCY,
|
|
|
|
g_param_spec_uint ("latency", "Buffer latency in ms",
|
2007-05-23 13:08:52 +00:00
|
|
|
"Default amount of ms to buffer in the jitterbuffers", 0,
|
2010-10-13 14:21:23 +00:00
|
|
|
G_MAXUINT, DEFAULT_LATENCY_MS,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2007-04-25 15:48:46 +00:00
|
|
|
|
2012-08-16 23:51:16 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_DROP_ON_LATENCY,
|
|
|
|
g_param_spec_boolean ("drop-on-latency",
|
|
|
|
"Drop buffers when maximum latency is reached",
|
|
|
|
"Tells the jitterbuffer to never exceed the given latency in size",
|
|
|
|
DEFAULT_DROP_ON_LATENCY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
/**
|
2007-08-23 21:39:58 +00:00
|
|
|
* GstRtpBin::request-pt-map:
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
|
|
|
* @pt: the pt
|
|
|
|
*
|
|
|
|
* Request the payload type as #GstCaps for @pt in @session.
|
|
|
|
*/
|
2007-04-10 09:14:07 +00:00
|
|
|
gst_rtp_bin_signals[SIGNAL_REQUEST_PT_MAP] =
|
|
|
|
g_signal_new ("request-pt-map", G_TYPE_FROM_CLASS (klass),
|
2007-08-23 21:39:58 +00:00
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, request_pt_map),
|
2019-08-26 06:03:24 +00:00
|
|
|
_gst_caps_accumulator, NULL, NULL, GST_TYPE_CAPS, 2, G_TYPE_UINT,
|
|
|
|
G_TYPE_UINT);
|
2009-09-08 11:59:56 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstRtpBin::payload-type-change:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
|
|
|
* @pt: the pt
|
|
|
|
*
|
|
|
|
* Signal that the current payload type changed to @pt in @session.
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_PAYLOAD_TYPE_CHANGE] =
|
|
|
|
g_signal_new ("payload-type-change", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, payload_type_change),
|
2019-08-26 06:03:24 +00:00
|
|
|
NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
|
2009-09-08 11:59:56 +00:00
|
|
|
|
2007-05-23 13:08:52 +00:00
|
|
|
/**
|
2007-08-23 21:39:58 +00:00
|
|
|
* GstRtpBin::clear-pt-map:
|
2007-05-23 13:08:52 +00:00
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
*
|
|
|
|
* Clear all previously cached pt-mapping obtained with
|
2008-06-16 07:03:58 +00:00
|
|
|
* #GstRtpBin::request-pt-map.
|
2007-05-23 13:08:52 +00:00
|
|
|
*/
|
2007-05-14 15:28:36 +00:00
|
|
|
gst_rtp_bin_signals[SIGNAL_CLEAR_PT_MAP] =
|
|
|
|
g_signal_new ("clear-pt-map", G_TYPE_FROM_CLASS (klass),
|
2007-10-08 10:39:35 +00:00
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
clear_pt_map), NULL, NULL, NULL, G_TYPE_NONE, 0, G_TYPE_NONE);
|
2009-09-08 11:59:56 +00:00
|
|
|
|
2008-11-26 11:44:37 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::reset-sync:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
*
|
|
|
|
* Reset all currently configured lip-sync parameters and require new SR
|
|
|
|
* packets for all streams before lip-sync is attempted again.
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_RESET_SYNC] =
|
|
|
|
g_signal_new ("reset-sync", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
reset_sync), NULL, NULL, NULL, G_TYPE_NONE, 0, G_TYPE_NONE);
|
2008-11-26 11:44:37 +00:00
|
|
|
|
2015-12-10 11:15:52 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::get-session:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @id: the session id
|
|
|
|
*
|
|
|
|
* Request the related GstRtpSession as #GstElement related with session @id.
|
|
|
|
*
|
|
|
|
* Since: 1.8
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_GET_SESSION] =
|
|
|
|
g_signal_new ("get-session", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
get_session), NULL, NULL, NULL, GST_TYPE_ELEMENT, 1, G_TYPE_UINT);
|
2015-12-10 11:15:52 +00:00
|
|
|
|
2008-10-07 18:54:41 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::get-internal-session:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @id: the session id
|
|
|
|
*
|
|
|
|
* Request the internal RTPSession object as #GObject in session @id.
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_GET_INTERNAL_SESSION] =
|
|
|
|
g_signal_new ("get-internal-session", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
get_internal_session), NULL, NULL, NULL, RTP_TYPE_SESSION, 1,
|
|
|
|
G_TYPE_UINT);
|
2007-05-14 15:28:36 +00:00
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::get-internal-storage:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @id: the session id
|
|
|
|
*
|
2019-02-19 17:15:19 +00:00
|
|
|
* Request the internal RTPStorage object as #GObject in session @id. This
|
|
|
|
* is the internal storage used by the RTPStorage element, which is used to
|
|
|
|
* keep a backlog of received RTP packets for the session @id.
|
2018-02-26 15:53:08 +00:00
|
|
|
*
|
|
|
|
* Since: 1.14
|
2017-11-28 05:02:05 +00:00
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_GET_INTERNAL_STORAGE] =
|
|
|
|
g_signal_new ("get-internal-storage", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
get_internal_storage), NULL, NULL, NULL, G_TYPE_OBJECT, 1,
|
|
|
|
G_TYPE_UINT);
|
2017-11-28 05:02:05 +00:00
|
|
|
|
2018-04-02 21:04:06 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::get-storage:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @id: the session id
|
|
|
|
*
|
2019-02-19 17:15:19 +00:00
|
|
|
* Request the RTPStorage element as #GObject in session @id. This element
|
|
|
|
* is used to keep a backlog of received RTP packets for the session @id.
|
2018-04-02 21:04:06 +00:00
|
|
|
*
|
|
|
|
* Since: 1.16
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_GET_STORAGE] =
|
|
|
|
g_signal_new ("get-storage", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
get_storage), NULL, NULL, NULL, GST_TYPE_ELEMENT, 1, G_TYPE_UINT);
|
2018-04-02 21:04:06 +00:00
|
|
|
|
2020-09-24 17:13:00 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::clear-ssrc:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @id: the session id
|
|
|
|
* @ssrc: the ssrc
|
|
|
|
*
|
|
|
|
* Remove all pads from rtpssrcdemux element associated with the specified
|
|
|
|
* ssrc. This delegate the action signal to the rtpssrcdemux element
|
|
|
|
* associated with the specified session.
|
|
|
|
*
|
|
|
|
* Since: 1.20
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_CLEAR_SSRC] =
|
|
|
|
g_signal_new ("clear-ssrc", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRtpBinClass,
|
|
|
|
clear_ssrc), NULL, NULL, NULL, G_TYPE_NONE, 2,
|
|
|
|
G_TYPE_UINT, G_TYPE_UINT);
|
|
|
|
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
/**
|
2007-08-23 21:39:58 +00:00
|
|
|
* GstRtpBin::on-new-ssrc:
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
2009-08-31 14:33:26 +00:00
|
|
|
* @ssrc: the SSRC
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
*
|
|
|
|
* Notify of a new SSRC that entered @session.
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_ON_NEW_SSRC] =
|
|
|
|
g_signal_new ("on-new-ssrc", G_TYPE_FROM_CLASS (klass),
|
2007-08-23 21:39:58 +00:00
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_new_ssrc),
|
2019-08-26 06:03:24 +00:00
|
|
|
NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
/**
|
2007-12-10 15:34:19 +00:00
|
|
|
* GstRtpBin::on-ssrc-collision:
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
2009-08-31 14:33:26 +00:00
|
|
|
* @ssrc: the SSRC
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
*
|
|
|
|
* Notify when we have an SSRC collision
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_ON_SSRC_COLLISION] =
|
|
|
|
g_signal_new ("on-ssrc-collision", G_TYPE_FROM_CLASS (klass),
|
2007-08-23 21:39:58 +00:00
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_ssrc_collision),
|
2019-08-26 06:03:24 +00:00
|
|
|
NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
/**
|
2007-12-10 15:34:19 +00:00
|
|
|
* GstRtpBin::on-ssrc-validated:
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
2009-08-31 14:33:26 +00:00
|
|
|
* @ssrc: the SSRC
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
*
|
|
|
|
* Notify of a new SSRC that became validated.
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_ON_SSRC_VALIDATED] =
|
|
|
|
g_signal_new ("on-ssrc-validated", G_TYPE_FROM_CLASS (klass),
|
2007-08-23 21:39:58 +00:00
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_ssrc_validated),
|
2019-08-26 06:03:24 +00:00
|
|
|
NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
|
2007-09-20 14:34:57 +00:00
|
|
|
/**
|
2007-12-10 15:34:19 +00:00
|
|
|
* GstRtpBin::on-ssrc-active:
|
2007-09-20 14:34:57 +00:00
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
|
|
|
* @ssrc: the SSRC
|
|
|
|
*
|
|
|
|
* Notify of a SSRC that is active, i.e., sending RTCP.
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_ON_SSRC_ACTIVE] =
|
|
|
|
g_signal_new ("on-ssrc-active", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_ssrc_active),
|
2019-08-26 06:03:24 +00:00
|
|
|
NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
|
2007-12-10 15:34:19 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::on-ssrc-sdes:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
|
|
|
* @ssrc: the SSRC
|
|
|
|
*
|
|
|
|
* Notify of a SSRC that is active, i.e., sending RTCP.
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_ON_SSRC_SDES] =
|
|
|
|
g_signal_new ("on-ssrc-sdes", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_ssrc_sdes),
|
2019-08-26 06:03:24 +00:00
|
|
|
NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
|
|
|
|
/**
|
2007-08-23 21:39:58 +00:00
|
|
|
* GstRtpBin::on-bye-ssrc:
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
2009-08-31 14:33:26 +00:00
|
|
|
* @ssrc: the SSRC
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
*
|
|
|
|
* Notify of an SSRC that became inactive because of a BYE packet.
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_ON_BYE_SSRC] =
|
|
|
|
g_signal_new ("on-bye-ssrc", G_TYPE_FROM_CLASS (klass),
|
2007-08-23 21:39:58 +00:00
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_bye_ssrc),
|
2019-08-26 06:03:24 +00:00
|
|
|
NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
/**
|
2007-08-23 21:39:58 +00:00
|
|
|
* GstRtpBin::on-bye-timeout:
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
2009-08-31 14:33:26 +00:00
|
|
|
* @ssrc: the SSRC
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
*
|
|
|
|
* Notify of an SSRC that has timed out because of BYE
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_ON_BYE_TIMEOUT] =
|
|
|
|
g_signal_new ("on-bye-timeout", G_TYPE_FROM_CLASS (klass),
|
2007-08-23 21:39:58 +00:00
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_bye_timeout),
|
2019-08-26 06:03:24 +00:00
|
|
|
NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
/**
|
2007-08-23 21:39:58 +00:00
|
|
|
* GstRtpBin::on-timeout:
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
2009-08-31 14:33:26 +00:00
|
|
|
* @ssrc: the SSRC
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
*
|
|
|
|
* Notify of an SSRC that has timed out
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_ON_TIMEOUT] =
|
|
|
|
g_signal_new ("on-timeout", G_TYPE_FROM_CLASS (klass),
|
2007-08-23 21:39:58 +00:00
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_timeout),
|
2019-08-26 06:03:24 +00:00
|
|
|
NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
|
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.
2008-09-05 13:52:34 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::on-sender-timeout:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
2009-08-31 14:33:26 +00:00
|
|
|
* @ssrc: the SSRC
|
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.
2008-09-05 13:52:34 +00:00
|
|
|
*
|
|
|
|
* Notify of a sender SSRC that has timed out and became a receiver
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_ON_SENDER_TIMEOUT] =
|
|
|
|
g_signal_new ("on-sender-timeout", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_sender_timeout),
|
2019-08-26 06:03:24 +00:00
|
|
|
NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
|
2009-03-27 16:44:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstRtpBin::on-npt-stop:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
2009-08-31 14:33:26 +00:00
|
|
|
* @ssrc: the SSRC
|
2009-03-27 16:44:57 +00:00
|
|
|
*
|
|
|
|
* Notify that SSRC sender has sent data up to the configured NPT stop time.
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_ON_NPT_STOP] =
|
|
|
|
g_signal_new ("on-npt-stop", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_npt_stop),
|
2019-08-26 06:03:24 +00:00
|
|
|
NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
|
gst/rtpmanager/: Remove complicated async queue and replace with more simple 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-08-10 17:16:53 +00:00
|
|
|
|
2013-12-05 23:53:52 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::request-rtp-encoder:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
|
|
|
*
|
|
|
|
* Request an RTP encoder element for the given @session. The encoder
|
|
|
|
* element will be added to the bin if not previously added.
|
|
|
|
*
|
|
|
|
* If no handler is connected, no encoder will be used.
|
2013-12-30 15:59:20 +00:00
|
|
|
*
|
|
|
|
* Since: 1.4
|
2013-12-05 23:53:52 +00:00
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_REQUEST_RTP_ENCODER] =
|
|
|
|
g_signal_new ("request-rtp-encoder", G_TYPE_FROM_CLASS (klass),
|
2013-12-30 13:56:07 +00:00
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
request_rtp_encoder), _gst_element_accumulator, NULL, NULL,
|
|
|
|
GST_TYPE_ELEMENT, 1, G_TYPE_UINT);
|
2013-12-05 23:53:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstRtpBin::request-rtp-decoder:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
|
|
|
*
|
|
|
|
* Request an RTP decoder element for the given @session. The decoder
|
|
|
|
* element will be added to the bin if not previously added.
|
|
|
|
*
|
|
|
|
* If no handler is connected, no encoder will be used.
|
2013-12-30 15:59:20 +00:00
|
|
|
*
|
|
|
|
* Since: 1.4
|
2013-12-05 23:53:52 +00:00
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_REQUEST_RTP_DECODER] =
|
|
|
|
g_signal_new ("request-rtp-decoder", G_TYPE_FROM_CLASS (klass),
|
2013-12-30 13:56:07 +00:00
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
|
|
|
|
request_rtp_decoder), _gst_element_accumulator, NULL,
|
2019-08-26 06:03:24 +00:00
|
|
|
NULL, GST_TYPE_ELEMENT, 1, G_TYPE_UINT);
|
2013-12-05 23:53:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstRtpBin::request-rtcp-encoder:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
|
|
|
*
|
|
|
|
* Request an RTCP encoder element for the given @session. The encoder
|
|
|
|
* element will be added to the bin if not previously added.
|
|
|
|
*
|
|
|
|
* If no handler is connected, no encoder will be used.
|
2013-12-30 15:59:20 +00:00
|
|
|
*
|
|
|
|
* Since: 1.4
|
2013-12-05 23:53:52 +00:00
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_REQUEST_RTCP_ENCODER] =
|
|
|
|
g_signal_new ("request-rtcp-encoder", G_TYPE_FROM_CLASS (klass),
|
2013-12-30 13:56:07 +00:00
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
request_rtcp_encoder), _gst_element_accumulator, NULL, NULL,
|
|
|
|
GST_TYPE_ELEMENT, 1, G_TYPE_UINT);
|
2013-12-05 23:53:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstRtpBin::request-rtcp-decoder:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
|
|
|
*
|
|
|
|
* Request an RTCP decoder element for the given @session. The decoder
|
|
|
|
* element will be added to the bin if not previously added.
|
|
|
|
*
|
|
|
|
* If no handler is connected, no encoder will be used.
|
2013-12-30 15:59:20 +00:00
|
|
|
*
|
|
|
|
* Since: 1.4
|
2013-12-05 23:53:52 +00:00
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_REQUEST_RTCP_DECODER] =
|
|
|
|
g_signal_new ("request-rtcp-decoder", G_TYPE_FROM_CLASS (klass),
|
2013-12-30 13:56:07 +00:00
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
request_rtcp_decoder), _gst_element_accumulator, NULL, NULL,
|
|
|
|
GST_TYPE_ELEMENT, 1, G_TYPE_UINT);
|
2013-12-05 23:53:52 +00:00
|
|
|
|
2017-12-19 17:23:16 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::request-jitterbuffer:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
|
|
|
*
|
|
|
|
* Request a jitterbuffer element for the given @session.
|
|
|
|
*
|
|
|
|
* If no handler is connected, the default jitterbuffer will be used.
|
|
|
|
*
|
|
|
|
* Note: The provided element is expected to conform to the API exposed
|
|
|
|
* by the standard #GstRtpJitterBuffer. Runtime checks will be made to
|
|
|
|
* determine whether it exposes properties and signals before attempting
|
|
|
|
* to set, call or connect to them, and some functionalities of #GstRtpBin
|
|
|
|
* may not be available when that is not the case.
|
|
|
|
*
|
|
|
|
* This should be considered experimental API, as the standard jitterbuffer
|
|
|
|
* API is susceptible to change, provided elements will have to update their
|
|
|
|
* custom jitterbuffer's API to match the API of #GstRtpJitterBuffer if and
|
|
|
|
* when it changes.
|
|
|
|
*
|
|
|
|
* Since: 1.18
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_REQUEST_JITTERBUFFER] =
|
|
|
|
g_signal_new ("request-jitterbuffer", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
|
|
|
|
request_jitterbuffer), _gst_element_accumulator, NULL,
|
|
|
|
g_cclosure_marshal_generic, GST_TYPE_ELEMENT, 1, G_TYPE_UINT);
|
|
|
|
|
2013-12-30 15:52:28 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::new-jitterbuffer:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @jitterbuffer: the new jitterbuffer
|
|
|
|
* @session: the session
|
|
|
|
* @ssrc: the SSRC
|
|
|
|
*
|
|
|
|
* Notify that a new @jitterbuffer was created for @session and @ssrc.
|
|
|
|
* This signal can, for example, be used to configure @jitterbuffer.
|
2013-12-30 15:59:20 +00:00
|
|
|
*
|
|
|
|
* Since: 1.4
|
2013-12-30 15:52:28 +00:00
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_NEW_JITTERBUFFER] =
|
|
|
|
g_signal_new ("new-jitterbuffer", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
new_jitterbuffer), NULL, NULL, NULL,
|
2013-12-30 15:52:28 +00:00
|
|
|
G_TYPE_NONE, 3, GST_TYPE_ELEMENT, G_TYPE_UINT, G_TYPE_UINT);
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::new-storage:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @storage: the new storage
|
|
|
|
* @session: the session
|
|
|
|
*
|
|
|
|
* Notify that a new @storage was created for @session.
|
|
|
|
* This signal can, for example, be used to configure @storage.
|
|
|
|
*
|
|
|
|
* Since: 1.14
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_NEW_STORAGE] =
|
|
|
|
g_signal_new ("new-storage", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
new_storage), NULL, NULL, NULL,
|
2017-11-28 05:02:05 +00:00
|
|
|
G_TYPE_NONE, 2, GST_TYPE_ELEMENT, G_TYPE_UINT);
|
|
|
|
|
2013-12-31 11:31:25 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::request-aux-sender:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
|
|
|
*
|
|
|
|
* Request an AUX sender element for the given @session. The AUX
|
|
|
|
* element will be added to the bin.
|
|
|
|
*
|
|
|
|
* If no handler is connected, no AUX element will be used.
|
|
|
|
*
|
|
|
|
* Since: 1.4
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_REQUEST_AUX_SENDER] =
|
|
|
|
g_signal_new ("request-aux-sender", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
request_aux_sender), _gst_element_accumulator, NULL, NULL,
|
|
|
|
GST_TYPE_ELEMENT, 1, G_TYPE_UINT);
|
2017-11-28 05:02:05 +00:00
|
|
|
|
2013-12-31 11:31:25 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::request-aux-receiver:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
|
|
|
*
|
|
|
|
* Request an AUX receiver element for the given @session. The AUX
|
|
|
|
* element will be added to the bin.
|
|
|
|
*
|
|
|
|
* If no handler is connected, no AUX element will be used.
|
|
|
|
*
|
|
|
|
* Since: 1.4
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_REQUEST_AUX_RECEIVER] =
|
|
|
|
g_signal_new ("request-aux-receiver", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
request_aux_receiver), _gst_element_accumulator, NULL, NULL,
|
|
|
|
GST_TYPE_ELEMENT, 1, G_TYPE_UINT);
|
2017-11-28 05:02:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstRtpBin::request-fec-decoder:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session index
|
|
|
|
*
|
|
|
|
* Request a FEC decoder element for the given @session. The element
|
2021-11-09 04:10:06 +00:00
|
|
|
* will be added to the bin after the pt demuxer. If there are multiple
|
|
|
|
* ssrc's and pt's in @session, this signal may be called multiple times for
|
|
|
|
* the same @session each corresponding to a newly discovered ssrc.
|
2017-11-28 05:02:05 +00:00
|
|
|
*
|
|
|
|
* If no handler is connected, no FEC decoder will be used.
|
|
|
|
*
|
2021-12-07 22:43:21 +00:00
|
|
|
* Warning: usage of this signal is not appropriate for the BUNDLE case,
|
|
|
|
* connect to #GstRtpBin::request-fec-decoder-full instead.
|
|
|
|
*
|
2017-11-28 05:02:05 +00:00
|
|
|
* Since: 1.14
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_REQUEST_FEC_DECODER] =
|
|
|
|
g_signal_new ("request-fec-decoder", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
request_fec_decoder), _gst_element_accumulator, NULL, NULL,
|
|
|
|
GST_TYPE_ELEMENT, 1, G_TYPE_UINT);
|
2017-11-28 05:02:05 +00:00
|
|
|
|
2021-12-07 22:43:21 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::request-fec-decoder-full:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session index
|
|
|
|
* @ssrc: the ssrc of the stream
|
|
|
|
* @pt: the payload type
|
|
|
|
*
|
|
|
|
* Request a FEC decoder element for the given @session. The element
|
|
|
|
* will be added to the bin after the pt demuxer. If there are multiple
|
|
|
|
* ssrc's and pt's in @session, this signal may be called multiple times for
|
|
|
|
* the same @session each corresponding to a newly discovered ssrc and payload
|
|
|
|
* type, those are provided as parameters.
|
|
|
|
*
|
|
|
|
* If no handler is connected, no FEC decoder will be used.
|
|
|
|
*
|
|
|
|
* Since: 1.20
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_REQUEST_FEC_DECODER_FULL] =
|
|
|
|
g_signal_new ("request-fec-decoder-full", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
|
|
|
|
request_fec_decoder), _gst_element_accumulator, NULL, NULL,
|
|
|
|
GST_TYPE_ELEMENT, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::request-fec-encoder:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session index
|
|
|
|
*
|
|
|
|
* Request a FEC encoder element for the given @session. The element
|
|
|
|
* will be added to the bin after the RTPSession.
|
|
|
|
*
|
|
|
|
* If no handler is connected, no FEC encoder will be used.
|
|
|
|
*
|
|
|
|
* Since: 1.14
|
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_REQUEST_FEC_ENCODER] =
|
|
|
|
g_signal_new ("request-fec-encoder", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
request_fec_encoder), _gst_element_accumulator, NULL, NULL,
|
|
|
|
GST_TYPE_ELEMENT, 1, G_TYPE_UINT);
|
2017-11-28 05:02:05 +00:00
|
|
|
|
2015-10-02 07:16:32 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin::on-new-sender-ssrc:
|
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
|
|
|
* @ssrc: the sender SSRC
|
|
|
|
*
|
|
|
|
* Notify of a new sender SSRC that entered @session.
|
2016-12-14 22:37:45 +00:00
|
|
|
*
|
|
|
|
* Since: 1.8
|
2015-10-02 07:16:32 +00:00
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_ON_NEW_SENDER_SSRC] =
|
|
|
|
g_signal_new ("on-new-sender-ssrc", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_new_sender_ssrc),
|
2019-08-26 06:03:24 +00:00
|
|
|
NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
|
2015-10-02 07:16:32 +00:00
|
|
|
/**
|
2016-03-14 21:56:14 +00:00
|
|
|
* GstRtpBin::on-sender-ssrc-active:
|
2015-10-02 07:16:32 +00:00
|
|
|
* @rtpbin: the object which received the signal
|
|
|
|
* @session: the session
|
|
|
|
* @ssrc: the sender SSRC
|
|
|
|
*
|
|
|
|
* Notify of a sender SSRC that is active, i.e., sending RTCP.
|
2016-12-14 22:37:45 +00:00
|
|
|
*
|
|
|
|
* Since: 1.8
|
2015-10-02 07:16:32 +00:00
|
|
|
*/
|
|
|
|
gst_rtp_bin_signals[SIGNAL_ON_SENDER_SSRC_ACTIVE] =
|
|
|
|
g_signal_new ("on-sender-ssrc-active", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
|
2019-08-26 06:03:24 +00:00
|
|
|
on_sender_ssrc_active), NULL, NULL, NULL,
|
2015-10-02 07:16:32 +00:00
|
|
|
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
|
2013-12-31 11:31:25 +00:00
|
|
|
|
2009-06-29 14:37:54 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_SDES,
|
|
|
|
g_param_spec_boxed ("sdes", "SDES",
|
|
|
|
"The SDES items of this session",
|
2018-11-12 11:05:45 +00:00
|
|
|
GST_TYPE_STRUCTURE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS
|
|
|
|
| GST_PARAM_DOC_SHOW_DEFAULT));
|
2007-12-10 14:03:32 +00:00
|
|
|
|
2008-05-13 09:06:51 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_DO_LOST,
|
|
|
|
g_param_spec_boolean ("do-lost", "Do Lost",
|
|
|
|
"Send an event downstream when a packet is lost", DEFAULT_DO_LOST,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2009-12-21 14:05:09 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_AUTOREMOVE,
|
|
|
|
g_param_spec_boolean ("autoremove", "Auto Remove",
|
2010-02-12 16:21:43 +00:00
|
|
|
"Automatically remove timed out sources", DEFAULT_AUTOREMOVE,
|
2010-10-13 14:21:23 +00:00
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2009-12-21 14:05:09 +00:00
|
|
|
|
2009-10-05 11:32:17 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_IGNORE_PT,
|
2010-10-07 20:12:48 +00:00
|
|
|
g_param_spec_boolean ("ignore-pt", "Ignore PT",
|
2009-10-05 11:32:17 +00:00
|
|
|
"Do not demultiplex based on PT values", DEFAULT_IGNORE_PT,
|
2010-10-13 14:21:23 +00:00
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2010-08-26 08:58:26 +00:00
|
|
|
|
|
|
|
g_object_class_install_property (gobject_class, PROP_USE_PIPELINE_CLOCK,
|
|
|
|
g_param_spec_boolean ("use-pipeline-clock", "Use pipeline clock",
|
2015-06-12 21:29:19 +00:00
|
|
|
"Use the pipeline running-time to set the NTP time in the RTCP SR messages "
|
2015-06-25 14:19:58 +00:00
|
|
|
"(DEPRECATED: Use ntp-time-source property)",
|
2010-10-14 21:41:30 +00:00
|
|
|
DEFAULT_USE_PIPELINE_CLOCK,
|
2015-06-12 21:29:19 +00:00
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED));
|
2009-10-05 11:32:17 +00:00
|
|
|
/**
|
2013-11-18 14:44:36 +00:00
|
|
|
* GstRtpBin:buffer-mode:
|
2009-10-05 11:32:17 +00:00
|
|
|
*
|
|
|
|
* Control the buffering and timestamping mode used by the jitterbuffer.
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class, PROP_BUFFER_MODE,
|
|
|
|
g_param_spec_enum ("buffer-mode", "Buffer Mode",
|
|
|
|
"Control the buffering algorithm in use", RTP_TYPE_JITTER_BUFFER_MODE,
|
|
|
|
DEFAULT_BUFFER_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2010-08-27 15:58:47 +00:00
|
|
|
/**
|
2013-11-18 14:44:36 +00:00
|
|
|
* GstRtpBin:ntp-sync:
|
2010-08-27 15:58:47 +00:00
|
|
|
*
|
2012-10-17 11:35:07 +00:00
|
|
|
* Set the NTP time from the sender reports as the running-time on the
|
|
|
|
* buffers. When both the sender and receiver have sychronized
|
|
|
|
* running-time, i.e. when the clock and base-time is shared
|
|
|
|
* between the receivers and the and the senders, this option can be
|
|
|
|
* used to synchronize receivers on multiple machines.
|
2010-08-27 15:58:47 +00:00
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class, PROP_NTP_SYNC,
|
|
|
|
g_param_spec_boolean ("ntp-sync", "Sync on NTP clock",
|
|
|
|
"Synchronize received streams to the NTP clock", DEFAULT_NTP_SYNC,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2009-10-05 11:32:17 +00:00
|
|
|
|
2011-08-08 10:15:20 +00:00
|
|
|
/**
|
2013-11-18 14:44:36 +00:00
|
|
|
* GstRtpBin:rtcp-sync:
|
2011-08-08 10:15:20 +00:00
|
|
|
*
|
|
|
|
* If not synchronizing (directly) to the NTP clock, determines how to sync
|
|
|
|
* the various streams.
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class, PROP_RTCP_SYNC,
|
|
|
|
g_param_spec_enum ("rtcp-sync", "RTCP Sync",
|
|
|
|
"Use of RTCP SR in synchronization", GST_RTP_BIN_RTCP_SYNC_TYPE,
|
|
|
|
DEFAULT_RTCP_SYNC, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2011-08-08 10:09:41 +00:00
|
|
|
/**
|
2013-11-18 14:44:36 +00:00
|
|
|
* GstRtpBin:rtcp-sync-interval:
|
2011-08-08 10:09:41 +00:00
|
|
|
*
|
2022-04-18 08:50:48 +00:00
|
|
|
* Determines how often to sync streams using RTCP data or inband NTP-64
|
|
|
|
* header extensions.
|
2011-08-08 10:09:41 +00:00
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class, PROP_RTCP_SYNC_INTERVAL,
|
|
|
|
g_param_spec_uint ("rtcp-sync-interval", "RTCP Sync Interval",
|
2022-04-18 08:50:48 +00:00
|
|
|
"RTCP SR / NTP-64 interval synchronization (ms) (0 = always)",
|
2011-08-08 10:09:41 +00:00
|
|
|
0, G_MAXUINT, DEFAULT_RTCP_SYNC_INTERVAL,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2013-07-03 16:41:42 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_DO_SYNC_EVENT,
|
|
|
|
g_param_spec_boolean ("do-sync-event", "Do Sync Event",
|
|
|
|
"Send event downstream when a stream is synchronized to the sender",
|
|
|
|
DEFAULT_DO_SYNC_EVENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2014-11-20 14:49:25 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin:do-retransmission:
|
|
|
|
*
|
|
|
|
* Enables RTP retransmission on all streams. To control retransmission on
|
|
|
|
* a per-SSRC basis, connect to the #GstRtpBin::new-jitterbuffer signal and
|
2019-04-23 16:28:23 +00:00
|
|
|
* set the #GstRtpJitterBuffer:do-retransmission property on the
|
2014-11-20 14:49:25 +00:00
|
|
|
* #GstRtpJitterBuffer object instead.
|
|
|
|
*/
|
2013-08-23 09:55:02 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_DO_RETRANSMISSION,
|
|
|
|
g_param_spec_boolean ("do-retransmission", "Do retransmission",
|
2014-11-20 14:49:25 +00:00
|
|
|
"Enable retransmission on all streams",
|
2013-08-23 09:55:02 +00:00
|
|
|
DEFAULT_DO_RETRANSMISSION,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2015-05-21 11:13:56 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin:rtp-profile:
|
|
|
|
*
|
|
|
|
* Sets the default RTP profile of newly created RTP sessions. The
|
|
|
|
* profile can be changed afterwards on a per-session basis.
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class, PROP_RTP_PROFILE,
|
|
|
|
g_param_spec_enum ("rtp-profile", "RTP Profile",
|
|
|
|
"Default RTP profile of newly created sessions",
|
|
|
|
GST_TYPE_RTP_PROFILE, DEFAULT_RTP_PROFILE,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2015-06-12 21:29:19 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_NTP_TIME_SOURCE,
|
|
|
|
g_param_spec_enum ("ntp-time-source", "NTP Time Source",
|
|
|
|
"NTP time source for RTCP packets",
|
|
|
|
gst_rtp_ntp_time_source_get_type (), DEFAULT_NTP_TIME_SOURCE,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2015-09-16 17:28:11 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_RTCP_SYNC_SEND_TIME,
|
|
|
|
g_param_spec_boolean ("rtcp-sync-send-time", "RTCP Sync Send Time",
|
|
|
|
"Use send time or capture time for RTCP sync "
|
|
|
|
"(TRUE = send time, FALSE = capture time)",
|
|
|
|
DEFAULT_RTCP_SYNC_SEND_TIME,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2015-09-21 11:47:21 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_MAX_RTCP_RTP_TIME_DIFF,
|
|
|
|
g_param_spec_int ("max-rtcp-rtp-time-diff", "Max RTCP RTP Time Diff",
|
|
|
|
"Maximum amount of time in ms that the RTP time in RTCP SRs "
|
|
|
|
"is allowed to be ahead (-1 disabled)", -1, G_MAXINT,
|
|
|
|
DEFAULT_MAX_RTCP_RTP_TIME_DIFF,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2015-10-07 11:02:12 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_MAX_DROPOUT_TIME,
|
|
|
|
g_param_spec_uint ("max-dropout-time", "Max dropout time",
|
|
|
|
"The maximum time (milliseconds) of missing packets tolerated.",
|
|
|
|
0, G_MAXUINT, DEFAULT_MAX_DROPOUT_TIME,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
|
|
|
g_object_class_install_property (gobject_class, PROP_MAX_MISORDER_TIME,
|
|
|
|
g_param_spec_uint ("max-misorder-time", "Max misorder time",
|
|
|
|
"The maximum time (milliseconds) of misordered packets tolerated.",
|
|
|
|
0, G_MAXUINT, DEFAULT_MAX_MISORDER_TIME,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2016-01-05 14:15:16 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_RFC7273_SYNC,
|
|
|
|
g_param_spec_boolean ("rfc7273-sync", "Sync on RFC7273 clock",
|
|
|
|
"Synchronize received streams to the RFC7273 clock "
|
|
|
|
"(requires clock and offset to be provided)", DEFAULT_RFC7273_SYNC,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2022-03-15 11:56:28 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin:add-reference-timestamp-meta:
|
|
|
|
*
|
2022-04-26 19:17:51 +00:00
|
|
|
* When syncing to a RFC7273 clock or after clock synchronization via RTCP or
|
|
|
|
* inband NTP-64 header extensions has happened, add #GstReferenceTimestampMeta
|
2022-03-15 11:56:28 +00:00
|
|
|
* to buffers with the original reconstructed reference clock timestamp.
|
|
|
|
*
|
|
|
|
* Since: 1.22
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_ADD_REFERENCE_TIMESTAMP_META,
|
|
|
|
g_param_spec_boolean ("add-reference-timestamp-meta",
|
|
|
|
"Add Reference Timestamp Meta",
|
|
|
|
"Add Reference Timestamp Meta to buffers with the original clock timestamp "
|
2022-04-26 19:17:51 +00:00
|
|
|
"before any adjustments when syncing to an RFC7273 clock or after clock "
|
|
|
|
"synchronization via RTCP or inband NTP-64 header extensions has happened.",
|
2022-03-15 11:56:28 +00:00
|
|
|
DEFAULT_ADD_REFERENCE_TIMESTAMP_META,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2016-05-06 07:44:42 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_MAX_STREAMS,
|
|
|
|
g_param_spec_uint ("max-streams", "Max Streams",
|
|
|
|
"The maximum number of streams to create for one session",
|
|
|
|
0, G_MAXUINT, DEFAULT_MAX_STREAMS,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2017-09-14 09:20:17 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin:max-ts-offset-adjustment:
|
|
|
|
*
|
|
|
|
* Syncing time stamps to NTP time adds a time offset. This parameter
|
|
|
|
* specifies the maximum number of nanoseconds per frame that this time offset
|
|
|
|
* may be adjusted with. This is used to avoid sudden large changes to time
|
|
|
|
* stamps.
|
2018-03-12 13:21:08 +00:00
|
|
|
*
|
|
|
|
* Since: 1.14
|
2017-09-14 09:20:17 +00:00
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class, PROP_MAX_TS_OFFSET_ADJUSTMENT,
|
|
|
|
g_param_spec_uint64 ("max-ts-offset-adjustment",
|
|
|
|
"Max Timestamp Offset Adjustment",
|
|
|
|
"The maximum number of nanoseconds per frame that time stamp offsets "
|
|
|
|
"may be adjusted (0 = no limit).", 0, G_MAXUINT64,
|
|
|
|
DEFAULT_MAX_TS_OFFSET_ADJUSTMENT, G_PARAM_READWRITE |
|
|
|
|
G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2017-09-14 11:00:56 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin:max-ts-offset:
|
|
|
|
*
|
|
|
|
* Used to set an upper limit of how large a time offset may be. This
|
|
|
|
* is used to protect against unrealistic values as a result of either
|
|
|
|
* client,server or clock issues.
|
2018-03-12 13:21:08 +00:00
|
|
|
*
|
|
|
|
* Since: 1.14
|
2017-09-14 11:00:56 +00:00
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class, PROP_MAX_TS_OFFSET,
|
|
|
|
g_param_spec_int64 ("max-ts-offset", "Max TS Offset",
|
|
|
|
"The maximum absolute value of the time offset in (nanoseconds). "
|
|
|
|
"Note, if the ntp-sync parameter is set the default value is "
|
|
|
|
"changed to 0 (no limit)", 0, G_MAXINT64, DEFAULT_MAX_TS_OFFSET,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2018-05-29 14:24:02 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin:min-ts-offset:
|
|
|
|
*
|
|
|
|
* Used to set an lower limit for when a time offset is deemed large enough
|
|
|
|
* to be useful for sync corrections.
|
|
|
|
*
|
|
|
|
* When streaming for instance audio, even very small ts_offsets cause
|
|
|
|
* audible glitches. This property is used for controlling how sensitive the
|
|
|
|
* adjustments should be to small deviations in ts_offset, occurring for
|
|
|
|
* instance due to jittery network conditions or system load.
|
|
|
|
*
|
|
|
|
* Since: 1.22
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class, PROP_MIN_TS_OFFSET,
|
|
|
|
g_param_spec_uint64 ("min-ts-offset", "Min TS Offset",
|
|
|
|
"The minimum absolute value of the time offset in (nanoseconds). "
|
|
|
|
"Used to set an lower limit for when a time offset is deemed large "
|
|
|
|
"enough to be useful for sync corrections."
|
|
|
|
"Note, if the ntp-sync parameter is set the default value is "
|
|
|
|
"changed to 0 (no limit)", 0, G_MAXUINT64, DEFAULT_MIN_TS_OFFSET,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2021-11-23 08:03:28 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin:ts-offset-smoothing-factor:
|
|
|
|
*
|
|
|
|
* Controls the weighting between previous and current timestamp offsets in
|
|
|
|
* a running moving average (RMA):
|
|
|
|
* ts_offset_average(n) =
|
|
|
|
* ((ts-offset-smoothing-factor - 1) * ts_offset_average(n - 1) + ts_offset(n)) /
|
|
|
|
* ts-offset-smoothing-factor
|
|
|
|
*
|
|
|
|
* This can stabilize the timestamp offset and prevent unnecessary skew
|
|
|
|
* corrections due to jitter introduced by network or system load.
|
|
|
|
*
|
|
|
|
* Since: 1.22
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_TS_OFFSET_SMOOTHING_FACTOR,
|
|
|
|
g_param_spec_uint ("ts-offset-smoothing-factor",
|
|
|
|
"Timestamp Offset Smoothing Factor",
|
|
|
|
"Sets a smoothing factor for the timestamp offset in number of "
|
|
|
|
"values for a calculated running moving average. "
|
|
|
|
"(0 = no smoothing factor)", 0, G_MAXUINT,
|
|
|
|
DEFAULT_TS_OFFSET_SMOOTHING_FACTOR,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2020-10-06 01:13:30 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin:fec-decoders:
|
|
|
|
*
|
|
|
|
* Used to provide a factory used to build the FEC decoder for a
|
|
|
|
* given session, as a command line alternative to
|
|
|
|
* #GstRtpBin::request-fec-decoder.
|
|
|
|
*
|
|
|
|
* Expects a GstStructure in the form session_id (gint) -> factory (string)
|
|
|
|
*
|
|
|
|
* Since: 1.20
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class, PROP_FEC_DECODERS,
|
|
|
|
g_param_spec_boxed ("fec-decoders", "Fec Decoders",
|
|
|
|
"GstStructure mapping from session index to FEC decoder "
|
|
|
|
"factory, eg "
|
|
|
|
"fec-decoders='fec,0=\"rtpst2022-1-fecdec\\ size-time\\=1000000000\";'",
|
|
|
|
GST_TYPE_STRUCTURE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2020-10-06 01:03:13 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin:fec-encoders:
|
|
|
|
*
|
|
|
|
* Used to provide a factory used to build the FEC encoder for a
|
|
|
|
* given session, as a command line alternative to
|
|
|
|
* #GstRtpBin::request-fec-encoder.
|
|
|
|
*
|
|
|
|
* Expects a GstStructure in the form session_id (gint) -> factory (string)
|
|
|
|
*
|
|
|
|
* Since: 1.20
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class, PROP_FEC_ENCODERS,
|
|
|
|
g_param_spec_boxed ("fec-encoders", "Fec Encoders",
|
|
|
|
"GstStructure mapping from session index to FEC encoder "
|
|
|
|
"factory, eg "
|
|
|
|
"fec-encoders='fec,0=\"rtpst2022-1-fecenc\\ rows\\=5\\ columns\\=5\";'",
|
|
|
|
GST_TYPE_STRUCTURE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2022-11-22 16:32:57 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin:update-ntp64-header-ext:
|
|
|
|
*
|
|
|
|
* Whether RTP NTP header extension should be updated with actual
|
|
|
|
* NTP time. If not, use the NTP time from buffer timestamp metadata
|
|
|
|
*
|
|
|
|
* Since: 1.22
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_UPDATE_NTP64_HEADER_EXT,
|
|
|
|
g_param_spec_boolean ("update-ntp64-header-ext",
|
|
|
|
"Update NTP-64 RTP Header Extension",
|
|
|
|
"Whether RTP NTP header extension should be updated with actual NTP time",
|
|
|
|
DEFAULT_UPDATE_NTP64_HEADER_EXT,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2023-06-16 19:53:11 +00:00
|
|
|
/**
|
|
|
|
* GstRtpBin:timeout-inactive-sources:
|
|
|
|
*
|
|
|
|
* Whether inactive sources should be timed out
|
|
|
|
*
|
|
|
|
* Since: 1.24
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_TIMEOUT_INACTIVE_SOURCES,
|
|
|
|
g_param_spec_boolean ("timeout-inactive-sources",
|
|
|
|
"Time out inactive sources",
|
|
|
|
"Whether sources that don't receive RTP or RTCP packets for longer "
|
|
|
|
"than 5x RTCP interval should be removed",
|
|
|
|
DEFAULT_TIMEOUT_INACTIVE_SOURCES,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_rtp_bin_change_state);
|
|
|
|
gstelement_class->request_new_pad =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_rtp_bin_request_new_pad);
|
|
|
|
gstelement_class->release_pad = GST_DEBUG_FUNCPTR (gst_rtp_bin_release_pad);
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
2011-06-13 15:51:40 +00:00
|
|
|
/* sink pads */
|
2016-03-04 01:30:12 +00:00
|
|
|
gst_element_class_add_static_pad_template (gstelement_class,
|
|
|
|
&rtpbin_recv_rtp_sink_template);
|
2020-10-06 01:13:30 +00:00
|
|
|
gst_element_class_add_static_pad_template (gstelement_class,
|
|
|
|
&rtpbin_recv_fec_sink_template);
|
2016-03-04 01:30:12 +00:00
|
|
|
gst_element_class_add_static_pad_template (gstelement_class,
|
|
|
|
&rtpbin_recv_rtcp_sink_template);
|
|
|
|
gst_element_class_add_static_pad_template (gstelement_class,
|
|
|
|
&rtpbin_send_rtp_sink_template);
|
2011-06-13 15:51:40 +00:00
|
|
|
|
|
|
|
/* src pads */
|
2016-03-04 01:30:12 +00:00
|
|
|
gst_element_class_add_static_pad_template (gstelement_class,
|
|
|
|
&rtpbin_recv_rtp_src_template);
|
|
|
|
gst_element_class_add_static_pad_template (gstelement_class,
|
|
|
|
&rtpbin_send_rtcp_src_template);
|
|
|
|
gst_element_class_add_static_pad_template (gstelement_class,
|
|
|
|
&rtpbin_send_rtp_src_template);
|
2020-10-06 01:03:13 +00:00
|
|
|
gst_element_class_add_static_pad_template (gstelement_class,
|
|
|
|
&rtpbin_send_fec_src_template);
|
2011-06-13 15:51:40 +00:00
|
|
|
|
2012-04-09 23:51:41 +00:00
|
|
|
gst_element_class_set_static_metadata (gstelement_class, "RTP Bin",
|
2011-06-13 15:51:40 +00:00
|
|
|
"Filter/Network/RTP",
|
|
|
|
"Real-Time Transport Protocol bin",
|
|
|
|
"Wim Taymans <wim.taymans@gmail.com>");
|
|
|
|
|
2007-12-10 18:36:04 +00:00
|
|
|
gstbin_class->handle_message = GST_DEBUG_FUNCPTR (gst_rtp_bin_handle_message);
|
|
|
|
|
2007-05-14 15:28:36 +00:00
|
|
|
klass->clear_pt_map = GST_DEBUG_FUNCPTR (gst_rtp_bin_clear_pt_map);
|
2008-11-26 11:44:37 +00:00
|
|
|
klass->reset_sync = GST_DEBUG_FUNCPTR (gst_rtp_bin_reset_sync);
|
2015-12-10 11:15:52 +00:00
|
|
|
klass->get_session = GST_DEBUG_FUNCPTR (gst_rtp_bin_get_session);
|
2008-10-07 18:54:41 +00:00
|
|
|
klass->get_internal_session =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_rtp_bin_get_internal_session);
|
2018-04-02 21:04:06 +00:00
|
|
|
klass->get_storage = GST_DEBUG_FUNCPTR (gst_rtp_bin_get_storage);
|
2017-11-28 05:02:05 +00:00
|
|
|
klass->get_internal_storage =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_rtp_bin_get_internal_storage);
|
2020-09-24 17:13:00 +00:00
|
|
|
klass->clear_ssrc = GST_DEBUG_FUNCPTR (gst_rtp_bin_clear_ssrc);
|
2013-12-05 23:53:52 +00:00
|
|
|
klass->request_rtp_encoder = GST_DEBUG_FUNCPTR (gst_rtp_bin_request_encoder);
|
|
|
|
klass->request_rtp_decoder = GST_DEBUG_FUNCPTR (gst_rtp_bin_request_decoder);
|
|
|
|
klass->request_rtcp_encoder = GST_DEBUG_FUNCPTR (gst_rtp_bin_request_encoder);
|
|
|
|
klass->request_rtcp_decoder = GST_DEBUG_FUNCPTR (gst_rtp_bin_request_decoder);
|
2017-12-19 17:23:16 +00:00
|
|
|
klass->request_jitterbuffer =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_rtp_bin_request_jitterbuffer);
|
2007-05-14 15:28:36 +00:00
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_rtp_bin_debug, "rtpbin", 0, "RTP bin");
|
2020-05-29 23:29:03 +00:00
|
|
|
|
2020-06-05 22:42:25 +00:00
|
|
|
gst_type_mark_as_plugin_api (GST_RTP_BIN_RTCP_SYNC_TYPE, 0);
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2011-06-13 15:51:40 +00:00
|
|
|
gst_rtp_bin_init (GstRtpBin * rtpbin)
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
{
|
2012-01-23 13:15:46 +00:00
|
|
|
gchar *cname;
|
2007-12-10 14:03:32 +00:00
|
|
|
|
2018-06-23 21:44:19 +00:00
|
|
|
rtpbin->priv = gst_rtp_bin_get_instance_private (rtpbin);
|
2012-01-19 10:33:53 +00:00
|
|
|
g_mutex_init (&rtpbin->priv->bin_lock);
|
|
|
|
g_mutex_init (&rtpbin->priv->dyn_lock);
|
2008-04-25 11:32:09 +00:00
|
|
|
|
2009-10-06 11:34:34 +00:00
|
|
|
rtpbin->latency_ms = DEFAULT_LATENCY_MS;
|
|
|
|
rtpbin->latency_ns = DEFAULT_LATENCY_MS * GST_MSECOND;
|
2012-08-16 23:51:16 +00:00
|
|
|
rtpbin->drop_on_latency = DEFAULT_DROP_ON_LATENCY;
|
2008-04-25 11:32:09 +00:00
|
|
|
rtpbin->do_lost = DEFAULT_DO_LOST;
|
2009-09-08 15:37:15 +00:00
|
|
|
rtpbin->ignore_pt = DEFAULT_IGNORE_PT;
|
2010-08-27 15:58:47 +00:00
|
|
|
rtpbin->ntp_sync = DEFAULT_NTP_SYNC;
|
2011-08-08 10:15:20 +00:00
|
|
|
rtpbin->rtcp_sync = DEFAULT_RTCP_SYNC;
|
2011-08-08 10:09:41 +00:00
|
|
|
rtpbin->rtcp_sync_interval = DEFAULT_RTCP_SYNC_INTERVAL;
|
2009-12-21 14:05:09 +00:00
|
|
|
rtpbin->priv->autoremove = DEFAULT_AUTOREMOVE;
|
2009-10-05 11:32:17 +00:00
|
|
|
rtpbin->buffer_mode = DEFAULT_BUFFER_MODE;
|
2010-08-26 08:58:26 +00:00
|
|
|
rtpbin->use_pipeline_clock = DEFAULT_USE_PIPELINE_CLOCK;
|
2013-07-03 16:41:42 +00:00
|
|
|
rtpbin->send_sync_event = DEFAULT_DO_SYNC_EVENT;
|
2013-08-23 09:55:02 +00:00
|
|
|
rtpbin->do_retransmission = DEFAULT_DO_RETRANSMISSION;
|
2015-05-21 11:13:56 +00:00
|
|
|
rtpbin->rtp_profile = DEFAULT_RTP_PROFILE;
|
2015-06-12 21:29:19 +00:00
|
|
|
rtpbin->ntp_time_source = DEFAULT_NTP_TIME_SOURCE;
|
2015-09-16 17:28:11 +00:00
|
|
|
rtpbin->rtcp_sync_send_time = DEFAULT_RTCP_SYNC_SEND_TIME;
|
2015-09-21 11:47:21 +00:00
|
|
|
rtpbin->max_rtcp_rtp_time_diff = DEFAULT_MAX_RTCP_RTP_TIME_DIFF;
|
2015-10-07 11:02:12 +00:00
|
|
|
rtpbin->max_dropout_time = DEFAULT_MAX_DROPOUT_TIME;
|
|
|
|
rtpbin->max_misorder_time = DEFAULT_MAX_MISORDER_TIME;
|
2016-01-05 14:15:16 +00:00
|
|
|
rtpbin->rfc7273_sync = DEFAULT_RFC7273_SYNC;
|
2022-03-15 11:56:28 +00:00
|
|
|
rtpbin->add_reference_timestamp_meta = DEFAULT_ADD_REFERENCE_TIMESTAMP_META;
|
2016-05-06 07:44:42 +00:00
|
|
|
rtpbin->max_streams = DEFAULT_MAX_STREAMS;
|
2017-09-14 09:20:17 +00:00
|
|
|
rtpbin->max_ts_offset_adjustment = DEFAULT_MAX_TS_OFFSET_ADJUSTMENT;
|
2017-09-14 11:00:56 +00:00
|
|
|
rtpbin->max_ts_offset = DEFAULT_MAX_TS_OFFSET;
|
|
|
|
rtpbin->max_ts_offset_is_set = FALSE;
|
2018-05-29 14:24:02 +00:00
|
|
|
rtpbin->min_ts_offset = DEFAULT_MIN_TS_OFFSET;
|
|
|
|
rtpbin->min_ts_offset_is_set = FALSE;
|
2021-11-23 08:03:28 +00:00
|
|
|
rtpbin->ts_offset_smoothing_factor = DEFAULT_TS_OFFSET_SMOOTHING_FACTOR;
|
2022-11-22 16:32:57 +00:00
|
|
|
rtpbin->update_ntp64_header_ext = DEFAULT_UPDATE_NTP64_HEADER_EXT;
|
2023-06-16 19:53:11 +00:00
|
|
|
rtpbin->timeout_inactive_sources = DEFAULT_TIMEOUT_INACTIVE_SOURCES;
|
2007-12-10 14:03:32 +00:00
|
|
|
|
|
|
|
/* some default SDES entries */
|
2012-01-25 13:19:12 +00:00
|
|
|
cname = g_strdup_printf ("user%u@host-%x", g_random_int (), g_random_int ());
|
2009-06-29 14:37:54 +00:00
|
|
|
rtpbin->sdes = gst_structure_new ("application/x-rtp-source-sdes",
|
2012-01-23 13:15:46 +00:00
|
|
|
"cname", G_TYPE_STRING, cname, "tool", G_TYPE_STRING, "GStreamer", NULL);
|
2020-10-06 01:13:30 +00:00
|
|
|
rtpbin->fec_decoders =
|
|
|
|
gst_structure_new_empty ("application/x-rtp-fec-decoders");
|
2020-10-06 01:03:13 +00:00
|
|
|
rtpbin->fec_encoders =
|
|
|
|
gst_structure_new_empty ("application/x-rtp-fec-encoders");
|
2012-01-23 13:15:46 +00:00
|
|
|
g_free (cname);
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
}
|
|
|
|
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
static void
|
|
|
|
gst_rtp_bin_dispose (GObject * object)
|
|
|
|
{
|
|
|
|
GstRtpBin *rtpbin;
|
|
|
|
|
|
|
|
rtpbin = GST_RTP_BIN (object);
|
|
|
|
|
2012-03-26 16:22:03 +00:00
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
GST_DEBUG_OBJECT (object, "freeing sessions");
|
2009-05-22 10:20:13 +00:00
|
|
|
g_slist_foreach (rtpbin->sessions, (GFunc) free_session, rtpbin);
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
g_slist_free (rtpbin->sessions);
|
|
|
|
rtpbin->sessions = NULL;
|
2012-03-26 16:22:03 +00:00
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
gst/rtpmanager/: Various leak fixes.
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-12 21:23:47 +00:00
|
|
|
|
|
|
|
G_OBJECT_CLASS (parent_class)->dispose (object);
|
|
|
|
}
|
|
|
|
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
static void
|
|
|
|
gst_rtp_bin_finalize (GObject * object)
|
|
|
|
{
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBin *rtpbin;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
|
|
|
|
rtpbin = GST_RTP_BIN (object);
|
|
|
|
|
2009-06-29 14:37:54 +00:00
|
|
|
if (rtpbin->sdes)
|
|
|
|
gst_structure_free (rtpbin->sdes);
|
2007-12-12 12:11:53 +00:00
|
|
|
|
2020-10-06 01:13:30 +00:00
|
|
|
if (rtpbin->fec_decoders)
|
|
|
|
gst_structure_free (rtpbin->fec_decoders);
|
|
|
|
|
2020-10-06 01:03:13 +00:00
|
|
|
if (rtpbin->fec_encoders)
|
|
|
|
gst_structure_free (rtpbin->fec_encoders);
|
|
|
|
|
2012-01-19 10:33:53 +00:00
|
|
|
g_mutex_clear (&rtpbin->priv->bin_lock);
|
|
|
|
g_mutex_clear (&rtpbin->priv->dyn_lock);
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
|
|
}
|
|
|
|
|
2007-12-10 14:03:32 +00:00
|
|
|
|
|
|
|
static void
|
2009-06-29 14:37:54 +00:00
|
|
|
gst_rtp_bin_set_sdes_struct (GstRtpBin * bin, const GstStructure * sdes)
|
2007-12-10 14:03:32 +00:00
|
|
|
{
|
|
|
|
GSList *item;
|
|
|
|
|
2009-06-29 14:37:54 +00:00
|
|
|
if (sdes == NULL)
|
2007-12-12 12:11:53 +00:00
|
|
|
return;
|
|
|
|
|
2009-05-21 23:12:57 +00:00
|
|
|
GST_RTP_BIN_LOCK (bin);
|
|
|
|
|
2007-12-10 14:03:32 +00:00
|
|
|
GST_OBJECT_LOCK (bin);
|
2009-06-29 14:37:54 +00:00
|
|
|
if (bin->sdes)
|
|
|
|
gst_structure_free (bin->sdes);
|
|
|
|
bin->sdes = gst_structure_copy (sdes);
|
2011-02-21 16:17:32 +00:00
|
|
|
GST_OBJECT_UNLOCK (bin);
|
2009-06-29 14:37:54 +00:00
|
|
|
|
2007-12-10 14:03:32 +00:00
|
|
|
/* store in all sessions */
|
2011-02-21 16:17:32 +00:00
|
|
|
for (item = bin->sessions; item; item = g_slist_next (item)) {
|
|
|
|
GstRtpBinSession *session = item->data;
|
|
|
|
g_object_set (session->session, "sdes", sdes, NULL);
|
|
|
|
}
|
2009-05-21 23:12:57 +00:00
|
|
|
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
2007-12-10 14:03:32 +00:00
|
|
|
}
|
|
|
|
|
2020-10-06 01:13:30 +00:00
|
|
|
static void
|
|
|
|
gst_rtp_bin_set_fec_decoders_struct (GstRtpBin * bin,
|
|
|
|
const GstStructure * decoders)
|
|
|
|
{
|
|
|
|
if (decoders == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (bin);
|
|
|
|
|
|
|
|
GST_OBJECT_LOCK (bin);
|
|
|
|
if (bin->fec_decoders)
|
|
|
|
gst_structure_free (bin->fec_decoders);
|
|
|
|
bin->fec_decoders = gst_structure_copy (decoders);
|
|
|
|
|
|
|
|
GST_OBJECT_UNLOCK (bin);
|
|
|
|
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
|
|
|
}
|
|
|
|
|
2020-10-06 01:03:13 +00:00
|
|
|
static void
|
|
|
|
gst_rtp_bin_set_fec_encoders_struct (GstRtpBin * bin,
|
|
|
|
const GstStructure * encoders)
|
|
|
|
{
|
|
|
|
if (encoders == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (bin);
|
|
|
|
|
|
|
|
GST_OBJECT_LOCK (bin);
|
|
|
|
if (bin->fec_encoders)
|
|
|
|
gst_structure_free (bin->fec_encoders);
|
|
|
|
bin->fec_encoders = gst_structure_copy (encoders);
|
|
|
|
|
|
|
|
GST_OBJECT_UNLOCK (bin);
|
|
|
|
|
|
|
|
GST_RTP_BIN_UNLOCK (bin);
|
|
|
|
}
|
|
|
|
|
2009-06-29 14:37:54 +00:00
|
|
|
static GstStructure *
|
|
|
|
gst_rtp_bin_get_sdes_struct (GstRtpBin * bin)
|
2007-12-10 14:03:32 +00:00
|
|
|
{
|
2009-06-29 14:37:54 +00:00
|
|
|
GstStructure *result;
|
2007-12-12 12:11:53 +00:00
|
|
|
|
2007-12-10 14:03:32 +00:00
|
|
|
GST_OBJECT_LOCK (bin);
|
2009-06-29 14:37:54 +00:00
|
|
|
result = gst_structure_copy (bin->sdes);
|
2007-12-10 14:03:32 +00:00
|
|
|
GST_OBJECT_UNLOCK (bin);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2020-10-06 01:13:30 +00:00
|
|
|
static GstStructure *
|
|
|
|
gst_rtp_bin_get_fec_decoders_struct (GstRtpBin * bin)
|
|
|
|
{
|
|
|
|
GstStructure *result;
|
|
|
|
|
|
|
|
GST_OBJECT_LOCK (bin);
|
|
|
|
result = gst_structure_copy (bin->fec_decoders);
|
|
|
|
GST_OBJECT_UNLOCK (bin);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2020-10-06 01:03:13 +00:00
|
|
|
static GstStructure *
|
|
|
|
gst_rtp_bin_get_fec_encoders_struct (GstRtpBin * bin)
|
|
|
|
{
|
|
|
|
GstStructure *result;
|
|
|
|
|
|
|
|
GST_OBJECT_LOCK (bin);
|
|
|
|
result = gst_structure_copy (bin->fec_encoders);
|
|
|
|
GST_OBJECT_UNLOCK (bin);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
static void
|
|
|
|
gst_rtp_bin_set_property (GObject * object, guint prop_id,
|
|
|
|
const GValue * value, GParamSpec * pspec)
|
|
|
|
{
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBin *rtpbin;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
|
|
|
|
rtpbin = GST_RTP_BIN (object);
|
|
|
|
|
|
|
|
switch (prop_id) {
|
2007-04-25 15:48:46 +00:00
|
|
|
case PROP_LATENCY:
|
gst/rtpmanager/gstrtpbin.c: Use lock to protect variable.
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-16 19:40:31 +00:00
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
2009-10-06 11:34:34 +00:00
|
|
|
rtpbin->latency_ms = g_value_get_uint (value);
|
|
|
|
rtpbin->latency_ns = rtpbin->latency_ms * GST_MSECOND;
|
gst/rtpmanager/gstrtpbin.c: Use lock to protect variable.
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-16 19:40:31 +00:00
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
2009-11-25 16:37:30 +00:00
|
|
|
/* propagate the property down to the jitterbuffer */
|
2008-05-26 10:00:24 +00:00
|
|
|
gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, "latency", value);
|
2007-04-25 15:48:46 +00:00
|
|
|
break;
|
2012-08-16 23:51:16 +00:00
|
|
|
case PROP_DROP_ON_LATENCY:
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
rtpbin->drop_on_latency = g_value_get_boolean (value);
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
/* propagate the property down to the jitterbuffer */
|
|
|
|
gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin,
|
|
|
|
"drop-on-latency", value);
|
|
|
|
break;
|
2009-06-29 14:37:54 +00:00
|
|
|
case PROP_SDES:
|
|
|
|
gst_rtp_bin_set_sdes_struct (rtpbin, g_value_get_boxed (value));
|
2007-12-10 14:03:32 +00:00
|
|
|
break;
|
2008-04-25 11:32:09 +00:00
|
|
|
case PROP_DO_LOST:
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
rtpbin->do_lost = g_value_get_boolean (value);
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
2008-05-26 10:00:24 +00:00
|
|
|
gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, "do-lost", value);
|
2008-04-25 11:32:09 +00:00
|
|
|
break;
|
2010-08-27 15:58:47 +00:00
|
|
|
case PROP_NTP_SYNC:
|
|
|
|
rtpbin->ntp_sync = g_value_get_boolean (value);
|
2017-09-14 11:00:56 +00:00
|
|
|
/* The default value of max_ts_offset depends on ntp_sync. If user
|
|
|
|
* hasn't set it then change default value */
|
|
|
|
if (!rtpbin->max_ts_offset_is_set) {
|
|
|
|
if (rtpbin->ntp_sync) {
|
|
|
|
rtpbin->max_ts_offset = 0;
|
|
|
|
} else {
|
|
|
|
rtpbin->max_ts_offset = DEFAULT_MAX_TS_OFFSET;
|
|
|
|
}
|
|
|
|
}
|
2018-05-29 14:24:02 +00:00
|
|
|
if (!rtpbin->min_ts_offset_is_set) {
|
|
|
|
if (rtpbin->ntp_sync) {
|
|
|
|
rtpbin->min_ts_offset = 0;
|
|
|
|
} else {
|
|
|
|
rtpbin->min_ts_offset = DEFAULT_MIN_TS_OFFSET;
|
|
|
|
}
|
|
|
|
}
|
2010-08-27 15:58:47 +00:00
|
|
|
break;
|
2011-08-08 10:15:20 +00:00
|
|
|
case PROP_RTCP_SYNC:
|
|
|
|
g_atomic_int_set (&rtpbin->rtcp_sync, g_value_get_enum (value));
|
|
|
|
break;
|
2011-08-08 10:09:41 +00:00
|
|
|
case PROP_RTCP_SYNC_INTERVAL:
|
|
|
|
rtpbin->rtcp_sync_interval = g_value_get_uint (value);
|
|
|
|
break;
|
2009-09-08 15:37:15 +00:00
|
|
|
case PROP_IGNORE_PT:
|
|
|
|
rtpbin->ignore_pt = g_value_get_boolean (value);
|
|
|
|
break;
|
2009-12-21 14:05:09 +00:00
|
|
|
case PROP_AUTOREMOVE:
|
|
|
|
rtpbin->priv->autoremove = g_value_get_boolean (value);
|
|
|
|
break;
|
2010-08-26 08:58:26 +00:00
|
|
|
case PROP_USE_PIPELINE_CLOCK:
|
|
|
|
{
|
|
|
|
GSList *sessions;
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
rtpbin->use_pipeline_clock = g_value_get_boolean (value);
|
|
|
|
for (sessions = rtpbin->sessions; sessions;
|
|
|
|
sessions = g_slist_next (sessions)) {
|
2010-09-13 14:03:50 +00:00
|
|
|
GstRtpBinSession *session = (GstRtpBinSession *) sessions->data;
|
|
|
|
|
|
|
|
g_object_set (G_OBJECT (session->session),
|
2010-09-13 12:38:11 +00:00
|
|
|
"use-pipeline-clock", rtpbin->use_pipeline_clock, NULL);
|
2010-08-26 08:58:26 +00:00
|
|
|
}
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
}
|
|
|
|
break;
|
2013-07-03 16:41:42 +00:00
|
|
|
case PROP_DO_SYNC_EVENT:
|
|
|
|
rtpbin->send_sync_event = g_value_get_boolean (value);
|
|
|
|
break;
|
2009-10-05 11:32:17 +00:00
|
|
|
case PROP_BUFFER_MODE:
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
rtpbin->buffer_mode = g_value_get_enum (value);
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
/* propagate the property down to the jitterbuffer */
|
|
|
|
gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, "mode", value);
|
|
|
|
break;
|
2013-08-23 09:55:02 +00:00
|
|
|
case PROP_DO_RETRANSMISSION:
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
rtpbin->do_retransmission = g_value_get_boolean (value);
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin,
|
|
|
|
"do-retransmission", value);
|
|
|
|
break;
|
2015-05-21 11:13:56 +00:00
|
|
|
case PROP_RTP_PROFILE:
|
|
|
|
rtpbin->rtp_profile = g_value_get_enum (value);
|
|
|
|
break;
|
2015-06-12 21:29:19 +00:00
|
|
|
case PROP_NTP_TIME_SOURCE:{
|
|
|
|
GSList *sessions;
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
rtpbin->ntp_time_source = g_value_get_enum (value);
|
|
|
|
for (sessions = rtpbin->sessions; sessions;
|
|
|
|
sessions = g_slist_next (sessions)) {
|
|
|
|
GstRtpBinSession *session = (GstRtpBinSession *) sessions->data;
|
|
|
|
|
|
|
|
g_object_set (G_OBJECT (session->session),
|
|
|
|
"ntp-time-source", rtpbin->ntp_time_source, NULL);
|
|
|
|
}
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
break;
|
|
|
|
}
|
2015-09-16 17:28:11 +00:00
|
|
|
case PROP_RTCP_SYNC_SEND_TIME:{
|
|
|
|
GSList *sessions;
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
rtpbin->rtcp_sync_send_time = g_value_get_boolean (value);
|
|
|
|
for (sessions = rtpbin->sessions; sessions;
|
|
|
|
sessions = g_slist_next (sessions)) {
|
|
|
|
GstRtpBinSession *session = (GstRtpBinSession *) sessions->data;
|
|
|
|
|
|
|
|
g_object_set (G_OBJECT (session->session),
|
|
|
|
"rtcp-sync-send-time", rtpbin->rtcp_sync_send_time, NULL);
|
|
|
|
}
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
break;
|
|
|
|
}
|
2015-09-21 11:47:21 +00:00
|
|
|
case PROP_MAX_RTCP_RTP_TIME_DIFF:
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
rtpbin->max_rtcp_rtp_time_diff = g_value_get_int (value);
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin,
|
|
|
|
"max-rtcp-rtp-time-diff", value);
|
|
|
|
break;
|
2015-10-07 11:02:12 +00:00
|
|
|
case PROP_MAX_DROPOUT_TIME:
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
rtpbin->max_dropout_time = g_value_get_uint (value);
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin,
|
|
|
|
"max-dropout-time", value);
|
|
|
|
gst_rtp_bin_propagate_property_to_session (rtpbin, "max-dropout-time",
|
|
|
|
value);
|
|
|
|
break;
|
|
|
|
case PROP_MAX_MISORDER_TIME:
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
rtpbin->max_misorder_time = g_value_get_uint (value);
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin,
|
|
|
|
"max-misorder-time", value);
|
2016-08-23 16:06:44 +00:00
|
|
|
gst_rtp_bin_propagate_property_to_session (rtpbin, "max-misorder-time",
|
2015-10-07 11:02:12 +00:00
|
|
|
value);
|
|
|
|
break;
|
2016-01-05 14:15:16 +00:00
|
|
|
case PROP_RFC7273_SYNC:
|
|
|
|
rtpbin->rfc7273_sync = g_value_get_boolean (value);
|
|
|
|
gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin,
|
|
|
|
"rfc7273-sync", value);
|
|
|
|
break;
|
2022-03-15 11:56:28 +00:00
|
|
|
case PROP_ADD_REFERENCE_TIMESTAMP_META:
|
|
|
|
rtpbin->add_reference_timestamp_meta = g_value_get_boolean (value);
|
|
|
|
gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin,
|
|
|
|
"add-reference-timestamp-meta", value);
|
|
|
|
break;
|
2016-05-06 07:44:42 +00:00
|
|
|
case PROP_MAX_STREAMS:
|
|
|
|
rtpbin->max_streams = g_value_get_uint (value);
|
|
|
|
break;
|
2017-09-14 09:20:17 +00:00
|
|
|
case PROP_MAX_TS_OFFSET_ADJUSTMENT:
|
|
|
|
rtpbin->max_ts_offset_adjustment = g_value_get_uint64 (value);
|
|
|
|
gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin,
|
|
|
|
"max-ts-offset-adjustment", value);
|
|
|
|
break;
|
2017-09-14 11:00:56 +00:00
|
|
|
case PROP_MAX_TS_OFFSET:
|
|
|
|
rtpbin->max_ts_offset = g_value_get_int64 (value);
|
|
|
|
rtpbin->max_ts_offset_is_set = TRUE;
|
|
|
|
break;
|
2018-05-29 14:24:02 +00:00
|
|
|
case PROP_MIN_TS_OFFSET:
|
|
|
|
rtpbin->min_ts_offset = g_value_get_uint64 (value);
|
|
|
|
rtpbin->min_ts_offset_is_set = TRUE;
|
|
|
|
break;
|
2021-11-23 08:03:28 +00:00
|
|
|
case PROP_TS_OFFSET_SMOOTHING_FACTOR:
|
|
|
|
rtpbin->ts_offset_smoothing_factor = g_value_get_uint (value);
|
|
|
|
break;
|
2020-10-06 01:13:30 +00:00
|
|
|
case PROP_FEC_DECODERS:
|
|
|
|
gst_rtp_bin_set_fec_decoders_struct (rtpbin, g_value_get_boxed (value));
|
|
|
|
break;
|
2020-10-06 01:03:13 +00:00
|
|
|
case PROP_FEC_ENCODERS:
|
|
|
|
gst_rtp_bin_set_fec_encoders_struct (rtpbin, g_value_get_boxed (value));
|
|
|
|
break;
|
2022-11-22 16:32:57 +00:00
|
|
|
case PROP_UPDATE_NTP64_HEADER_EXT:
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
rtpbin->update_ntp64_header_ext = g_value_get_boolean (value);
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
gst_rtp_bin_propagate_property_to_session (rtpbin,
|
|
|
|
"update-ntp64-header-ext", value);
|
|
|
|
break;
|
2023-06-16 19:53:11 +00:00
|
|
|
case PROP_TIMEOUT_INACTIVE_SOURCES:
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
rtpbin->timeout_inactive_sources = g_value_get_boolean (value);
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
gst_rtp_bin_propagate_property_to_session (rtpbin,
|
|
|
|
"timeout-inactive-sources", value);
|
|
|
|
break;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_rtp_bin_get_property (GObject * object, guint prop_id,
|
|
|
|
GValue * value, GParamSpec * pspec)
|
|
|
|
{
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBin *rtpbin;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
|
|
|
|
rtpbin = GST_RTP_BIN (object);
|
|
|
|
|
|
|
|
switch (prop_id) {
|
2007-04-25 15:48:46 +00:00
|
|
|
case PROP_LATENCY:
|
gst/rtpmanager/gstrtpbin.c: Use lock to protect variable.
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-16 19:40:31 +00:00
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
2009-10-06 11:34:34 +00:00
|
|
|
g_value_set_uint (value, rtpbin->latency_ms);
|
gst/rtpmanager/gstrtpbin.c: Use lock to protect variable.
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-16 19:40:31 +00:00
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
2007-04-25 15:48:46 +00:00
|
|
|
break;
|
2012-08-16 23:51:16 +00:00
|
|
|
case PROP_DROP_ON_LATENCY:
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
g_value_set_boolean (value, rtpbin->drop_on_latency);
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
break;
|
2009-06-29 14:37:54 +00:00
|
|
|
case PROP_SDES:
|
|
|
|
g_value_take_boxed (value, gst_rtp_bin_get_sdes_struct (rtpbin));
|
2007-12-10 14:03:32 +00:00
|
|
|
break;
|
2008-04-25 11:32:09 +00:00
|
|
|
case PROP_DO_LOST:
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
g_value_set_boolean (value, rtpbin->do_lost);
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
break;
|
2009-09-08 15:37:15 +00:00
|
|
|
case PROP_IGNORE_PT:
|
|
|
|
g_value_set_boolean (value, rtpbin->ignore_pt);
|
|
|
|
break;
|
2010-08-27 15:58:47 +00:00
|
|
|
case PROP_NTP_SYNC:
|
|
|
|
g_value_set_boolean (value, rtpbin->ntp_sync);
|
|
|
|
break;
|
2011-08-08 10:15:20 +00:00
|
|
|
case PROP_RTCP_SYNC:
|
|
|
|
g_value_set_enum (value, g_atomic_int_get (&rtpbin->rtcp_sync));
|
|
|
|
break;
|
2011-08-08 10:09:41 +00:00
|
|
|
case PROP_RTCP_SYNC_INTERVAL:
|
|
|
|
g_value_set_uint (value, rtpbin->rtcp_sync_interval);
|
|
|
|
break;
|
2009-12-21 14:05:09 +00:00
|
|
|
case PROP_AUTOREMOVE:
|
|
|
|
g_value_set_boolean (value, rtpbin->priv->autoremove);
|
|
|
|
break;
|
2009-10-05 11:32:17 +00:00
|
|
|
case PROP_BUFFER_MODE:
|
|
|
|
g_value_set_enum (value, rtpbin->buffer_mode);
|
|
|
|
break;
|
2010-08-26 08:58:26 +00:00
|
|
|
case PROP_USE_PIPELINE_CLOCK:
|
|
|
|
g_value_set_boolean (value, rtpbin->use_pipeline_clock);
|
|
|
|
break;
|
2013-07-03 16:41:42 +00:00
|
|
|
case PROP_DO_SYNC_EVENT:
|
|
|
|
g_value_set_boolean (value, rtpbin->send_sync_event);
|
|
|
|
break;
|
2013-08-23 09:55:02 +00:00
|
|
|
case PROP_DO_RETRANSMISSION:
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
g_value_set_boolean (value, rtpbin->do_retransmission);
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
break;
|
2015-05-21 11:13:56 +00:00
|
|
|
case PROP_RTP_PROFILE:
|
|
|
|
g_value_set_enum (value, rtpbin->rtp_profile);
|
|
|
|
break;
|
2015-06-12 21:29:19 +00:00
|
|
|
case PROP_NTP_TIME_SOURCE:
|
|
|
|
g_value_set_enum (value, rtpbin->ntp_time_source);
|
|
|
|
break;
|
2015-09-16 17:28:11 +00:00
|
|
|
case PROP_RTCP_SYNC_SEND_TIME:
|
|
|
|
g_value_set_boolean (value, rtpbin->rtcp_sync_send_time);
|
|
|
|
break;
|
2015-09-21 11:47:21 +00:00
|
|
|
case PROP_MAX_RTCP_RTP_TIME_DIFF:
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
g_value_set_int (value, rtpbin->max_rtcp_rtp_time_diff);
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
2015-10-07 22:23:45 +00:00
|
|
|
break;
|
2015-10-07 11:02:12 +00:00
|
|
|
case PROP_MAX_DROPOUT_TIME:
|
|
|
|
g_value_set_uint (value, rtpbin->max_dropout_time);
|
|
|
|
break;
|
|
|
|
case PROP_MAX_MISORDER_TIME:
|
|
|
|
g_value_set_uint (value, rtpbin->max_misorder_time);
|
|
|
|
break;
|
2016-01-05 14:15:16 +00:00
|
|
|
case PROP_RFC7273_SYNC:
|
|
|
|
g_value_set_boolean (value, rtpbin->rfc7273_sync);
|
2015-09-21 11:47:21 +00:00
|
|
|
break;
|
2022-03-15 11:56:28 +00:00
|
|
|
case PROP_ADD_REFERENCE_TIMESTAMP_META:
|
|
|
|
g_value_set_boolean (value, rtpbin->add_reference_timestamp_meta);
|
|
|
|
break;
|
2016-05-06 07:44:42 +00:00
|
|
|
case PROP_MAX_STREAMS:
|
|
|
|
g_value_set_uint (value, rtpbin->max_streams);
|
|
|
|
break;
|
2017-09-14 09:20:17 +00:00
|
|
|
case PROP_MAX_TS_OFFSET_ADJUSTMENT:
|
|
|
|
g_value_set_uint64 (value, rtpbin->max_ts_offset_adjustment);
|
|
|
|
break;
|
2017-09-14 11:00:56 +00:00
|
|
|
case PROP_MAX_TS_OFFSET:
|
|
|
|
g_value_set_int64 (value, rtpbin->max_ts_offset);
|
|
|
|
break;
|
2018-05-29 14:24:02 +00:00
|
|
|
case PROP_MIN_TS_OFFSET:
|
|
|
|
g_value_set_uint64 (value, rtpbin->min_ts_offset);
|
|
|
|
break;
|
2021-11-23 08:03:28 +00:00
|
|
|
case PROP_TS_OFFSET_SMOOTHING_FACTOR:
|
|
|
|
g_value_set_uint (value, rtpbin->ts_offset_smoothing_factor);
|
|
|
|
break;
|
2020-10-06 01:13:30 +00:00
|
|
|
case PROP_FEC_DECODERS:
|
|
|
|
g_value_take_boxed (value, gst_rtp_bin_get_fec_decoders_struct (rtpbin));
|
|
|
|
break;
|
2020-10-06 01:03:13 +00:00
|
|
|
case PROP_FEC_ENCODERS:
|
|
|
|
g_value_take_boxed (value, gst_rtp_bin_get_fec_encoders_struct (rtpbin));
|
|
|
|
break;
|
2022-11-22 16:32:57 +00:00
|
|
|
case PROP_UPDATE_NTP64_HEADER_EXT:
|
|
|
|
g_value_set_boolean (value, rtpbin->update_ntp64_header_ext);
|
|
|
|
break;
|
2023-06-16 19:53:11 +00:00
|
|
|
case PROP_TIMEOUT_INACTIVE_SOURCES:
|
|
|
|
g_value_set_boolean (value, rtpbin->timeout_inactive_sources);
|
|
|
|
break;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-12-10 18:36:04 +00:00
|
|
|
static void
|
|
|
|
gst_rtp_bin_handle_message (GstBin * bin, GstMessage * message)
|
|
|
|
{
|
|
|
|
GstRtpBin *rtpbin;
|
|
|
|
|
|
|
|
rtpbin = GST_RTP_BIN (bin);
|
|
|
|
|
|
|
|
switch (GST_MESSAGE_TYPE (message)) {
|
|
|
|
case GST_MESSAGE_ELEMENT:
|
|
|
|
{
|
|
|
|
const GstStructure *s = gst_message_get_structure (message);
|
|
|
|
|
|
|
|
/* we change the structure name and add the session ID to it */
|
2009-05-28 21:37:44 +00:00
|
|
|
if (gst_structure_has_name (s, "application/x-rtp-source-sdes")) {
|
2009-10-05 19:31:59 +00:00
|
|
|
GstRtpBinSession *sess;
|
2007-12-10 18:36:04 +00:00
|
|
|
|
2009-10-05 19:31:59 +00:00
|
|
|
/* find the session we set it as object data */
|
|
|
|
sess = g_object_get_data (G_OBJECT (GST_MESSAGE_SRC (message)),
|
|
|
|
"GstRTPBin.session");
|
|
|
|
|
|
|
|
if (G_LIKELY (sess)) {
|
|
|
|
message = gst_message_make_writable (message);
|
|
|
|
s = gst_message_get_structure (message);
|
|
|
|
gst_structure_set ((GstStructure *) s, "session", G_TYPE_UINT,
|
|
|
|
sess->id, NULL);
|
2007-12-10 18:36:04 +00:00
|
|
|
}
|
|
|
|
}
|
2009-10-05 11:32:17 +00:00
|
|
|
GST_BIN_CLASS (parent_class)->handle_message (bin, message);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case GST_MESSAGE_BUFFERING:
|
|
|
|
{
|
|
|
|
gint percent;
|
2009-10-05 17:45:35 +00:00
|
|
|
gint min_percent = 100;
|
2010-01-27 16:57:55 +00:00
|
|
|
GSList *sessions, *streams;
|
2009-10-05 17:45:35 +00:00
|
|
|
GstRtpBinStream *stream;
|
|
|
|
gboolean change = FALSE, active = FALSE;
|
2009-10-08 17:23:53 +00:00
|
|
|
GstClockTime min_out_time;
|
2010-12-20 09:49:56 +00:00
|
|
|
GstBufferingMode mode;
|
|
|
|
gint avg_in, avg_out;
|
|
|
|
gint64 buffering_left;
|
2009-10-05 11:32:17 +00:00
|
|
|
|
|
|
|
gst_message_parse_buffering (message, &percent);
|
2010-12-20 09:49:56 +00:00
|
|
|
gst_message_parse_buffering_stats (message, &mode, &avg_in, &avg_out,
|
|
|
|
&buffering_left);
|
2009-10-05 11:32:17 +00:00
|
|
|
|
2009-10-05 17:45:35 +00:00
|
|
|
stream =
|
|
|
|
g_object_get_data (G_OBJECT (GST_MESSAGE_SRC (message)),
|
2009-10-05 19:31:59 +00:00
|
|
|
"GstRTPBin.stream");
|
2009-10-05 17:45:35 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin, "got percent %d from stream %p", percent, stream);
|
|
|
|
|
|
|
|
/* get the stream */
|
2009-10-05 19:31:59 +00:00
|
|
|
if (G_LIKELY (stream)) {
|
2009-10-05 17:45:35 +00:00
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
/* fill in the percent */
|
|
|
|
stream->percent = percent;
|
|
|
|
|
2009-10-05 19:31:59 +00:00
|
|
|
/* calculate the min value for all streams */
|
2009-10-05 17:45:35 +00:00
|
|
|
for (sessions = rtpbin->sessions; sessions;
|
|
|
|
sessions = g_slist_next (sessions)) {
|
|
|
|
GstRtpBinSession *session = (GstRtpBinSession *) sessions->data;
|
|
|
|
|
|
|
|
GST_RTP_SESSION_LOCK (session);
|
2010-05-03 09:56:58 +00:00
|
|
|
if (session->streams) {
|
|
|
|
for (streams = session->streams; streams;
|
|
|
|
streams = g_slist_next (streams)) {
|
|
|
|
GstRtpBinStream *stream = (GstRtpBinStream *) streams->data;
|
2009-10-05 17:45:35 +00:00
|
|
|
|
2010-05-03 09:56:58 +00:00
|
|
|
GST_DEBUG_OBJECT (bin, "stream %p percent %d", stream,
|
|
|
|
stream->percent);
|
2009-10-05 17:45:35 +00:00
|
|
|
|
2010-05-03 09:56:58 +00:00
|
|
|
/* find min percent */
|
|
|
|
if (min_percent > stream->percent)
|
|
|
|
min_percent = stream->percent;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
GST_INFO_OBJECT (bin,
|
|
|
|
"session has no streams, setting min_percent to 0");
|
|
|
|
min_percent = 0;
|
2009-10-05 17:45:35 +00:00
|
|
|
}
|
|
|
|
GST_RTP_SESSION_UNLOCK (session);
|
|
|
|
}
|
|
|
|
GST_DEBUG_OBJECT (bin, "min percent %d", min_percent);
|
|
|
|
|
|
|
|
if (rtpbin->buffering) {
|
|
|
|
if (min_percent == 100) {
|
|
|
|
rtpbin->buffering = FALSE;
|
|
|
|
active = TRUE;
|
|
|
|
change = TRUE;
|
|
|
|
}
|
|
|
|
} else {
|
2009-10-08 16:42:11 +00:00
|
|
|
if (min_percent < 100) {
|
|
|
|
/* pause the streams */
|
|
|
|
rtpbin->buffering = TRUE;
|
|
|
|
active = FALSE;
|
|
|
|
change = TRUE;
|
|
|
|
}
|
2009-10-05 17:45:35 +00:00
|
|
|
}
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
|
|
|
|
gst_message_unref (message);
|
2009-10-05 18:09:30 +00:00
|
|
|
|
|
|
|
/* make a new buffering message with the min value */
|
2009-10-05 17:45:35 +00:00
|
|
|
message =
|
|
|
|
gst_message_new_buffering (GST_OBJECT_CAST (bin), min_percent);
|
2010-12-20 09:49:56 +00:00
|
|
|
gst_message_set_buffering_stats (message, mode, avg_in, avg_out,
|
|
|
|
buffering_left);
|
2009-10-05 17:45:35 +00:00
|
|
|
|
2009-10-05 19:31:59 +00:00
|
|
|
if (G_UNLIKELY (change)) {
|
|
|
|
GstClock *clock;
|
2009-10-06 11:34:34 +00:00
|
|
|
guint64 running_time = 0;
|
2009-10-08 17:23:53 +00:00
|
|
|
guint64 offset = 0;
|
2009-10-06 11:34:34 +00:00
|
|
|
|
|
|
|
/* figure out the running time when we have a clock */
|
|
|
|
if (G_LIKELY ((clock =
|
|
|
|
gst_element_get_clock (GST_ELEMENT_CAST (bin))))) {
|
|
|
|
guint64 now, base_time;
|
2009-10-05 19:31:59 +00:00
|
|
|
|
|
|
|
now = gst_clock_get_time (clock);
|
|
|
|
base_time = gst_element_get_base_time (GST_ELEMENT_CAST (bin));
|
|
|
|
running_time = now - base_time;
|
2011-09-19 10:15:11 +00:00
|
|
|
gst_object_unref (clock);
|
2009-10-06 11:34:34 +00:00
|
|
|
}
|
2009-10-08 17:23:53 +00:00
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"running time now %" GST_TIME_FORMAT,
|
|
|
|
GST_TIME_ARGS (running_time));
|
|
|
|
|
2010-01-27 16:57:55 +00:00
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
|
2009-10-08 17:23:53 +00:00
|
|
|
/* when we reactivate, calculate the offsets so that all streams have
|
|
|
|
* an output time that is at least as big as the running_time */
|
|
|
|
offset = 0;
|
|
|
|
if (active) {
|
|
|
|
if (running_time > rtpbin->buffer_start) {
|
|
|
|
offset = running_time - rtpbin->buffer_start;
|
|
|
|
if (offset >= rtpbin->latency_ns)
|
|
|
|
offset -= rtpbin->latency_ns;
|
|
|
|
else
|
|
|
|
offset = 0;
|
|
|
|
}
|
2009-10-05 19:31:59 +00:00
|
|
|
}
|
|
|
|
|
2010-01-27 16:57:55 +00:00
|
|
|
/* pause all streams */
|
2009-10-08 17:23:53 +00:00
|
|
|
min_out_time = -1;
|
2010-01-27 16:57:55 +00:00
|
|
|
for (sessions = rtpbin->sessions; sessions;
|
|
|
|
sessions = g_slist_next (sessions)) {
|
|
|
|
GstRtpBinSession *session = (GstRtpBinSession *) sessions->data;
|
|
|
|
|
|
|
|
GST_RTP_SESSION_LOCK (session);
|
|
|
|
for (streams = session->streams; streams;
|
|
|
|
streams = g_slist_next (streams)) {
|
|
|
|
GstRtpBinStream *stream = (GstRtpBinStream *) streams->data;
|
|
|
|
GstElement *element = stream->buffer;
|
2020-06-05 08:49:17 +00:00
|
|
|
guint64 last_out = -1;
|
2010-01-27 16:57:55 +00:00
|
|
|
|
2017-12-19 17:23:16 +00:00
|
|
|
if (g_signal_lookup ("set-active", G_OBJECT_TYPE (element)) != 0) {
|
|
|
|
g_signal_emit_by_name (element, "set-active", active, offset,
|
|
|
|
&last_out);
|
|
|
|
}
|
2010-01-27 16:57:55 +00:00
|
|
|
|
|
|
|
if (!active) {
|
|
|
|
g_object_get (element, "percent", &stream->percent, NULL);
|
|
|
|
|
|
|
|
if (last_out == -1)
|
|
|
|
last_out = 0;
|
2010-05-03 09:23:59 +00:00
|
|
|
if (min_out_time == -1 || last_out < min_out_time)
|
2010-01-27 16:57:55 +00:00
|
|
|
min_out_time = last_out;
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"setting %p to %d, offset %" GST_TIME_FORMAT ", last %"
|
|
|
|
GST_TIME_FORMAT ", percent %d", element, active,
|
|
|
|
GST_TIME_ARGS (offset), GST_TIME_ARGS (last_out),
|
|
|
|
stream->percent);
|
2009-10-08 17:23:53 +00:00
|
|
|
}
|
2010-01-27 16:57:55 +00:00
|
|
|
GST_RTP_SESSION_UNLOCK (session);
|
2009-10-05 17:45:35 +00:00
|
|
|
}
|
2009-10-08 17:23:53 +00:00
|
|
|
GST_DEBUG_OBJECT (bin,
|
|
|
|
"min out time %" GST_TIME_FORMAT, GST_TIME_ARGS (min_out_time));
|
|
|
|
|
|
|
|
/* the buffer_start is the min out time of all paused jitterbuffers */
|
|
|
|
if (!active)
|
|
|
|
rtpbin->buffer_start = min_out_time;
|
2010-01-27 16:57:55 +00:00
|
|
|
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
2009-10-05 17:45:35 +00:00
|
|
|
}
|
|
|
|
}
|
2009-10-05 11:32:17 +00:00
|
|
|
GST_BIN_CLASS (parent_class)->handle_message (bin, message);
|
|
|
|
break;
|
2007-12-10 18:36:04 +00:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
GST_BIN_CLASS (parent_class)->handle_message (bin, message);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
static GstStateChangeReturn
|
|
|
|
gst_rtp_bin_change_state (GstElement * element, GstStateChange transition)
|
|
|
|
{
|
|
|
|
GstStateChangeReturn res;
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBin *rtpbin;
|
2008-05-27 16:48:10 +00:00
|
|
|
GstRtpBinPrivate *priv;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
|
|
|
|
rtpbin = GST_RTP_BIN (element);
|
2008-05-27 16:48:10 +00:00
|
|
|
priv = rtpbin->priv;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
|
|
|
|
switch (transition) {
|
|
|
|
case GST_STATE_CHANGE_NULL_TO_READY:
|
|
|
|
break;
|
|
|
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
2015-06-12 21:06:24 +00:00
|
|
|
priv->last_ntpnstime = 0;
|
2008-06-06 13:01:05 +00:00
|
|
|
GST_LOG_OBJECT (rtpbin, "clearing shutdown flag");
|
2008-05-27 16:48:10 +00:00
|
|
|
g_atomic_int_set (&priv->shutdown, 0);
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
break;
|
2008-05-27 16:48:10 +00:00
|
|
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
2008-06-06 13:01:05 +00:00
|
|
|
GST_LOG_OBJECT (rtpbin, "setting shutdown flag");
|
2008-05-27 16:48:10 +00:00
|
|
|
g_atomic_int_set (&priv->shutdown, 1);
|
2008-06-06 13:01:05 +00:00
|
|
|
/* wait for all callbacks to end by taking the lock. No new callbacks will
|
|
|
|
* be able to happen as we set the shutdown flag. */
|
|
|
|
GST_RTP_BIN_DYN_LOCK (rtpbin);
|
|
|
|
GST_LOG_OBJECT (rtpbin, "dynamic lock taken, we can continue shutdown");
|
|
|
|
GST_RTP_BIN_DYN_UNLOCK (rtpbin);
|
2008-05-27 16:48:10 +00:00
|
|
|
break;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
res = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
|
|
|
|
|
|
|
|
switch (transition) {
|
|
|
|
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
|
|
|
|
break;
|
|
|
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
|
|
|
break;
|
|
|
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2021-12-07 22:43:21 +00:00
|
|
|
static GstElement *
|
|
|
|
session_request_element_full (GstRtpBinSession * session, guint signal,
|
|
|
|
guint ssrc, guint8 pt)
|
|
|
|
{
|
|
|
|
GstElement *element = NULL;
|
|
|
|
GstRtpBin *bin = session->bin;
|
|
|
|
|
|
|
|
g_signal_emit (bin, gst_rtp_bin_signals[signal], 0, session->id, ssrc, pt,
|
|
|
|
&element);
|
|
|
|
|
|
|
|
if (element) {
|
|
|
|
if (!bin_manage_element (bin, element))
|
|
|
|
goto manage_failed;
|
|
|
|
session->elements = g_slist_prepend (session->elements, element);
|
|
|
|
}
|
|
|
|
return element;
|
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
manage_failed:
|
|
|
|
{
|
|
|
|
GST_WARNING_OBJECT (bin, "unable to manage element");
|
|
|
|
gst_object_unref (element);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-05 23:53:52 +00:00
|
|
|
static GstElement *
|
2013-12-30 16:36:42 +00:00
|
|
|
session_request_element (GstRtpBinSession * session, guint signal)
|
2013-12-05 23:53:52 +00:00
|
|
|
{
|
2013-12-30 16:36:42 +00:00
|
|
|
GstElement *element = NULL;
|
2013-12-30 15:28:57 +00:00
|
|
|
GstRtpBin *bin = session->bin;
|
2013-12-05 23:53:52 +00:00
|
|
|
|
2013-12-30 16:36:42 +00:00
|
|
|
g_signal_emit (bin, gst_rtp_bin_signals[signal], 0, session->id, &element);
|
2013-12-05 23:53:52 +00:00
|
|
|
|
2013-12-30 16:36:42 +00:00
|
|
|
if (element) {
|
|
|
|
if (!bin_manage_element (bin, element))
|
2013-12-30 15:28:57 +00:00
|
|
|
goto manage_failed;
|
2013-12-30 16:36:42 +00:00
|
|
|
session->elements = g_slist_prepend (session->elements, element);
|
2013-12-05 23:53:52 +00:00
|
|
|
}
|
2013-12-30 16:36:42 +00:00
|
|
|
return element;
|
2013-12-05 23:53:52 +00:00
|
|
|
|
|
|
|
/* ERRORS */
|
2013-12-30 15:28:57 +00:00
|
|
|
manage_failed:
|
2013-12-05 23:53:52 +00:00
|
|
|
{
|
2013-12-30 16:36:42 +00:00
|
|
|
GST_WARNING_OBJECT (bin, "unable to manage element");
|
|
|
|
gst_object_unref (element);
|
2013-12-05 23:53:52 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-25 10:36:40 +00:00
|
|
|
static gboolean
|
|
|
|
copy_sticky_events (GstPad * pad, GstEvent ** event, gpointer user_data)
|
|
|
|
{
|
|
|
|
GstPad *gpad = GST_PAD_CAST (user_data);
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (gpad, "store sticky event %" GST_PTR_FORMAT, *event);
|
|
|
|
gst_pad_store_sticky_event (gpad, *event);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2020-10-06 01:13:30 +00:00
|
|
|
static gboolean
|
2021-11-09 04:10:06 +00:00
|
|
|
ensure_early_fec_decoder (GstRtpBin * rtpbin, GstRtpBinSession * session)
|
2020-10-06 01:13:30 +00:00
|
|
|
{
|
|
|
|
const gchar *factory;
|
|
|
|
gchar *sess_id_str;
|
|
|
|
|
2021-11-09 04:10:06 +00:00
|
|
|
if (session->early_fec_decoder)
|
2020-10-06 01:13:30 +00:00
|
|
|
goto done;
|
|
|
|
|
|
|
|
sess_id_str = g_strdup_printf ("%u", session->id);
|
|
|
|
factory = gst_structure_get_string (rtpbin->fec_decoders, sess_id_str);
|
|
|
|
g_free (sess_id_str);
|
|
|
|
|
|
|
|
/* First try the property */
|
|
|
|
if (factory) {
|
|
|
|
GError *err = NULL;
|
|
|
|
|
2021-11-09 04:10:06 +00:00
|
|
|
session->early_fec_decoder =
|
2020-10-06 01:13:30 +00:00
|
|
|
gst_parse_bin_from_description_full (factory, TRUE, NULL,
|
|
|
|
GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS | GST_PARSE_FLAG_FATAL_ERRORS,
|
|
|
|
&err);
|
2021-11-09 04:10:06 +00:00
|
|
|
if (!session->early_fec_decoder) {
|
2020-10-06 01:13:30 +00:00
|
|
|
GST_ERROR_OBJECT (rtpbin, "Failed to build decoder from factory: %s",
|
|
|
|
err->message);
|
|
|
|
}
|
|
|
|
|
2021-11-09 04:10:06 +00:00
|
|
|
bin_manage_element (session->bin, session->early_fec_decoder);
|
2020-10-06 01:13:30 +00:00
|
|
|
session->elements =
|
2021-11-09 04:10:06 +00:00
|
|
|
g_slist_prepend (session->elements, session->early_fec_decoder);
|
2020-10-06 01:13:30 +00:00
|
|
|
GST_INFO_OBJECT (rtpbin, "Built FEC decoder: %" GST_PTR_FORMAT
|
2021-11-09 04:10:06 +00:00
|
|
|
" for session %u", session->early_fec_decoder, session->id);
|
2020-10-06 01:13:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 04:10:06 +00:00
|
|
|
/* Do not fallback to the signal as the signal expects a fec decoder to
|
|
|
|
* be placed at a different place in the pipeline */
|
2020-10-06 01:13:30 +00:00
|
|
|
|
|
|
|
done:
|
2021-11-09 04:10:06 +00:00
|
|
|
return session->early_fec_decoder != NULL;
|
2020-10-06 01:13:30 +00:00
|
|
|
}
|
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
static void
|
2019-03-18 19:27:21 +00:00
|
|
|
expose_recv_src_pad (GstRtpBin * rtpbin, GstPad * pad, GstRtpBinStream * stream,
|
|
|
|
guint8 pt)
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
{
|
|
|
|
GstElementClass *klass;
|
|
|
|
GstPadTemplate *templ;
|
|
|
|
gchar *padname;
|
|
|
|
GstPad *gpad;
|
|
|
|
|
2019-03-18 19:27:21 +00:00
|
|
|
gst_object_ref (pad);
|
2017-11-28 05:02:05 +00:00
|
|
|
|
2021-11-09 04:10:06 +00:00
|
|
|
if (stream->session->storage) {
|
2021-12-07 22:43:21 +00:00
|
|
|
/* First try the legacy signal, with no ssrc and pt as parameters.
|
|
|
|
* This will likely cause issues for the BUNDLE case. */
|
2021-11-09 04:10:06 +00:00
|
|
|
GstElement *fec_decoder =
|
|
|
|
session_request_element (stream->session, SIGNAL_REQUEST_FEC_DECODER);
|
|
|
|
|
2021-12-07 22:43:21 +00:00
|
|
|
/* Now try the new signal, where the application can provide a FEC
|
|
|
|
* decoder according to ssrc and pt. */
|
|
|
|
if (!fec_decoder) {
|
|
|
|
fec_decoder =
|
|
|
|
session_request_element_full (stream->session,
|
|
|
|
SIGNAL_REQUEST_FEC_DECODER_FULL, stream->ssrc, pt);
|
|
|
|
}
|
|
|
|
|
2021-11-09 04:10:06 +00:00
|
|
|
if (fec_decoder) {
|
2017-11-28 05:02:05 +00:00
|
|
|
GstPad *sinkpad, *srcpad;
|
|
|
|
GstPadLinkReturn ret;
|
|
|
|
|
|
|
|
sinkpad = gst_element_get_static_pad (fec_decoder, "sink");
|
|
|
|
|
|
|
|
if (!sinkpad)
|
|
|
|
goto fec_decoder_sink_failed;
|
|
|
|
|
|
|
|
ret = gst_pad_link (pad, sinkpad);
|
|
|
|
gst_object_unref (sinkpad);
|
|
|
|
|
|
|
|
if (ret != GST_PAD_LINK_OK)
|
|
|
|
goto fec_decoder_link_failed;
|
|
|
|
|
|
|
|
srcpad = gst_element_get_static_pad (fec_decoder, "src");
|
|
|
|
|
|
|
|
if (!srcpad)
|
|
|
|
goto fec_decoder_src_failed;
|
|
|
|
|
|
|
|
gst_pad_sticky_events_foreach (pad, copy_sticky_events, srcpad);
|
|
|
|
gst_object_unref (pad);
|
|
|
|
pad = srcpad;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-05-27 16:48:10 +00:00
|
|
|
GST_RTP_BIN_SHUTDOWN_LOCK (rtpbin, shutdown);
|
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
/* ghost the pad to the parent */
|
|
|
|
klass = GST_ELEMENT_GET_CLASS (rtpbin);
|
2011-11-04 10:58:22 +00:00
|
|
|
templ = gst_element_class_get_pad_template (klass, "recv_rtp_src_%u_%u_%u");
|
|
|
|
padname = g_strdup_printf ("recv_rtp_src_%u_%u_%u",
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
stream->session->id, stream->ssrc, pt);
|
|
|
|
gpad = gst_ghost_pad_new_from_template (padname, pad, templ);
|
|
|
|
g_free (padname);
|
2009-06-29 16:48:33 +00:00
|
|
|
g_object_set_data (G_OBJECT (pad), "GstRTPBin.ghostpad", gpad);
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
|
|
|
gst_pad_set_active (gpad, TRUE);
|
2008-05-27 16:48:10 +00:00
|
|
|
GST_RTP_BIN_SHUTDOWN_UNLOCK (rtpbin);
|
|
|
|
|
2014-03-25 10:36:40 +00:00
|
|
|
gst_pad_sticky_events_foreach (pad, copy_sticky_events, gpad);
|
2010-04-07 13:31:52 +00:00
|
|
|
gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), gpad);
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
done:
|
|
|
|
gst_object_unref (pad);
|
|
|
|
|
2008-05-27 16:48:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
shutdown:
|
|
|
|
{
|
|
|
|
GST_DEBUG ("ignoring, we are shutting down");
|
2017-11-28 05:02:05 +00:00
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
fec_decoder_sink_failed:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to get fec encoder sink pad for session %u",
|
|
|
|
stream->session->id);
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
fec_decoder_src_failed:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to get fec encoder src pad for session %u",
|
|
|
|
stream->session->id);
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
fec_decoder_link_failed:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to link fec decoder for session %u",
|
|
|
|
stream->session->id);
|
|
|
|
goto done;
|
2008-05-27 16:48:10 +00:00
|
|
|
}
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
}
|
|
|
|
|
2019-09-02 12:27:35 +00:00
|
|
|
/* a new pad (SSRC) was created in @session. This signal is emitted from the
|
2019-03-18 19:27:21 +00:00
|
|
|
* payload demuxer. */
|
|
|
|
static void
|
|
|
|
new_payload_found (GstElement * element, guint pt, GstPad * pad,
|
|
|
|
GstRtpBinStream * stream)
|
|
|
|
{
|
|
|
|
GstRtpBin *rtpbin;
|
|
|
|
|
|
|
|
rtpbin = stream->bin;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "new payload pad %u", pt);
|
|
|
|
|
|
|
|
expose_recv_src_pad (rtpbin, pad, stream, pt);
|
|
|
|
}
|
|
|
|
|
2009-06-29 16:48:33 +00:00
|
|
|
static void
|
|
|
|
payload_pad_removed (GstElement * element, GstPad * pad,
|
|
|
|
GstRtpBinStream * stream)
|
|
|
|
{
|
|
|
|
GstRtpBin *rtpbin;
|
|
|
|
GstPad *gpad;
|
|
|
|
|
|
|
|
rtpbin = stream->bin;
|
|
|
|
|
|
|
|
GST_DEBUG ("payload pad removed");
|
|
|
|
|
|
|
|
GST_RTP_BIN_DYN_LOCK (rtpbin);
|
|
|
|
if ((gpad = g_object_get_data (G_OBJECT (pad), "GstRTPBin.ghostpad"))) {
|
|
|
|
g_object_set_data (G_OBJECT (pad), "GstRTPBin.ghostpad", NULL);
|
|
|
|
|
|
|
|
gst_pad_set_active (gpad, FALSE);
|
|
|
|
gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), gpad);
|
|
|
|
}
|
|
|
|
GST_RTP_BIN_DYN_UNLOCK (rtpbin);
|
|
|
|
}
|
|
|
|
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
static GstCaps *
|
2007-08-23 21:39:58 +00:00
|
|
|
pt_map_requested (GstElement * element, guint pt, GstRtpBinSession * session)
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
{
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBin *rtpbin;
|
2007-04-12 08:18:32 +00:00
|
|
|
GstCaps *caps;
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
|
configure.ac: Disable rtpmanager for now because it depends on CVS -base.
Original commit message from CVS:
* configure.ac:
Disable rtpmanager for now because it depends on CVS -base.
* gst/rtpmanager/Makefile.am:
Added new files for session manager.
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(create_stream), (pt_map_requested), (new_ssrc_pad_found):
Some cleanups.
the session manager can now also request a pt-map.
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (rtcp_thread), (start_rtcp_thread),
(stop_rtcp_thread), (gst_rtp_session_change_state),
(gst_rtp_session_process_rtp), (gst_rtp_session_send_rtp),
(gst_rtp_session_send_rtcp), (gst_rtp_session_clock_rate),
(gst_rtp_session_get_time), (gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_event_send_rtp_sink),
(gst_rtp_session_chain_send_rtp), (create_send_rtcp_src),
(gst_rtp_session_request_new_pad):
* gst/rtpmanager/gstrtpsession.h:
We can ask for pt-map now too when the session manager needs it.
Hook up to the new session manager, implement the needed callbacks for
pushing data, getting clock time and requesting clock-rates.
Rename rtcp_src to send_rtcp_src to make it clear that this RTCP is to
be send to clients.
Add code to start and stop the thread that will schedule RTCP through
the session manager.
* gst/rtpmanager/rtpsession.c: (rtp_session_class_init),
(rtp_session_init), (rtp_session_finalize),
(rtp_session_set_property), (rtp_session_get_property),
(on_new_ssrc), (on_ssrc_collision), (on_ssrc_validated),
(on_bye_ssrc), (rtp_session_new), (rtp_session_set_callbacks),
(rtp_session_set_bandwidth), (rtp_session_get_bandwidth),
(rtp_session_set_rtcp_bandwidth), (rtp_session_get_rtcp_bandwidth),
(source_push_rtp), (source_clock_rate), (check_collision),
(obtain_source), (rtp_session_add_source),
(rtp_session_get_num_sources),
(rtp_session_get_num_active_sources),
(rtp_session_get_source_by_ssrc),
(rtp_session_get_source_by_cname), (rtp_session_create_source),
(update_arrival_stats), (rtp_session_process_rtp),
(rtp_session_process_sr), (rtp_session_process_rr),
(rtp_session_process_sdes), (rtp_session_process_bye),
(rtp_session_process_app), (rtp_session_process_rtcp),
(rtp_session_send_rtp), (rtp_session_get_rtcp_interval),
(rtp_session_produce_rtcp):
* gst/rtpmanager/rtpsession.h:
The advanced beginnings of the main session manager that handles the
participant database of RTPSources, SSRC probation, SSRC collisions,
parse RTCP to update source stats. etc..
* gst/rtpmanager/rtpsource.c: (rtp_source_class_init),
(rtp_source_init), (rtp_source_finalize), (rtp_source_new),
(rtp_source_set_callbacks), (rtp_source_set_as_csrc),
(rtp_source_set_rtp_from), (rtp_source_set_rtcp_from),
(push_packet), (get_clock_rate), (calculate_jitter),
(rtp_source_process_rtp), (rtp_source_process_bye),
(rtp_source_send_rtp), (rtp_source_process_sr),
(rtp_source_process_rb):
* gst/rtpmanager/rtpsource.h:
Object that encapsulates an SSRC and its state in the database.
Calculates the jitter and transit times of data packets.
* gst/rtpmanager/rtpstats.c: (rtp_stats_init_defaults),
(rtp_stats_calculate_rtcp_interval), (rtp_stats_add_rtcp_jitter):
* gst/rtpmanager/rtpstats.h:
Various stats regarding the session and sources.
Used to calculate the RTCP interval.
2007-04-18 18:58:53 +00:00
|
|
|
rtpbin = session->bin;
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "payload map requested for pt %u in session %u", pt,
|
2007-04-12 08:18:32 +00:00
|
|
|
session->id);
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
|
2007-04-12 08:18:32 +00:00
|
|
|
caps = get_pt_map (session, pt);
|
|
|
|
if (!caps)
|
|
|
|
goto no_caps;
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
no_caps:
|
|
|
|
{
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "could not get caps");
|
|
|
|
return NULL;
|
|
|
|
}
|
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
2007-04-11 13:49:54 +00:00
|
|
|
}
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
static GstCaps *
|
|
|
|
ptdemux_pt_map_requested (GstElement * element, guint pt,
|
|
|
|
GstRtpBinSession * session)
|
|
|
|
{
|
|
|
|
GstCaps *ret = pt_map_requested (element, pt, session);
|
|
|
|
|
|
|
|
if (ret && gst_caps_get_size (ret) == 1) {
|
|
|
|
const GstStructure *s = gst_caps_get_structure (ret, 0);
|
|
|
|
gboolean is_fec;
|
|
|
|
|
|
|
|
if (gst_structure_get_boolean (s, "is-fec", &is_fec) && is_fec) {
|
|
|
|
GValue v = G_VALUE_INIT;
|
|
|
|
GValue v2 = G_VALUE_INIT;
|
|
|
|
|
|
|
|
GST_INFO_OBJECT (session->bin, "Will ignore FEC pt %u in session %u", pt,
|
|
|
|
session->id);
|
|
|
|
g_value_init (&v, GST_TYPE_ARRAY);
|
|
|
|
g_value_init (&v2, G_TYPE_INT);
|
|
|
|
g_object_get_property (G_OBJECT (element), "ignored-payload-types", &v);
|
|
|
|
g_value_set_int (&v2, pt);
|
|
|
|
gst_value_array_append_value (&v, &v2);
|
|
|
|
g_value_unset (&v2);
|
|
|
|
g_object_set_property (G_OBJECT (element), "ignored-payload-types", &v);
|
|
|
|
g_value_unset (&v);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2009-09-08 11:59:56 +00:00
|
|
|
static void
|
|
|
|
payload_type_change (GstElement * element, guint pt, GstRtpBinSession * session)
|
|
|
|
{
|
|
|
|
GST_DEBUG_OBJECT (session->bin,
|
2019-09-02 12:27:35 +00:00
|
|
|
"emitting signal for pt type changed to %u in session %u", pt,
|
2009-09-08 11:59:56 +00:00
|
|
|
session->id);
|
|
|
|
|
|
|
|
g_signal_emit (session->bin, gst_rtp_bin_signals[SIGNAL_PAYLOAD_TYPE_CHANGE],
|
|
|
|
0, session->id, pt);
|
|
|
|
}
|
|
|
|
|
2018-05-23 12:14:27 +00:00
|
|
|
/* emitted when caps changed for the session */
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
static void
|
|
|
|
caps_changed (GstPad * pad, GParamSpec * pspec, GstRtpBinSession * session)
|
|
|
|
{
|
|
|
|
GstRtpBin *bin;
|
|
|
|
GstCaps *caps;
|
|
|
|
gint payload;
|
|
|
|
const GstStructure *s;
|
|
|
|
|
|
|
|
bin = session->bin;
|
|
|
|
|
|
|
|
g_object_get (pad, "caps", &caps, NULL);
|
|
|
|
|
|
|
|
if (caps == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bin, "got caps %" GST_PTR_FORMAT, caps);
|
|
|
|
|
|
|
|
s = gst_caps_get_structure (caps, 0);
|
|
|
|
|
|
|
|
/* get payload, finish when it's not there */
|
2014-06-29 21:55:19 +00:00
|
|
|
if (!gst_structure_get_int (s, "payload", &payload)) {
|
|
|
|
gst_caps_unref (caps);
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
return;
|
2014-06-29 21:55:19 +00:00
|
|
|
}
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
|
|
|
GST_RTP_SESSION_LOCK (session);
|
|
|
|
GST_DEBUG_OBJECT (bin, "insert caps for payload %d", payload);
|
|
|
|
g_hash_table_insert (session->ptmap, GINT_TO_POINTER (payload), caps);
|
|
|
|
GST_RTP_SESSION_UNLOCK (session);
|
|
|
|
}
|
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
/* a new pad (SSRC) was created in @session */
|
|
|
|
static void
|
|
|
|
new_ssrc_pad_found (GstElement * element, guint ssrc, GstPad * pad,
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBinSession * session)
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
{
|
2008-05-27 16:48:10 +00:00
|
|
|
GstRtpBin *rtpbin;
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBinStream *stream;
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
GstPad *sinkpad, *srcpad;
|
|
|
|
gchar *padname;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
2008-05-27 16:48:10 +00:00
|
|
|
rtpbin = session->bin;
|
|
|
|
|
2008-08-11 07:20:15 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "new SSRC pad %08x, %s:%s", ssrc,
|
|
|
|
GST_DEBUG_PAD_NAME (pad));
|
2008-05-27 16:48:10 +00:00
|
|
|
|
|
|
|
GST_RTP_BIN_SHUTDOWN_LOCK (rtpbin, shutdown);
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
GST_RTP_SESSION_LOCK (session);
|
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
/* create new stream */
|
|
|
|
stream = create_stream (session, ssrc);
|
|
|
|
if (!stream)
|
|
|
|
goto no_stream;
|
|
|
|
|
|
|
|
/* get pad and link */
|
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.
2008-11-19 09:06:29 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "linking jitterbuffer RTP");
|
2011-11-04 10:58:22 +00:00
|
|
|
padname = g_strdup_printf ("src_%u", ssrc);
|
2008-04-21 08:26:37 +00:00
|
|
|
srcpad = gst_element_get_static_pad (element, padname);
|
gst/rtpmanager/gstrtpbin.c: Link to the right pads regardless of which one 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-17 02:01:41 +00:00
|
|
|
g_free (padname);
|
2020-10-06 01:13:30 +00:00
|
|
|
|
2021-11-09 04:10:06 +00:00
|
|
|
if (session->early_fec_decoder) {
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "linking fec decoder");
|
|
|
|
sinkpad = gst_element_get_static_pad (session->early_fec_decoder, "sink");
|
2020-10-06 01:13:30 +00:00
|
|
|
gst_pad_link_full (srcpad, sinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
gst_object_unref (sinkpad);
|
|
|
|
gst_object_unref (srcpad);
|
2021-11-09 04:10:06 +00:00
|
|
|
srcpad = gst_element_get_static_pad (session->early_fec_decoder, "src");
|
2020-10-06 01:13:30 +00:00
|
|
|
}
|
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
sinkpad = gst_element_get_static_pad (stream->buffer, "sink");
|
2013-09-25 15:36:15 +00:00
|
|
|
gst_pad_link_full (srcpad, sinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
gst_object_unref (sinkpad);
|
2008-04-21 08:26:37 +00:00
|
|
|
gst_object_unref (srcpad);
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
2021-04-20 20:08:23 +00:00
|
|
|
sinkpad = gst_element_request_pad_simple (stream->buffer, "sink_rtcp");
|
2017-12-19 17:23:16 +00:00
|
|
|
if (sinkpad) {
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "linking jitterbuffer RTCP");
|
|
|
|
padname = g_strdup_printf ("rtcp_src_%u", ssrc);
|
|
|
|
srcpad = gst_element_get_static_pad (element, padname);
|
|
|
|
g_free (padname);
|
|
|
|
gst_pad_link_full (srcpad, sinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
gst_object_unref (sinkpad);
|
|
|
|
gst_object_unref (srcpad);
|
|
|
|
}
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
|
2017-12-19 17:23:16 +00:00
|
|
|
if (g_signal_lookup ("handle-sync", G_OBJECT_TYPE (stream->buffer)) != 0) {
|
|
|
|
/* connect to the RTCP sync signal from the jitterbuffer */
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "connecting sync signal");
|
|
|
|
stream->buffer_handlesync_sig = g_signal_connect (stream->buffer,
|
|
|
|
"handle-sync", (GCallback) gst_rtp_bin_handle_sync, stream);
|
|
|
|
}
|
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.
2008-11-19 09:06:29 +00:00
|
|
|
|
2009-09-08 15:37:15 +00:00
|
|
|
if (stream->demux) {
|
|
|
|
/* connect to the new-pad signal of the payload demuxer, this will expose the
|
|
|
|
* new pad by ghosting it. */
|
|
|
|
stream->demux_newpad_sig = g_signal_connect (stream->demux,
|
|
|
|
"new-payload-type", (GCallback) new_payload_found, stream);
|
|
|
|
stream->demux_padremoved_sig = g_signal_connect (stream->demux,
|
|
|
|
"pad-removed", (GCallback) payload_pad_removed, stream);
|
|
|
|
|
2018-05-23 12:14:27 +00:00
|
|
|
/* connect to the request-pt-map signal. This signal will be emitted by the
|
2009-09-08 15:37:15 +00:00
|
|
|
* demuxer so that it can apply a proper caps on the buffers for the
|
|
|
|
* depayloaders. */
|
|
|
|
stream->demux_ptreq_sig = g_signal_connect (stream->demux,
|
2017-11-28 05:02:05 +00:00
|
|
|
"request-pt-map", (GCallback) ptdemux_pt_map_requested, session);
|
2009-09-08 15:37:15 +00:00
|
|
|
/* connect to the signal so it can be forwarded. */
|
|
|
|
stream->demux_ptchange_sig = g_signal_connect (stream->demux,
|
|
|
|
"payload-type-change", (GCallback) payload_type_change, session);
|
2019-03-18 19:30:54 +00:00
|
|
|
|
|
|
|
GST_RTP_SESSION_UNLOCK (session);
|
|
|
|
GST_RTP_BIN_SHUTDOWN_UNLOCK (rtpbin);
|
2009-09-08 15:37:15 +00:00
|
|
|
} else {
|
2013-09-23 13:36:32 +00:00
|
|
|
/* add rtpjitterbuffer src pad to pads */
|
2019-03-18 19:30:54 +00:00
|
|
|
GstPad *pad;
|
2009-09-08 15:37:15 +00:00
|
|
|
|
|
|
|
pad = gst_element_get_static_pad (stream->buffer, "src");
|
|
|
|
|
2019-03-18 19:30:54 +00:00
|
|
|
GST_RTP_SESSION_UNLOCK (session);
|
|
|
|
GST_RTP_BIN_SHUTDOWN_UNLOCK (rtpbin);
|
2009-09-08 15:37:15 +00:00
|
|
|
|
2019-03-18 19:30:54 +00:00
|
|
|
expose_recv_src_pad (rtpbin, pad, stream, 255);
|
2009-09-08 15:37:15 +00:00
|
|
|
|
|
|
|
gst_object_unref (pad);
|
|
|
|
}
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* ERRORS */
|
2008-05-27 16:48:10 +00:00
|
|
|
shutdown:
|
|
|
|
{
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "we are shutting down");
|
|
|
|
return;
|
|
|
|
}
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
no_stream:
|
|
|
|
{
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
GST_RTP_SESSION_UNLOCK (session);
|
2008-05-27 16:48:10 +00:00
|
|
|
GST_RTP_BIN_SHUTDOWN_UNLOCK (rtpbin);
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "could not create stream");
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
static GstPad *
|
2018-12-19 13:28:54 +00:00
|
|
|
complete_session_sink (GstRtpBin * rtpbin, GstRtpBinSession * session)
|
2007-04-03 11:35:39 +00:00
|
|
|
{
|
2013-12-31 11:31:25 +00:00
|
|
|
guint sessid = session->id;
|
|
|
|
GstPad *recv_rtp_sink;
|
2013-12-05 23:53:52 +00:00
|
|
|
GstElement *decoder;
|
2016-11-16 07:56:34 +00:00
|
|
|
|
|
|
|
g_assert (!session->recv_rtp_sink);
|
2007-04-03 11:35:39 +00:00
|
|
|
|
|
|
|
/* get recv_rtp pad and store */
|
|
|
|
session->recv_rtp_sink =
|
2021-04-20 20:08:23 +00:00
|
|
|
gst_element_request_pad_simple (session->session, "recv_rtp_sink");
|
2007-04-03 11:35:39 +00:00
|
|
|
if (session->recv_rtp_sink == NULL)
|
|
|
|
goto pad_failed;
|
|
|
|
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
g_signal_connect (session->recv_rtp_sink, "notify::caps",
|
|
|
|
(GCallback) caps_changed, session);
|
|
|
|
|
2013-12-05 23:53:52 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "requesting RTP decoder");
|
2013-12-30 16:36:42 +00:00
|
|
|
decoder = session_request_element (session, SIGNAL_REQUEST_RTP_DECODER);
|
2013-12-05 23:53:52 +00:00
|
|
|
if (decoder) {
|
2013-12-31 11:31:25 +00:00
|
|
|
GstPad *decsrc, *decsink;
|
2013-12-05 23:53:52 +00:00
|
|
|
GstPadLinkReturn ret;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "linking RTP decoder");
|
|
|
|
decsink = gst_element_get_static_pad (decoder, "rtp_sink");
|
|
|
|
if (decsink == NULL)
|
|
|
|
goto dec_sink_failed;
|
|
|
|
|
2013-12-31 11:31:25 +00:00
|
|
|
recv_rtp_sink = decsink;
|
|
|
|
|
|
|
|
decsrc = gst_element_get_static_pad (decoder, "rtp_src");
|
2013-12-05 23:53:52 +00:00
|
|
|
if (decsrc == NULL)
|
|
|
|
goto dec_src_failed;
|
|
|
|
|
2018-12-19 13:28:54 +00:00
|
|
|
ret = gst_pad_link (decsrc, session->recv_rtp_sink);
|
|
|
|
|
2013-12-05 23:53:52 +00:00
|
|
|
gst_object_unref (decsrc);
|
|
|
|
|
|
|
|
if (ret != GST_PAD_LINK_OK)
|
|
|
|
goto dec_link_failed;
|
2013-12-31 11:31:25 +00:00
|
|
|
|
2013-12-05 23:53:52 +00:00
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "no RTP decoder given");
|
2018-12-19 13:28:54 +00:00
|
|
|
recv_rtp_sink = gst_object_ref (session->recv_rtp_sink);
|
2013-12-05 23:53:52 +00:00
|
|
|
}
|
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
return recv_rtp_sink;
|
2013-12-31 11:31:25 +00:00
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
pad_failed:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to get session recv_rtp_sink pad");
|
2016-11-16 07:56:34 +00:00
|
|
|
return NULL;
|
2013-12-31 11:31:25 +00:00
|
|
|
}
|
|
|
|
dec_sink_failed:
|
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to get decoder sink pad for session %u", sessid);
|
|
|
|
return NULL;
|
2013-12-31 11:31:25 +00:00
|
|
|
}
|
|
|
|
dec_src_failed:
|
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to get decoder src pad for session %u", sessid);
|
2013-12-31 11:31:25 +00:00
|
|
|
gst_object_unref (recv_rtp_sink);
|
2016-11-16 07:56:34 +00:00
|
|
|
return NULL;
|
2013-12-31 11:31:25 +00:00
|
|
|
}
|
|
|
|
dec_link_failed:
|
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to link rtp decoder for session %u", sessid);
|
2013-12-31 11:31:25 +00:00
|
|
|
gst_object_unref (recv_rtp_sink);
|
2016-11-16 07:56:34 +00:00
|
|
|
return NULL;
|
2013-12-31 11:31:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
static void
|
|
|
|
complete_session_receiver (GstRtpBin * rtpbin, GstRtpBinSession * session,
|
|
|
|
guint sessid)
|
2013-12-31 11:31:25 +00:00
|
|
|
{
|
|
|
|
GstElement *aux;
|
|
|
|
GstPad *recv_rtp_src;
|
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
g_assert (!session->recv_rtp_src);
|
2013-12-31 11:31:25 +00:00
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
session->recv_rtp_src =
|
|
|
|
gst_element_get_static_pad (session->session, "recv_rtp_src");
|
|
|
|
if (session->recv_rtp_src == NULL)
|
2013-12-31 11:31:25 +00:00
|
|
|
goto pad_failed;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
/* find out if we need AUX elements */
|
2013-12-31 11:31:25 +00:00
|
|
|
aux = session_request_element (session, SIGNAL_REQUEST_AUX_RECEIVER);
|
|
|
|
if (aux) {
|
|
|
|
gchar *pname;
|
|
|
|
GstPad *auxsink;
|
|
|
|
GstPadLinkReturn ret;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
2013-12-31 11:31:25 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "linking AUX receiver");
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
pname = g_strdup_printf ("sink_%u", sessid);
|
2013-12-31 11:31:25 +00:00
|
|
|
auxsink = gst_element_get_static_pad (aux, pname);
|
|
|
|
g_free (pname);
|
|
|
|
if (auxsink == NULL)
|
|
|
|
goto aux_sink_failed;
|
|
|
|
|
|
|
|
ret = gst_pad_link (session->recv_rtp_src, auxsink);
|
|
|
|
gst_object_unref (auxsink);
|
|
|
|
if (ret != GST_PAD_LINK_OK)
|
|
|
|
goto aux_link_failed;
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
/* this can be NULL when this AUX element is not to be linked any further */
|
2016-11-16 07:56:34 +00:00
|
|
|
pname = g_strdup_printf ("src_%u", sessid);
|
2013-12-31 11:31:25 +00:00
|
|
|
recv_rtp_src = gst_element_get_static_pad (aux, pname);
|
|
|
|
g_free (pname);
|
|
|
|
} else {
|
|
|
|
recv_rtp_src = gst_object_ref (session->recv_rtp_src);
|
|
|
|
}
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
/* Add a storage element if needed */
|
|
|
|
if (recv_rtp_src && session->storage) {
|
|
|
|
GstPadLinkReturn ret;
|
|
|
|
GstPad *sinkpad = gst_element_get_static_pad (session->storage, "sink");
|
|
|
|
|
|
|
|
ret = gst_pad_link (recv_rtp_src, sinkpad);
|
|
|
|
|
|
|
|
gst_object_unref (sinkpad);
|
|
|
|
gst_object_unref (recv_rtp_src);
|
|
|
|
|
|
|
|
if (ret != GST_PAD_LINK_OK)
|
|
|
|
goto storage_link_failed;
|
|
|
|
|
|
|
|
recv_rtp_src = gst_element_get_static_pad (session->storage, "src");
|
|
|
|
}
|
|
|
|
|
2013-12-31 11:31:25 +00:00
|
|
|
if (recv_rtp_src) {
|
|
|
|
GstPad *sinkdpad;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "getting demuxer RTP sink pad");
|
|
|
|
sinkdpad = gst_element_get_static_pad (session->demux, "sink");
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "linking demuxer RTP sink pad");
|
|
|
|
gst_pad_link_full (recv_rtp_src, sinkdpad, GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
gst_object_unref (sinkdpad);
|
2016-11-16 07:56:34 +00:00
|
|
|
gst_object_unref (recv_rtp_src);
|
2007-04-03 11:35:39 +00:00
|
|
|
|
2013-12-31 11:31:25 +00:00
|
|
|
/* connect to the new-ssrc-pad signal of the SSRC demuxer */
|
|
|
|
session->demux_newpad_sig = g_signal_connect (session->demux,
|
|
|
|
"new-ssrc-pad", (GCallback) new_ssrc_pad_found, session);
|
|
|
|
session->demux_padremoved_sig = g_signal_connect (session->demux,
|
|
|
|
"removed-ssrc-pad", (GCallback) ssrc_demux_pad_removed, session);
|
|
|
|
}
|
2016-11-16 07:56:34 +00:00
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
pad_failed:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to get session recv_rtp_src pad");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
aux_sink_failed:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to get AUX sink pad for session %u", sessid);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
aux_link_failed:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to link AUX pad to session %u", sessid);
|
|
|
|
return;
|
|
|
|
}
|
2017-11-28 05:02:05 +00:00
|
|
|
storage_link_failed:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to link storage");
|
|
|
|
return;
|
|
|
|
}
|
2016-11-16 07:56:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Create a pad for receiving RTP for the session in @name. Must be called with
|
|
|
|
* RTP_BIN_LOCK.
|
|
|
|
*/
|
|
|
|
static GstPad *
|
|
|
|
create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
|
|
|
|
{
|
|
|
|
guint sessid;
|
|
|
|
GstRtpBinSession *session;
|
|
|
|
GstPad *recv_rtp_sink;
|
|
|
|
|
|
|
|
/* first get the session number */
|
|
|
|
if (name == NULL || sscanf (name, "recv_rtp_sink_%u", &sessid) != 1)
|
|
|
|
goto no_name;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "finding session %u", sessid);
|
|
|
|
|
|
|
|
/* get or create session */
|
|
|
|
session = find_session_by_id (rtpbin, sessid);
|
|
|
|
if (!session) {
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "creating session %u", sessid);
|
|
|
|
/* create session now */
|
|
|
|
session = create_session (rtpbin, sessid);
|
|
|
|
if (session == NULL)
|
|
|
|
goto create_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* check if pad was requested */
|
|
|
|
if (session->recv_rtp_sink_ghost != NULL)
|
|
|
|
return session->recv_rtp_sink_ghost;
|
|
|
|
|
|
|
|
/* setup the session sink pad */
|
2018-12-19 13:28:54 +00:00
|
|
|
recv_rtp_sink = complete_session_sink (rtpbin, session);
|
2016-11-16 07:56:34 +00:00
|
|
|
if (!recv_rtp_sink)
|
|
|
|
goto session_sink_failed;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "ghosting session sink pad");
|
|
|
|
session->recv_rtp_sink_ghost =
|
|
|
|
gst_ghost_pad_new_from_template (name, recv_rtp_sink, templ);
|
|
|
|
gst_object_unref (recv_rtp_sink);
|
|
|
|
|
|
|
|
complete_session_receiver (rtpbin, session, sessid);
|
|
|
|
|
2009-05-22 13:36:17 +00:00
|
|
|
return session->recv_rtp_sink_ghost;
|
2007-04-03 11:35:39 +00:00
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
no_name:
|
|
|
|
{
|
2020-03-31 19:51:27 +00:00
|
|
|
g_warning ("rtpbin: cannot find session id for pad: %s",
|
|
|
|
GST_STR_NULL (name));
|
2007-04-03 11:35:39 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
create_error:
|
|
|
|
{
|
|
|
|
/* create_session already warned */
|
|
|
|
return NULL;
|
|
|
|
}
|
2013-12-31 11:31:25 +00:00
|
|
|
session_sink_failed:
|
2013-12-05 23:53:52 +00:00
|
|
|
{
|
2013-12-31 11:31:25 +00:00
|
|
|
/* warning already done */
|
2013-12-05 23:53:52 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2007-04-03 11:35:39 +00:00
|
|
|
}
|
|
|
|
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
static void
|
2009-05-22 13:45:19 +00:00
|
|
|
remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session)
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
{
|
2009-05-21 22:51:53 +00:00
|
|
|
if (session->demux_newpad_sig) {
|
|
|
|
g_signal_handler_disconnect (session->demux, session->demux_newpad_sig);
|
|
|
|
session->demux_newpad_sig = 0;
|
|
|
|
}
|
2009-05-21 23:43:50 +00:00
|
|
|
if (session->demux_padremoved_sig) {
|
|
|
|
g_signal_handler_disconnect (session->demux, session->demux_padremoved_sig);
|
|
|
|
session->demux_padremoved_sig = 0;
|
|
|
|
}
|
2009-05-21 22:51:53 +00:00
|
|
|
if (session->recv_rtp_src) {
|
|
|
|
gst_object_unref (session->recv_rtp_src);
|
|
|
|
session->recv_rtp_src = NULL;
|
|
|
|
}
|
|
|
|
if (session->recv_rtp_sink) {
|
|
|
|
gst_element_release_request_pad (session->session, session->recv_rtp_sink);
|
2009-05-22 09:59:17 +00:00
|
|
|
gst_object_unref (session->recv_rtp_sink);
|
2009-05-21 22:51:53 +00:00
|
|
|
session->recv_rtp_sink = NULL;
|
|
|
|
}
|
2009-05-22 13:45:19 +00:00
|
|
|
if (session->recv_rtp_sink_ghost) {
|
|
|
|
gst_pad_set_active (session->recv_rtp_sink_ghost, FALSE);
|
|
|
|
gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin),
|
|
|
|
session->recv_rtp_sink_ghost);
|
|
|
|
session->recv_rtp_sink_ghost = NULL;
|
|
|
|
}
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
}
|
|
|
|
|
2022-03-04 17:58:56 +00:00
|
|
|
static gint
|
|
|
|
fec_sinkpad_find (const GValue * item, gchar * padname)
|
|
|
|
{
|
|
|
|
GstPad *pad = g_value_get_object (item);
|
|
|
|
return g_strcmp0 (GST_PAD_NAME (pad), padname);
|
|
|
|
}
|
|
|
|
|
2020-10-06 01:13:30 +00:00
|
|
|
static GstPad *
|
|
|
|
complete_session_fec (GstRtpBin * rtpbin, GstRtpBinSession * session,
|
|
|
|
guint fec_idx)
|
|
|
|
{
|
2022-03-04 17:58:56 +00:00
|
|
|
gboolean have_static_pad;
|
2020-10-06 01:13:30 +00:00
|
|
|
gchar *padname;
|
2022-03-04 17:58:56 +00:00
|
|
|
|
2020-10-06 01:13:30 +00:00
|
|
|
GstPad *ret;
|
2022-03-04 17:58:56 +00:00
|
|
|
GstIterator *it;
|
|
|
|
GValue item = { 0, };
|
2020-10-06 01:13:30 +00:00
|
|
|
|
2021-11-09 04:10:06 +00:00
|
|
|
if (!ensure_early_fec_decoder (rtpbin, session))
|
2020-10-06 01:13:30 +00:00
|
|
|
goto no_decoder;
|
|
|
|
|
|
|
|
padname = g_strdup_printf ("fec_%u", fec_idx);
|
2022-03-04 17:58:56 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "getting FEC sink pad %s", padname);
|
|
|
|
|
|
|
|
/* First try to find the decoder static pad that matches the padname */
|
|
|
|
it = gst_element_iterate_sink_pads (session->early_fec_decoder);
|
|
|
|
have_static_pad =
|
|
|
|
gst_iterator_find_custom (it, (GCompareFunc) fec_sinkpad_find, &item,
|
|
|
|
padname);
|
|
|
|
|
|
|
|
if (have_static_pad) {
|
|
|
|
ret = g_value_get_object (&item);
|
|
|
|
gst_object_ref (ret);
|
|
|
|
g_value_unset (&item);
|
|
|
|
} else {
|
|
|
|
ret = gst_element_request_pad_simple (session->early_fec_decoder, padname);
|
|
|
|
}
|
|
|
|
|
2020-10-06 01:13:30 +00:00
|
|
|
g_free (padname);
|
2022-03-04 17:58:56 +00:00
|
|
|
gst_iterator_free (it);
|
2020-10-06 01:13:30 +00:00
|
|
|
|
|
|
|
if (ret == NULL)
|
|
|
|
goto pad_failed;
|
|
|
|
|
|
|
|
session->recv_fec_sinks = g_slist_prepend (session->recv_fec_sinks, ret);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
pad_failed:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to get decoder fec pad");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
no_decoder:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to build FEC decoder for session %u",
|
|
|
|
session->id);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-04-03 11:35:39 +00:00
|
|
|
static GstPad *
|
2016-11-16 07:56:34 +00:00
|
|
|
complete_session_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session,
|
2018-12-19 13:28:54 +00:00
|
|
|
guint sessid)
|
2007-04-03 11:35:39 +00:00
|
|
|
{
|
2013-12-05 23:53:52 +00:00
|
|
|
GstElement *decoder;
|
2016-11-16 07:56:34 +00:00
|
|
|
GstPad *sinkdpad;
|
|
|
|
GstPad *decsink = NULL;
|
2007-04-03 11:35:39 +00:00
|
|
|
|
|
|
|
/* get recv_rtp pad and store */
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "getting RTCP sink pad");
|
2007-04-03 11:35:39 +00:00
|
|
|
session->recv_rtcp_sink =
|
2021-04-20 20:08:23 +00:00
|
|
|
gst_element_request_pad_simple (session->session, "recv_rtcp_sink");
|
2007-04-03 11:35:39 +00:00
|
|
|
if (session->recv_rtcp_sink == NULL)
|
|
|
|
goto pad_failed;
|
|
|
|
|
2013-12-05 23:53:52 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "getting RTCP decoder");
|
2013-12-30 16:36:42 +00:00
|
|
|
decoder = session_request_element (session, SIGNAL_REQUEST_RTCP_DECODER);
|
2013-12-05 23:53:52 +00:00
|
|
|
if (decoder) {
|
|
|
|
GstPad *decsrc;
|
|
|
|
GstPadLinkReturn ret;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "linking RTCP decoder");
|
|
|
|
decsink = gst_element_get_static_pad (decoder, "rtcp_sink");
|
|
|
|
decsrc = gst_element_get_static_pad (decoder, "rtcp_src");
|
|
|
|
|
|
|
|
if (decsink == NULL)
|
|
|
|
goto dec_sink_failed;
|
|
|
|
|
|
|
|
if (decsrc == NULL)
|
|
|
|
goto dec_src_failed;
|
|
|
|
|
2018-12-19 13:28:54 +00:00
|
|
|
ret = gst_pad_link (decsrc, session->recv_rtcp_sink);
|
|
|
|
|
2013-12-05 23:53:52 +00:00
|
|
|
gst_object_unref (decsrc);
|
|
|
|
|
|
|
|
if (ret != GST_PAD_LINK_OK)
|
|
|
|
goto dec_link_failed;
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "no RTCP decoder given");
|
2018-12-19 13:28:54 +00:00
|
|
|
decsink = gst_object_ref (session->recv_rtcp_sink);
|
2013-12-05 23:53:52 +00:00
|
|
|
}
|
|
|
|
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
/* get srcpad, link to SSRCDemux */
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "getting sync src pad");
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
session->sync_src = gst_element_get_static_pad (session->session, "sync_src");
|
|
|
|
if (session->sync_src == NULL)
|
2013-12-30 14:15:43 +00:00
|
|
|
goto src_pad_failed;
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
|
gst/rtpmanager/: Updated example pipelines in docs.
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-09-03 21:19:34 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "getting demuxer RTCP sink pad");
|
|
|
|
sinkdpad = gst_element_get_static_pad (session->demux, "rtcp_sink");
|
2013-09-25 15:36:15 +00:00
|
|
|
gst_pad_link_full (session->sync_src, sinkdpad, GST_PAD_LINK_CHECK_NOTHING);
|
gst/rtpmanager/gstrtpbin.*: Add debugging category.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (find_session_by_id),
(create_session), (find_stream_by_ssrc), (create_stream),
(gst_rtp_bin_class_init), (new_payload_found),
(new_ssrc_pad_found), (create_recv_rtp), (create_recv_rtcp),
(create_send_rtp), (create_rtcp):
* gst/rtpmanager/gstrtpbin.h:
Add debugging category.
Added RTPStream to manage stream per SSRC, each with its own
jitterbuffer and ptdemux.
Added SSRCDemux.
Connect to various SSRC and PT signals and create ghostpads, link stuff.
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
Added rtpbin to elements.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
Fix caps and forward GstFlowReturn
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(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_rtcp_src),
(gst_rtp_session_request_new_pad):
Add debug category.
Add event handling
* gst/rtpmanager/gstrtpssrcdemux.c: (find_rtp_pad_for_ssrc),
(create_rtp_pad_for_ssrc), (gst_rtp_ssrc_demux_class_init),
(gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_chain),
(gst_rtp_ssrc_demux_change_state):
* gst/rtpmanager/gstrtpssrcdemux.h:
Add debug category.
Add new-pt-pad signal.
2007-04-05 13:54:23 +00:00
|
|
|
gst_object_unref (sinkdpad);
|
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
return decsink;
|
2007-04-03 11:35:39 +00:00
|
|
|
|
|
|
|
pad_failed:
|
|
|
|
{
|
2013-12-30 14:15:43 +00:00
|
|
|
g_warning ("rtpbin: failed to get session rtcp_sink pad");
|
2007-04-03 11:35:39 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2013-12-05 23:53:52 +00:00
|
|
|
dec_sink_failed:
|
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to get decoder sink pad for session %u", sessid);
|
2013-12-05 23:53:52 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
dec_src_failed:
|
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to get decoder src pad for session %u", sessid);
|
|
|
|
goto cleanup;
|
2013-12-05 23:53:52 +00:00
|
|
|
}
|
|
|
|
dec_link_failed:
|
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to link rtcp decoder for session %u", sessid);
|
|
|
|
goto cleanup;
|
2013-12-30 14:15:43 +00:00
|
|
|
}
|
|
|
|
src_pad_failed:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to get session sync_src pad");
|
2016-11-16 07:56:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
cleanup:
|
|
|
|
gst_object_unref (decsink);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Create a pad for receiving RTCP for the session in @name. Must be called with
|
|
|
|
* RTP_BIN_LOCK.
|
|
|
|
*/
|
|
|
|
static GstPad *
|
|
|
|
create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ,
|
|
|
|
const gchar * name)
|
|
|
|
{
|
|
|
|
guint sessid;
|
|
|
|
GstRtpBinSession *session;
|
|
|
|
GstPad *decsink = NULL;
|
|
|
|
|
|
|
|
/* first get the session number */
|
|
|
|
if (name == NULL || sscanf (name, "recv_rtcp_sink_%u", &sessid) != 1)
|
|
|
|
goto no_name;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "finding session %u", sessid);
|
|
|
|
|
|
|
|
/* get or create the session */
|
|
|
|
session = find_session_by_id (rtpbin, sessid);
|
|
|
|
if (!session) {
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "creating session %u", sessid);
|
|
|
|
/* create session now */
|
|
|
|
session = create_session (rtpbin, sessid);
|
|
|
|
if (session == NULL)
|
|
|
|
goto create_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* check if pad was requested */
|
|
|
|
if (session->recv_rtcp_sink_ghost != NULL)
|
|
|
|
return session->recv_rtcp_sink_ghost;
|
|
|
|
|
2018-12-19 13:28:54 +00:00
|
|
|
decsink = complete_session_rtcp (rtpbin, session, sessid);
|
2016-11-16 07:56:34 +00:00
|
|
|
if (!decsink)
|
|
|
|
goto create_error;
|
|
|
|
|
|
|
|
session->recv_rtcp_sink_ghost =
|
|
|
|
gst_ghost_pad_new_from_template (name, decsink, templ);
|
|
|
|
gst_object_unref (decsink);
|
|
|
|
|
|
|
|
return session->recv_rtcp_sink_ghost;
|
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
no_name:
|
|
|
|
{
|
2020-03-31 19:51:27 +00:00
|
|
|
g_warning ("rtpbin: cannot find session id for pad: %s",
|
|
|
|
GST_STR_NULL (name));
|
2016-11-16 07:56:34 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
create_error:
|
|
|
|
{
|
|
|
|
/* create_session already warned */
|
2013-12-05 23:53:52 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2007-04-03 11:35:39 +00:00
|
|
|
}
|
|
|
|
|
2020-10-06 01:13:30 +00:00
|
|
|
static GstPad *
|
|
|
|
create_recv_fec (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
|
|
|
|
{
|
|
|
|
guint sessid, fec_idx;
|
|
|
|
GstRtpBinSession *session;
|
|
|
|
GstPad *decsink = NULL;
|
|
|
|
GstPad *ghost;
|
|
|
|
|
|
|
|
/* first get the session number */
|
|
|
|
if (name == NULL
|
|
|
|
|| sscanf (name, "recv_fec_sink_%u_%u", &sessid, &fec_idx) != 2)
|
|
|
|
goto no_name;
|
|
|
|
|
|
|
|
if (fec_idx > 1)
|
|
|
|
goto invalid_idx;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "finding session %u", sessid);
|
|
|
|
|
|
|
|
/* get or create the session */
|
|
|
|
session = find_session_by_id (rtpbin, sessid);
|
|
|
|
if (!session) {
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "creating session %u", sessid);
|
|
|
|
/* create session now */
|
|
|
|
session = create_session (rtpbin, sessid);
|
|
|
|
if (session == NULL)
|
|
|
|
goto create_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
decsink = complete_session_fec (rtpbin, session, fec_idx);
|
|
|
|
if (!decsink)
|
|
|
|
goto create_error;
|
|
|
|
|
|
|
|
ghost = gst_ghost_pad_new_from_template (name, decsink, templ);
|
|
|
|
session->recv_fec_sink_ghosts =
|
|
|
|
g_slist_prepend (session->recv_fec_sink_ghosts, ghost);
|
|
|
|
gst_object_unref (decsink);
|
|
|
|
|
|
|
|
return ghost;
|
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
no_name:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: cannot find session id for pad: %s",
|
|
|
|
GST_STR_NULL (name));
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
invalid_idx:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: invalid FEC index: %s", GST_STR_NULL (name));
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
create_error:
|
|
|
|
{
|
|
|
|
/* create_session already warned */
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
static void
|
2009-05-22 13:45:19 +00:00
|
|
|
remove_recv_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session)
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
{
|
2009-05-22 13:45:19 +00:00
|
|
|
if (session->recv_rtcp_sink_ghost) {
|
|
|
|
gst_pad_set_active (session->recv_rtcp_sink_ghost, FALSE);
|
|
|
|
gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin),
|
|
|
|
session->recv_rtcp_sink_ghost);
|
|
|
|
session->recv_rtcp_sink_ghost = NULL;
|
|
|
|
}
|
2009-05-21 22:34:36 +00:00
|
|
|
if (session->sync_src) {
|
|
|
|
/* releasing the request pad should also unref the sync pad */
|
|
|
|
gst_object_unref (session->sync_src);
|
|
|
|
session->sync_src = NULL;
|
|
|
|
}
|
|
|
|
if (session->recv_rtcp_sink) {
|
|
|
|
gst_element_release_request_pad (session->session, session->recv_rtcp_sink);
|
2009-05-22 09:59:17 +00:00
|
|
|
gst_object_unref (session->recv_rtcp_sink);
|
2009-05-21 22:34:36 +00:00
|
|
|
session->recv_rtcp_sink = NULL;
|
|
|
|
}
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
}
|
|
|
|
|
2020-10-06 01:13:30 +00:00
|
|
|
static void
|
|
|
|
remove_recv_fec_for_pad (GstRtpBin * rtpbin, GstRtpBinSession * session,
|
|
|
|
GstPad * ghost)
|
|
|
|
{
|
|
|
|
GSList *item;
|
|
|
|
GstPad *target;
|
|
|
|
|
|
|
|
target = gst_ghost_pad_get_target (GST_GHOST_PAD (ghost));
|
|
|
|
|
|
|
|
if (target) {
|
|
|
|
item = g_slist_find (session->recv_fec_sinks, target);
|
|
|
|
if (item) {
|
2022-03-04 17:58:56 +00:00
|
|
|
GstPadTemplate *templ;
|
|
|
|
GstPad *pad;
|
|
|
|
|
|
|
|
pad = item->data;
|
|
|
|
templ = gst_pad_get_pad_template (pad);
|
|
|
|
|
|
|
|
if (GST_PAD_TEMPLATE_PRESENCE (templ) == GST_PAD_REQUEST) {
|
|
|
|
GST_DEBUG_OBJECT (rtpbin,
|
|
|
|
"Releasing FEC decoder pad %" GST_PTR_FORMAT, pad);
|
|
|
|
gst_element_release_request_pad (session->early_fec_decoder, pad);
|
|
|
|
} else {
|
|
|
|
gst_object_unref (pad);
|
|
|
|
}
|
|
|
|
|
2020-10-06 01:13:30 +00:00
|
|
|
session->recv_fec_sinks =
|
|
|
|
g_slist_delete_link (session->recv_fec_sinks, item);
|
2022-03-04 17:58:56 +00:00
|
|
|
|
|
|
|
gst_object_unref (templ);
|
2020-10-06 01:13:30 +00:00
|
|
|
}
|
|
|
|
gst_object_unref (target);
|
|
|
|
}
|
|
|
|
|
|
|
|
item = g_slist_find (session->recv_fec_sink_ghosts, ghost);
|
|
|
|
if (item)
|
|
|
|
session->recv_fec_sink_ghosts =
|
|
|
|
g_slist_delete_link (session->recv_fec_sink_ghosts, item);
|
|
|
|
|
|
|
|
gst_pad_set_active (ghost, FALSE);
|
|
|
|
gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), ghost);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
remove_recv_fec (GstRtpBin * rtpbin, GstRtpBinSession * session)
|
|
|
|
{
|
|
|
|
GSList *copy;
|
|
|
|
GSList *tmp;
|
|
|
|
|
|
|
|
copy = g_slist_copy (session->recv_fec_sink_ghosts);
|
|
|
|
|
|
|
|
for (tmp = copy; tmp; tmp = tmp->next) {
|
|
|
|
remove_recv_fec_for_pad (rtpbin, session, (GstPad *) tmp->data);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_slist_free (copy);
|
|
|
|
}
|
|
|
|
|
2013-12-31 11:31:25 +00:00
|
|
|
static gboolean
|
|
|
|
complete_session_src (GstRtpBin * rtpbin, GstRtpBinSession * session)
|
2007-04-03 11:35:39 +00:00
|
|
|
{
|
|
|
|
gchar *gname;
|
2013-12-31 11:31:25 +00:00
|
|
|
guint sessid = session->id;
|
|
|
|
GstPad *send_rtp_src;
|
2013-12-05 23:53:52 +00:00
|
|
|
GstElement *encoder;
|
2007-04-03 11:35:39 +00:00
|
|
|
GstElementClass *klass;
|
2013-12-31 11:31:25 +00:00
|
|
|
GstPadTemplate *templ;
|
2017-11-28 05:02:05 +00:00
|
|
|
gboolean ret = FALSE;
|
2007-04-03 11:35:39 +00:00
|
|
|
|
|
|
|
/* get srcpad */
|
2017-11-28 05:02:05 +00:00
|
|
|
send_rtp_src = gst_element_get_static_pad (session->session, "send_rtp_src");
|
|
|
|
|
|
|
|
if (send_rtp_src == NULL)
|
2007-04-03 11:35:39 +00:00
|
|
|
goto no_srcpad;
|
|
|
|
|
2013-12-05 23:53:52 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "getting RTP encoder");
|
2013-12-30 16:36:42 +00:00
|
|
|
encoder = session_request_element (session, SIGNAL_REQUEST_RTP_ENCODER);
|
2013-12-05 23:53:52 +00:00
|
|
|
if (encoder) {
|
|
|
|
gchar *ename;
|
2013-12-31 11:31:25 +00:00
|
|
|
GstPad *encsrc, *encsink;
|
2013-12-05 23:53:52 +00:00
|
|
|
GstPadLinkReturn ret;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "linking RTP encoder");
|
2016-11-16 07:56:34 +00:00
|
|
|
ename = g_strdup_printf ("rtp_src_%u", sessid);
|
2013-12-05 23:53:52 +00:00
|
|
|
encsrc = gst_element_get_static_pad (encoder, ename);
|
|
|
|
g_free (ename);
|
|
|
|
|
|
|
|
if (encsrc == NULL)
|
|
|
|
goto enc_src_failed;
|
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
ename = g_strdup_printf ("rtp_sink_%u", sessid);
|
2013-12-31 11:31:25 +00:00
|
|
|
encsink = gst_element_get_static_pad (encoder, ename);
|
|
|
|
g_free (ename);
|
2013-12-30 14:15:43 +00:00
|
|
|
if (encsink == NULL)
|
|
|
|
goto enc_sink_failed;
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
ret = gst_pad_link (send_rtp_src, encsink);
|
2013-12-05 23:53:52 +00:00
|
|
|
gst_object_unref (encsink);
|
2017-11-28 05:02:05 +00:00
|
|
|
gst_object_unref (send_rtp_src);
|
|
|
|
|
|
|
|
send_rtp_src = encsrc;
|
2013-12-05 23:53:52 +00:00
|
|
|
|
|
|
|
if (ret != GST_PAD_LINK_OK)
|
|
|
|
goto enc_link_failed;
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "no RTP encoder given");
|
|
|
|
}
|
|
|
|
|
2007-04-03 11:35:39 +00:00
|
|
|
/* ghost the new source pad */
|
|
|
|
klass = GST_ELEMENT_GET_CLASS (rtpbin);
|
2011-11-04 10:58:22 +00:00
|
|
|
gname = g_strdup_printf ("send_rtp_src_%u", sessid);
|
|
|
|
templ = gst_element_class_get_pad_template (klass, "send_rtp_src_%u");
|
2009-05-21 22:44:51 +00:00
|
|
|
session->send_rtp_src_ghost =
|
2013-12-31 11:31:25 +00:00
|
|
|
gst_ghost_pad_new_from_template (gname, send_rtp_src, templ);
|
2009-05-21 22:44:51 +00:00
|
|
|
gst_pad_set_active (session->send_rtp_src_ghost, TRUE);
|
2014-03-29 13:20:30 +00:00
|
|
|
gst_pad_sticky_events_foreach (send_rtp_src, copy_sticky_events,
|
|
|
|
session->send_rtp_src_ghost);
|
2009-05-21 22:44:51 +00:00
|
|
|
gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), session->send_rtp_src_ghost);
|
2007-04-03 11:35:39 +00:00
|
|
|
g_free (gname);
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
ret = TRUE;
|
|
|
|
|
|
|
|
done:
|
|
|
|
if (send_rtp_src)
|
|
|
|
gst_object_unref (send_rtp_src);
|
|
|
|
|
|
|
|
return ret;
|
2013-12-31 11:31:25 +00:00
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
no_srcpad:
|
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to get rtp source pad for session %u", sessid);
|
2017-11-28 05:02:05 +00:00
|
|
|
goto done;
|
2013-12-31 11:31:25 +00:00
|
|
|
}
|
|
|
|
enc_src_failed:
|
|
|
|
{
|
2017-11-28 05:02:05 +00:00
|
|
|
g_warning ("rtpbin: failed to get %" GST_PTR_FORMAT
|
|
|
|
" src pad for session %u", encoder, sessid);
|
|
|
|
goto done;
|
2013-12-31 11:31:25 +00:00
|
|
|
}
|
|
|
|
enc_sink_failed:
|
|
|
|
{
|
2017-11-28 05:02:05 +00:00
|
|
|
g_warning ("rtpbin: failed to get %" GST_PTR_FORMAT
|
|
|
|
" sink pad for session %u", encoder, sessid);
|
|
|
|
goto done;
|
2013-12-31 11:31:25 +00:00
|
|
|
}
|
|
|
|
enc_link_failed:
|
|
|
|
{
|
2017-11-28 05:02:05 +00:00
|
|
|
g_warning ("rtpbin: failed to link %" GST_PTR_FORMAT " for session %u",
|
|
|
|
encoder, sessid);
|
|
|
|
goto done;
|
2013-12-31 11:31:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
setup_aux_sender_fold (const GValue * item, GValue * result, gpointer user_data)
|
|
|
|
{
|
|
|
|
GstPad *pad;
|
|
|
|
gchar *name;
|
|
|
|
guint sessid;
|
|
|
|
GstRtpBinSession *session = user_data, *newsess;
|
|
|
|
GstRtpBin *rtpbin = session->bin;
|
|
|
|
GstPadLinkReturn ret;
|
|
|
|
|
|
|
|
pad = g_value_get_object (item);
|
|
|
|
name = gst_pad_get_name (pad);
|
|
|
|
|
|
|
|
if (name == NULL || sscanf (name, "src_%u", &sessid) != 1)
|
|
|
|
goto no_name;
|
|
|
|
|
|
|
|
g_free (name);
|
|
|
|
|
|
|
|
newsess = find_session_by_id (rtpbin, sessid);
|
|
|
|
if (newsess == NULL) {
|
|
|
|
/* create new session */
|
|
|
|
newsess = create_session (rtpbin, sessid);
|
|
|
|
if (newsess == NULL)
|
|
|
|
goto create_error;
|
|
|
|
} else if (newsess->send_rtp_sink != NULL)
|
|
|
|
goto existing_session;
|
|
|
|
|
|
|
|
/* get send_rtp pad and store */
|
|
|
|
newsess->send_rtp_sink =
|
2021-04-20 20:08:23 +00:00
|
|
|
gst_element_request_pad_simple (newsess->session, "send_rtp_sink");
|
2013-12-31 11:31:25 +00:00
|
|
|
if (newsess->send_rtp_sink == NULL)
|
|
|
|
goto pad_failed;
|
|
|
|
|
|
|
|
ret = gst_pad_link (pad, newsess->send_rtp_sink);
|
|
|
|
if (ret != GST_PAD_LINK_OK)
|
|
|
|
goto aux_link_failed;
|
|
|
|
|
|
|
|
if (!complete_session_src (rtpbin, newsess))
|
|
|
|
goto session_src_failed;
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
no_name:
|
|
|
|
{
|
|
|
|
GST_WARNING ("ignoring invalid pad name %s", GST_STR_NULL (name));
|
|
|
|
g_free (name);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
create_error:
|
|
|
|
{
|
|
|
|
/* create_session already warned */
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
existing_session:
|
|
|
|
{
|
2019-02-27 20:49:13 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin,
|
|
|
|
"skipping src_%i setup, since it is already configured.", sessid);
|
|
|
|
return TRUE;
|
2013-12-31 11:31:25 +00:00
|
|
|
}
|
|
|
|
pad_failed:
|
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to get session pad for session %u", sessid);
|
2013-12-31 11:31:25 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
aux_link_failed:
|
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to link AUX for session %u", sessid);
|
2013-12-31 11:31:25 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
session_src_failed:
|
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to complete AUX for session %u", sessid);
|
2013-12-31 11:31:25 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
setup_aux_sender (GstRtpBin * rtpbin, GstRtpBinSession * session,
|
|
|
|
GstElement * aux)
|
|
|
|
{
|
|
|
|
GstIterator *it;
|
|
|
|
GValue result = { 0, };
|
|
|
|
GstIteratorResult res;
|
|
|
|
|
|
|
|
it = gst_element_iterate_src_pads (aux);
|
|
|
|
res = gst_iterator_fold (it, setup_aux_sender_fold, &result, session);
|
|
|
|
gst_iterator_free (it);
|
|
|
|
|
|
|
|
return res == GST_ITERATOR_DONE;
|
|
|
|
}
|
|
|
|
|
2020-10-06 01:03:13 +00:00
|
|
|
static void
|
2022-03-04 17:58:56 +00:00
|
|
|
fec_encoder_add_pad_unlocked (GstPad * pad, GstRtpBinSession * session)
|
2020-10-06 01:03:13 +00:00
|
|
|
{
|
|
|
|
GstElementClass *klass;
|
|
|
|
gchar *gname;
|
|
|
|
GstPadTemplate *templ;
|
|
|
|
guint fec_idx;
|
|
|
|
GstPad *ghost;
|
|
|
|
|
|
|
|
if (sscanf (GST_PAD_NAME (pad), "fec_%u", &fec_idx) != 1) {
|
|
|
|
GST_WARNING_OBJECT (session->bin,
|
|
|
|
"FEC encoder added pad with name not matching fec_%%u (%s)",
|
|
|
|
GST_PAD_NAME (pad));
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_INFO_OBJECT (session->bin, "FEC encoder for session %u exposed new pad",
|
|
|
|
session->id);
|
|
|
|
|
|
|
|
klass = GST_ELEMENT_GET_CLASS (session->bin);
|
|
|
|
gname = g_strdup_printf ("send_fec_src_%u_%u", session->id, fec_idx);
|
|
|
|
templ = gst_element_class_get_pad_template (klass, "send_fec_src_%u_%u");
|
|
|
|
ghost = gst_ghost_pad_new_from_template (gname, pad, templ);
|
|
|
|
session->send_fec_src_ghosts =
|
|
|
|
g_slist_prepend (session->send_fec_src_ghosts, ghost);
|
|
|
|
gst_pad_set_active (ghost, TRUE);
|
|
|
|
gst_pad_sticky_events_foreach (pad, copy_sticky_events, ghost);
|
|
|
|
gst_element_add_pad (GST_ELEMENT (session->bin), ghost);
|
|
|
|
g_free (gname);
|
|
|
|
|
|
|
|
done:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2022-03-04 17:58:56 +00:00
|
|
|
static void
|
|
|
|
fec_encoder_add_pad (GstPad * pad, GstRtpBinSession * session)
|
|
|
|
{
|
|
|
|
GST_RTP_BIN_LOCK (session->bin);
|
|
|
|
fec_encoder_add_pad_unlocked (pad, session);
|
|
|
|
GST_RTP_BIN_UNLOCK (session->bin);
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
|
|
|
fec_srcpad_iterator_filter (const GValue * item, GValue * unused)
|
|
|
|
{
|
|
|
|
guint fec_idx;
|
|
|
|
GstPad *pad = g_value_get_object (item);
|
|
|
|
GstPadTemplate *templ = gst_pad_get_pad_template (pad);
|
|
|
|
|
|
|
|
gint have_static_pad =
|
|
|
|
(GST_PAD_TEMPLATE_PRESENCE (templ) == GST_PAD_ALWAYS) &&
|
|
|
|
(sscanf (GST_PAD_NAME (pad), "fec_%u", &fec_idx) == 1);
|
|
|
|
|
|
|
|
gst_object_unref (templ);
|
|
|
|
|
|
|
|
/* return 0 to retain pad in filtered iterator */
|
|
|
|
return !have_static_pad;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
fec_srcpad_iterator_foreach (const GValue * item, GstRtpBinSession * session)
|
|
|
|
{
|
|
|
|
GstPad *pad = g_value_get_object (item);
|
|
|
|
fec_encoder_add_pad_unlocked (pad, session);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
fec_encoder_pad_added_cb (GstElement * encoder, GstPad * pad,
|
|
|
|
GstRtpBinSession * session)
|
|
|
|
{
|
|
|
|
fec_encoder_add_pad (pad, session);
|
|
|
|
}
|
|
|
|
|
2020-10-06 01:03:13 +00:00
|
|
|
static GstElement *
|
|
|
|
request_fec_encoder (GstRtpBin * rtpbin, GstRtpBinSession * session,
|
|
|
|
guint sessid)
|
|
|
|
{
|
|
|
|
GstElement *ret = NULL;
|
|
|
|
const gchar *factory;
|
|
|
|
gchar *sess_id_str;
|
|
|
|
|
|
|
|
sess_id_str = g_strdup_printf ("%u", sessid);
|
|
|
|
factory = gst_structure_get_string (rtpbin->fec_encoders, sess_id_str);
|
|
|
|
g_free (sess_id_str);
|
|
|
|
|
|
|
|
/* First try the property */
|
|
|
|
if (factory) {
|
|
|
|
GError *err = NULL;
|
|
|
|
|
|
|
|
ret =
|
|
|
|
gst_parse_bin_from_description_full (factory, TRUE, NULL,
|
|
|
|
GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS | GST_PARSE_FLAG_FATAL_ERRORS,
|
|
|
|
&err);
|
|
|
|
if (!ret) {
|
|
|
|
GST_ERROR_OBJECT (rtpbin, "Failed to build encoder from factory: %s",
|
|
|
|
err->message);
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
bin_manage_element (session->bin, ret);
|
|
|
|
session->elements = g_slist_prepend (session->elements, ret);
|
|
|
|
GST_INFO_OBJECT (rtpbin, "Built FEC encoder: %" GST_PTR_FORMAT
|
|
|
|
" for session %u", ret, sessid);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Fallback to the signal */
|
|
|
|
if (!ret)
|
|
|
|
ret = session_request_element (session, SIGNAL_REQUEST_FEC_ENCODER);
|
|
|
|
|
|
|
|
if (ret) {
|
2022-03-04 17:58:56 +00:00
|
|
|
/* First, add encoder pads that match fec_% template and are already present */
|
|
|
|
GstIterator *it, *filter;
|
|
|
|
GstIteratorResult it_ret = GST_ITERATOR_OK;
|
|
|
|
|
|
|
|
it = gst_element_iterate_src_pads (ret);
|
|
|
|
filter =
|
|
|
|
gst_iterator_filter (it, (GCompareFunc) fec_srcpad_iterator_filter,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
while (it_ret == GST_ITERATOR_OK || it_ret == GST_ITERATOR_RESYNC) {
|
|
|
|
it_ret =
|
|
|
|
gst_iterator_foreach (filter,
|
|
|
|
(GstIteratorForeachFunction) fec_srcpad_iterator_foreach, session);
|
|
|
|
|
|
|
|
if (it_ret == GST_ITERATOR_RESYNC)
|
|
|
|
gst_iterator_resync (filter);
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_iterator_free (filter);
|
|
|
|
|
|
|
|
/* Finally, connect to pad-added signal if any of the encoder pads are
|
|
|
|
* added later */
|
2020-10-06 01:03:13 +00:00
|
|
|
g_signal_connect (ret, "pad-added", G_CALLBACK (fec_encoder_pad_added_cb),
|
|
|
|
session);
|
|
|
|
}
|
|
|
|
|
|
|
|
done:
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2013-12-31 11:31:25 +00:00
|
|
|
/* Create a pad for sending RTP for the session in @name. Must be called with
|
|
|
|
* RTP_BIN_LOCK.
|
|
|
|
*/
|
|
|
|
static GstPad *
|
|
|
|
create_send_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
|
|
|
|
{
|
|
|
|
gchar *pname;
|
|
|
|
guint sessid;
|
|
|
|
GstPad *send_rtp_sink;
|
|
|
|
GstElement *aux;
|
2017-11-28 05:02:05 +00:00
|
|
|
GstElement *encoder;
|
|
|
|
GstElement *prev = NULL;
|
2013-12-31 11:31:25 +00:00
|
|
|
GstRtpBinSession *session;
|
|
|
|
|
|
|
|
/* first get the session number */
|
|
|
|
if (name == NULL || sscanf (name, "send_rtp_sink_%u", &sessid) != 1)
|
|
|
|
goto no_name;
|
|
|
|
|
|
|
|
/* get or create session */
|
|
|
|
session = find_session_by_id (rtpbin, sessid);
|
|
|
|
if (!session) {
|
|
|
|
/* create session now */
|
|
|
|
session = create_session (rtpbin, sessid);
|
|
|
|
if (session == NULL)
|
|
|
|
goto create_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* check if pad was requested */
|
|
|
|
if (session->send_rtp_sink_ghost != NULL)
|
|
|
|
return session->send_rtp_sink_ghost;
|
|
|
|
|
|
|
|
/* check if we are already using this session as a sender */
|
|
|
|
if (session->send_rtp_sink != NULL)
|
|
|
|
goto existing_session;
|
|
|
|
|
2020-10-06 01:03:13 +00:00
|
|
|
encoder = request_fec_encoder (rtpbin, session, sessid);
|
2017-11-28 05:02:05 +00:00
|
|
|
|
|
|
|
if (encoder) {
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "Linking FEC encoder");
|
|
|
|
|
|
|
|
send_rtp_sink = gst_element_get_static_pad (encoder, "sink");
|
|
|
|
|
|
|
|
if (!send_rtp_sink)
|
|
|
|
goto enc_sink_failed;
|
|
|
|
|
|
|
|
prev = encoder;
|
|
|
|
}
|
|
|
|
|
2013-12-31 11:31:25 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "getting RTP AUX sender");
|
|
|
|
aux = session_request_element (session, SIGNAL_REQUEST_AUX_SENDER);
|
|
|
|
if (aux) {
|
2017-11-28 05:02:05 +00:00
|
|
|
GstPad *sinkpad;
|
2013-12-31 11:31:25 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "linking AUX sender");
|
|
|
|
if (!setup_aux_sender (rtpbin, session, aux))
|
|
|
|
goto aux_session_failed;
|
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
pname = g_strdup_printf ("sink_%u", sessid);
|
2017-11-28 05:02:05 +00:00
|
|
|
sinkpad = gst_element_get_static_pad (aux, pname);
|
2013-12-31 11:31:25 +00:00
|
|
|
g_free (pname);
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
if (sinkpad == NULL)
|
2013-12-31 11:31:25 +00:00
|
|
|
goto aux_sink_failed;
|
2017-11-28 05:02:05 +00:00
|
|
|
|
|
|
|
if (!prev) {
|
|
|
|
send_rtp_sink = sinkpad;
|
|
|
|
} else {
|
|
|
|
GstPad *srcpad = gst_element_get_static_pad (prev, "src");
|
|
|
|
GstPadLinkReturn ret;
|
|
|
|
|
|
|
|
ret = gst_pad_link (srcpad, sinkpad);
|
|
|
|
gst_object_unref (srcpad);
|
|
|
|
if (ret != GST_PAD_LINK_OK) {
|
|
|
|
goto aux_link_failed;
|
|
|
|
}
|
2021-10-21 09:32:05 +00:00
|
|
|
gst_object_unref (sinkpad);
|
2017-11-28 05:02:05 +00:00
|
|
|
}
|
|
|
|
prev = aux;
|
2013-12-31 11:31:25 +00:00
|
|
|
} else {
|
|
|
|
/* get send_rtp pad and store */
|
|
|
|
session->send_rtp_sink =
|
2021-04-20 20:08:23 +00:00
|
|
|
gst_element_request_pad_simple (session->session, "send_rtp_sink");
|
2013-12-31 11:31:25 +00:00
|
|
|
if (session->send_rtp_sink == NULL)
|
|
|
|
goto pad_failed;
|
|
|
|
|
|
|
|
if (!complete_session_src (rtpbin, session))
|
|
|
|
goto session_src_failed;
|
|
|
|
|
2017-11-28 05:02:05 +00:00
|
|
|
if (!prev) {
|
|
|
|
send_rtp_sink = gst_object_ref (session->send_rtp_sink);
|
|
|
|
} else {
|
|
|
|
GstPad *srcpad = gst_element_get_static_pad (prev, "src");
|
|
|
|
GstPadLinkReturn ret;
|
|
|
|
|
|
|
|
ret = gst_pad_link (srcpad, session->send_rtp_sink);
|
|
|
|
gst_object_unref (srcpad);
|
|
|
|
if (ret != GST_PAD_LINK_OK)
|
|
|
|
goto session_link_failed;
|
|
|
|
}
|
2013-12-31 11:31:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
session->send_rtp_sink_ghost =
|
|
|
|
gst_ghost_pad_new_from_template (name, send_rtp_sink, templ);
|
|
|
|
gst_object_unref (send_rtp_sink);
|
|
|
|
|
2009-05-22 13:36:17 +00:00
|
|
|
return session->send_rtp_sink_ghost;
|
2007-04-03 11:35:39 +00:00
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
no_name:
|
|
|
|
{
|
2020-03-31 19:51:27 +00:00
|
|
|
g_warning ("rtpbin: cannot find session id for pad: %s",
|
|
|
|
GST_STR_NULL (name));
|
2007-04-03 11:35:39 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
create_error:
|
|
|
|
{
|
|
|
|
/* create_session already warned */
|
|
|
|
return NULL;
|
|
|
|
}
|
2013-12-31 11:31:25 +00:00
|
|
|
existing_session:
|
2007-04-03 11:35:39 +00:00
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: session %u is already in use", sessid);
|
2007-04-03 11:35:39 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2013-12-31 11:31:25 +00:00
|
|
|
aux_session_failed:
|
2007-04-03 11:35:39 +00:00
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to get AUX sink pad for session %u", sessid);
|
2007-04-03 11:35:39 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2013-12-31 11:31:25 +00:00
|
|
|
aux_sink_failed:
|
2013-12-05 23:53:52 +00:00
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to get AUX sink pad for session %u", sessid);
|
2013-12-05 23:53:52 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2017-11-28 05:02:05 +00:00
|
|
|
aux_link_failed:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to link %" GST_PTR_FORMAT " for session %u",
|
|
|
|
aux, sessid);
|
|
|
|
return NULL;
|
|
|
|
}
|
2013-12-31 11:31:25 +00:00
|
|
|
pad_failed:
|
2013-12-05 23:53:52 +00:00
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to get session pad for session %u", sessid);
|
2013-12-05 23:53:52 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2013-12-31 11:31:25 +00:00
|
|
|
session_src_failed:
|
2013-12-05 23:53:52 +00:00
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to setup source pads for session %u", sessid);
|
2013-12-05 23:53:52 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2017-11-28 05:02:05 +00:00
|
|
|
session_link_failed:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to link %" GST_PTR_FORMAT " for session %u",
|
|
|
|
session, sessid);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
enc_sink_failed:
|
|
|
|
{
|
|
|
|
g_warning ("rtpbin: failed to get %" GST_PTR_FORMAT
|
|
|
|
" sink pad for session %u", encoder, sessid);
|
|
|
|
return NULL;
|
|
|
|
}
|
2007-04-03 11:35:39 +00:00
|
|
|
}
|
|
|
|
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
static void
|
2009-05-22 13:45:19 +00:00
|
|
|
remove_send_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session)
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
{
|
2009-05-21 22:44:51 +00:00
|
|
|
if (session->send_rtp_src_ghost) {
|
|
|
|
gst_pad_set_active (session->send_rtp_src_ghost, FALSE);
|
|
|
|
gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin),
|
|
|
|
session->send_rtp_src_ghost);
|
|
|
|
session->send_rtp_src_ghost = NULL;
|
|
|
|
}
|
|
|
|
if (session->send_rtp_sink) {
|
|
|
|
gst_element_release_request_pad (GST_ELEMENT_CAST (session->session),
|
|
|
|
session->send_rtp_sink);
|
2009-05-22 09:59:17 +00:00
|
|
|
gst_object_unref (session->send_rtp_sink);
|
2009-05-21 22:44:51 +00:00
|
|
|
session->send_rtp_sink = NULL;
|
|
|
|
}
|
2009-05-22 13:45:19 +00:00
|
|
|
if (session->send_rtp_sink_ghost) {
|
|
|
|
gst_pad_set_active (session->send_rtp_sink_ghost, FALSE);
|
|
|
|
gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin),
|
|
|
|
session->send_rtp_sink_ghost);
|
|
|
|
session->send_rtp_sink_ghost = NULL;
|
|
|
|
}
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
}
|
|
|
|
|
2020-10-06 01:03:13 +00:00
|
|
|
static void
|
|
|
|
remove_send_fec (GstRtpBin * rtpbin, GstRtpBinSession * session)
|
|
|
|
{
|
|
|
|
GSList *tmp;
|
|
|
|
|
|
|
|
for (tmp = session->send_fec_src_ghosts; tmp; tmp = tmp->next) {
|
|
|
|
GstPad *ghost = GST_PAD (tmp->data);
|
|
|
|
gst_pad_set_active (ghost, FALSE);
|
|
|
|
gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), ghost);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_slist_free (session->send_fec_src_ghosts);
|
|
|
|
session->send_fec_src_ghosts = NULL;
|
|
|
|
}
|
|
|
|
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
/* Create a pad for sending RTCP for the session in @name. Must be called with
|
|
|
|
* RTP_BIN_LOCK.
|
2007-04-03 11:35:39 +00:00
|
|
|
*/
|
|
|
|
static GstPad *
|
2017-08-24 07:06:38 +00:00
|
|
|
create_send_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ,
|
|
|
|
const gchar * name)
|
2007-04-03 11:35:39 +00:00
|
|
|
{
|
|
|
|
guint sessid;
|
2013-12-05 23:53:52 +00:00
|
|
|
GstPad *encsrc;
|
|
|
|
GstElement *encoder;
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBinSession *session;
|
2007-04-03 11:35:39 +00:00
|
|
|
|
|
|
|
/* first get the session number */
|
2011-11-04 10:58:22 +00:00
|
|
|
if (name == NULL || sscanf (name, "send_rtcp_src_%u", &sessid) != 1)
|
2007-04-03 11:35:39 +00:00
|
|
|
goto no_name;
|
|
|
|
|
|
|
|
/* get or create session */
|
|
|
|
session = find_session_by_id (rtpbin, sessid);
|
2017-08-24 07:06:38 +00:00
|
|
|
if (!session) {
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "creating session %u", sessid);
|
|
|
|
/* create session now */
|
|
|
|
session = create_session (rtpbin, sessid);
|
|
|
|
if (session == NULL)
|
|
|
|
goto create_error;
|
|
|
|
}
|
2007-04-03 11:35:39 +00:00
|
|
|
|
|
|
|
/* check if pad was requested */
|
2009-05-22 13:36:17 +00:00
|
|
|
if (session->send_rtcp_src_ghost != NULL)
|
|
|
|
return session->send_rtcp_src_ghost;
|
2007-04-03 11:35:39 +00:00
|
|
|
|
|
|
|
/* get rtcp_src pad and store */
|
gst/rtpmanager/async_jitter_queue.c: Fix the case where the buffer underruns and does not block.
Original commit message from CVS:
* gst/rtpmanager/async_jitter_queue.c: (signal_waiting_threads),
(async_jitter_queue_pop_intern_unlocked):
Fix the case where the buffer underruns and does not block.
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(create_recv_rtcp), (create_send_rtp), (create_rtcp),
(gst_rtp_bin_request_new_pad):
Rename RTCP send pad, like in the session manager.
Allow getting an RTCP pad for receiving even if we don't receive RTP.
fix handling of send_rtp_src pad.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
When no pt map could be found, fall back to the sinkpad caps.
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_process_rtp),
(gst_rtp_session_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink),
(create_send_rtcp_src):
Fix pad names.
* gst/rtpmanager/rtpsession.c: (source_push_rtp),
(rtp_session_create_source), (rtp_session_process_sr),
(rtp_session_send_rtp), (session_start_rtcp):
* gst/rtpmanager/rtpsession.h:
Unlock session when performing a callback.
Add callbacks for the internal session object.
Fix sending of RTP packets.
first attempt at adding NTP times in the SR packets.
Small debug and doc improvements.
* gst/rtpmanager/rtpsource.c: (rtp_source_send_rtp):
Update stats for SR reports.
2007-04-30 13:41:30 +00:00
|
|
|
session->send_rtcp_src =
|
2021-04-20 20:08:23 +00:00
|
|
|
gst_element_request_pad_simple (session->session, "send_rtcp_src");
|
gst/rtpmanager/async_jitter_queue.c: Fix the case where the buffer underruns and does not block.
Original commit message from CVS:
* gst/rtpmanager/async_jitter_queue.c: (signal_waiting_threads),
(async_jitter_queue_pop_intern_unlocked):
Fix the case where the buffer underruns and does not block.
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(create_recv_rtcp), (create_send_rtp), (create_rtcp),
(gst_rtp_bin_request_new_pad):
Rename RTCP send pad, like in the session manager.
Allow getting an RTCP pad for receiving even if we don't receive RTP.
fix handling of send_rtp_src pad.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
When no pt map could be found, fall back to the sinkpad caps.
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_process_rtp),
(gst_rtp_session_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink),
(create_send_rtcp_src):
Fix pad names.
* gst/rtpmanager/rtpsession.c: (source_push_rtp),
(rtp_session_create_source), (rtp_session_process_sr),
(rtp_session_send_rtp), (session_start_rtcp):
* gst/rtpmanager/rtpsession.h:
Unlock session when performing a callback.
Add callbacks for the internal session object.
Fix sending of RTP packets.
first attempt at adding NTP times in the SR packets.
Small debug and doc improvements.
* gst/rtpmanager/rtpsource.c: (rtp_source_send_rtp):
Update stats for SR reports.
2007-04-30 13:41:30 +00:00
|
|
|
if (session->send_rtcp_src == NULL)
|
2007-04-03 11:35:39 +00:00
|
|
|
goto pad_failed;
|
|
|
|
|
2013-12-05 23:53:52 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "getting RTCP encoder");
|
2013-12-30 16:36:42 +00:00
|
|
|
encoder = session_request_element (session, SIGNAL_REQUEST_RTCP_ENCODER);
|
2013-12-05 23:53:52 +00:00
|
|
|
if (encoder) {
|
|
|
|
gchar *ename;
|
|
|
|
GstPad *encsink;
|
|
|
|
GstPadLinkReturn ret;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "linking RTCP encoder");
|
2014-09-17 14:37:11 +00:00
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
ename = g_strdup_printf ("rtcp_src_%u", sessid);
|
2013-12-05 23:53:52 +00:00
|
|
|
encsrc = gst_element_get_static_pad (encoder, ename);
|
|
|
|
g_free (ename);
|
|
|
|
if (encsrc == NULL)
|
|
|
|
goto enc_src_failed;
|
|
|
|
|
2016-11-16 07:56:34 +00:00
|
|
|
ename = g_strdup_printf ("rtcp_sink_%u", sessid);
|
2014-09-17 14:37:11 +00:00
|
|
|
encsink = gst_element_get_static_pad (encoder, ename);
|
|
|
|
g_free (ename);
|
2013-12-30 14:15:43 +00:00
|
|
|
if (encsink == NULL)
|
|
|
|
goto enc_sink_failed;
|
|
|
|
|
2013-12-05 23:53:52 +00:00
|
|
|
ret = gst_pad_link (session->send_rtcp_src, encsink);
|
|
|
|
gst_object_unref (encsink);
|
|
|
|
|
|
|
|
if (ret != GST_PAD_LINK_OK)
|
|
|
|
goto enc_link_failed;
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (rtpbin, "no RTCP encoder given");
|
2013-12-30 14:15:43 +00:00
|
|
|
encsrc = gst_object_ref (session->send_rtcp_src);
|
2013-12-05 23:53:52 +00:00
|
|
|
}
|
|
|
|
|
2009-05-22 13:36:17 +00:00
|
|
|
session->send_rtcp_src_ghost =
|
2013-12-05 23:53:52 +00:00
|
|
|
gst_ghost_pad_new_from_template (name, encsrc, templ);
|
2013-12-30 14:15:43 +00:00
|
|
|
gst_object_unref (encsrc);
|
2007-04-03 11:35:39 +00:00
|
|
|
|
2009-05-22 13:36:17 +00:00
|
|
|
return session->send_rtcp_src_ghost;
|
2007-04-03 11:35:39 +00:00
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
no_name:
|
|
|
|
{
|
2020-03-31 19:51:27 +00:00
|
|
|
g_warning ("rtpbin: cannot find session id for pad: %s",
|
|
|
|
GST_STR_NULL (name));
|
2007-04-03 11:35:39 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2017-08-24 07:06:38 +00:00
|
|
|
create_error:
|
2007-04-03 11:35:39 +00:00
|
|
|
{
|
2017-08-24 07:06:38 +00:00
|
|
|
/* create_session already warned */
|
2007-04-03 11:35:39 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
pad_failed:
|
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to get rtcp pad for session %u", sessid);
|
2007-04-03 11:35:39 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2013-12-30 14:15:43 +00:00
|
|
|
enc_src_failed:
|
2013-12-05 23:53:52 +00:00
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to get encoder src pad for session %u", sessid);
|
2013-12-05 23:53:52 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2013-12-30 14:15:43 +00:00
|
|
|
enc_sink_failed:
|
2013-12-05 23:53:52 +00:00
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to get encoder sink pad for session %u", sessid);
|
2013-12-30 14:15:43 +00:00
|
|
|
gst_object_unref (encsrc);
|
2013-12-05 23:53:52 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
enc_link_failed:
|
|
|
|
{
|
2016-11-16 07:56:34 +00:00
|
|
|
g_warning ("rtpbin: failed to link rtcp encoder for session %u", sessid);
|
2013-12-30 14:15:43 +00:00
|
|
|
gst_object_unref (encsrc);
|
2013-12-05 23:53:52 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2007-04-03 11:35:39 +00:00
|
|
|
}
|
|
|
|
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
static void
|
2009-05-22 13:45:19 +00:00
|
|
|
remove_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session)
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
{
|
2009-05-22 13:45:19 +00:00
|
|
|
if (session->send_rtcp_src_ghost) {
|
|
|
|
gst_pad_set_active (session->send_rtcp_src_ghost, FALSE);
|
|
|
|
gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin),
|
|
|
|
session->send_rtcp_src_ghost);
|
|
|
|
session->send_rtcp_src_ghost = NULL;
|
|
|
|
}
|
2009-05-21 22:16:19 +00:00
|
|
|
if (session->send_rtcp_src) {
|
|
|
|
gst_element_release_request_pad (session->session, session->send_rtcp_src);
|
2009-05-22 09:59:17 +00:00
|
|
|
gst_object_unref (session->send_rtcp_src);
|
2009-05-21 22:16:19 +00:00
|
|
|
session->send_rtcp_src = NULL;
|
|
|
|
}
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
}
|
|
|
|
|
2008-01-10 14:34:30 +00:00
|
|
|
/* If the requested name is NULL we should create a name with
|
2019-09-02 12:27:35 +00:00
|
|
|
* the session number assuming we want the lowest possible session
|
2008-01-10 14:34:30 +00:00
|
|
|
* with a free pad like the template */
|
|
|
|
static gchar *
|
|
|
|
gst_rtp_bin_get_free_pad_name (GstElement * element, GstPadTemplate * templ)
|
|
|
|
{
|
|
|
|
gboolean name_found = FALSE;
|
|
|
|
gint session = 0;
|
|
|
|
GstIterator *pad_it = NULL;
|
|
|
|
gchar *pad_name = NULL;
|
2011-06-13 15:51:40 +00:00
|
|
|
GValue data = { 0, };
|
2008-01-10 14:34:30 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (element, "find a free pad name for template");
|
|
|
|
while (!name_found) {
|
2010-04-12 07:49:14 +00:00
|
|
|
gboolean done = FALSE;
|
2011-06-13 15:51:40 +00:00
|
|
|
|
2008-01-10 14:34:30 +00:00
|
|
|
g_free (pad_name);
|
|
|
|
pad_name = g_strdup_printf (templ->name_template, session++);
|
|
|
|
pad_it = gst_element_iterate_pads (GST_ELEMENT (element));
|
|
|
|
name_found = TRUE;
|
2010-04-12 07:49:14 +00:00
|
|
|
while (!done) {
|
|
|
|
switch (gst_iterator_next (pad_it, &data)) {
|
|
|
|
case GST_ITERATOR_OK:
|
|
|
|
{
|
|
|
|
GstPad *pad;
|
|
|
|
gchar *name;
|
|
|
|
|
2011-06-13 15:51:40 +00:00
|
|
|
pad = g_value_get_object (&data);
|
2010-04-12 07:49:14 +00:00
|
|
|
name = gst_pad_get_name (pad);
|
|
|
|
|
|
|
|
if (strcmp (name, pad_name) == 0) {
|
|
|
|
done = TRUE;
|
|
|
|
name_found = FALSE;
|
|
|
|
}
|
|
|
|
g_free (name);
|
2011-06-13 15:51:40 +00:00
|
|
|
g_value_reset (&data);
|
2010-04-12 07:49:14 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case GST_ITERATOR_ERROR:
|
|
|
|
case GST_ITERATOR_RESYNC:
|
|
|
|
/* restart iteration */
|
|
|
|
done = TRUE;
|
|
|
|
name_found = FALSE;
|
|
|
|
session = 0;
|
|
|
|
break;
|
|
|
|
case GST_ITERATOR_DONE:
|
|
|
|
done = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
2008-01-10 14:34:30 +00:00
|
|
|
}
|
2011-06-13 15:51:40 +00:00
|
|
|
g_value_unset (&data);
|
2008-01-10 14:34:30 +00:00
|
|
|
gst_iterator_free (pad_it);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (element, "free pad name found: '%s'", pad_name);
|
|
|
|
return pad_name;
|
|
|
|
}
|
|
|
|
|
2009-08-31 14:33:26 +00:00
|
|
|
/*
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
*/
|
|
|
|
static GstPad *
|
|
|
|
gst_rtp_bin_request_new_pad (GstElement * element,
|
2011-06-13 15:51:40 +00:00
|
|
|
GstPadTemplate * templ, const gchar * name, const GstCaps * caps)
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
{
|
2007-08-23 21:39:58 +00:00
|
|
|
GstRtpBin *rtpbin;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
GstElementClass *klass;
|
2007-04-03 11:35:39 +00:00
|
|
|
GstPad *result;
|
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.
2008-09-05 13:52:34 +00:00
|
|
|
|
2008-01-10 14:34:30 +00:00
|
|
|
gchar *pad_name = NULL;
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
|
|
|
|
g_return_val_if_fail (templ != NULL, NULL);
|
|
|
|
g_return_val_if_fail (GST_IS_RTP_BIN (element), NULL);
|
|
|
|
|
|
|
|
rtpbin = GST_RTP_BIN (element);
|
|
|
|
klass = GST_ELEMENT_GET_CLASS (element);
|
|
|
|
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
|
|
|
|
2008-01-10 14:34:30 +00:00
|
|
|
if (name == NULL) {
|
|
|
|
/* use a free pad name */
|
|
|
|
pad_name = gst_rtp_bin_get_free_pad_name (element, templ);
|
|
|
|
} else {
|
|
|
|
/* use the provided name */
|
|
|
|
pad_name = g_strdup (name);
|
|
|
|
}
|
|
|
|
|
2009-05-22 10:20:13 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "Trying to request a pad with name %s", pad_name);
|
2008-01-10 14:34:30 +00:00
|
|
|
|
2007-04-03 11:35:39 +00:00
|
|
|
/* figure out the template */
|
2011-11-04 10:58:22 +00:00
|
|
|
if (templ == gst_element_class_get_pad_template (klass, "recv_rtp_sink_%u")) {
|
2008-01-10 14:34:30 +00:00
|
|
|
result = create_recv_rtp (rtpbin, templ, pad_name);
|
2007-04-03 11:35:39 +00:00
|
|
|
} else if (templ == gst_element_class_get_pad_template (klass,
|
2011-11-04 10:58:22 +00:00
|
|
|
"recv_rtcp_sink_%u")) {
|
2008-01-10 14:34:30 +00:00
|
|
|
result = create_recv_rtcp (rtpbin, templ, pad_name);
|
2007-04-03 11:35:39 +00:00
|
|
|
} else if (templ == gst_element_class_get_pad_template (klass,
|
2011-11-04 10:58:22 +00:00
|
|
|
"send_rtp_sink_%u")) {
|
2008-01-10 14:34:30 +00:00
|
|
|
result = create_send_rtp (rtpbin, templ, pad_name);
|
gst/rtpmanager/async_jitter_queue.c: Fix the case where the buffer underruns and does not block.
Original commit message from CVS:
* gst/rtpmanager/async_jitter_queue.c: (signal_waiting_threads),
(async_jitter_queue_pop_intern_unlocked):
Fix the case where the buffer underruns and does not block.
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(create_recv_rtcp), (create_send_rtp), (create_rtcp),
(gst_rtp_bin_request_new_pad):
Rename RTCP send pad, like in the session manager.
Allow getting an RTCP pad for receiving even if we don't receive RTP.
fix handling of send_rtp_src pad.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain):
When no pt map could be found, fall back to the sinkpad caps.
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_process_rtp),
(gst_rtp_session_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink),
(create_send_rtcp_src):
Fix pad names.
* gst/rtpmanager/rtpsession.c: (source_push_rtp),
(rtp_session_create_source), (rtp_session_process_sr),
(rtp_session_send_rtp), (session_start_rtcp):
* gst/rtpmanager/rtpsession.h:
Unlock session when performing a callback.
Add callbacks for the internal session object.
Fix sending of RTP packets.
first attempt at adding NTP times in the SR packets.
Small debug and doc improvements.
* gst/rtpmanager/rtpsource.c: (rtp_source_send_rtp):
Update stats for SR reports.
2007-04-30 13:41:30 +00:00
|
|
|
} else if (templ == gst_element_class_get_pad_template (klass,
|
2011-11-04 10:58:22 +00:00
|
|
|
"send_rtcp_src_%u")) {
|
2017-08-24 07:06:38 +00:00
|
|
|
result = create_send_rtcp (rtpbin, templ, pad_name);
|
2020-10-06 01:13:30 +00:00
|
|
|
} else if (templ == gst_element_class_get_pad_template (klass,
|
|
|
|
"recv_fec_sink_%u_%u")) {
|
|
|
|
result = create_recv_fec (rtpbin, templ, pad_name);
|
2007-04-03 11:35:39 +00:00
|
|
|
} else
|
|
|
|
goto wrong_template;
|
|
|
|
|
2008-01-10 14:34:30 +00:00
|
|
|
g_free (pad_name);
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
|
2022-05-13 01:42:21 +00:00
|
|
|
if (result) {
|
|
|
|
gst_pad_set_active (result, TRUE);
|
|
|
|
gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), result);
|
|
|
|
}
|
|
|
|
|
2007-04-03 11:35:39 +00:00
|
|
|
return result;
|
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
wrong_template:
|
|
|
|
{
|
2008-01-10 14:34:30 +00:00
|
|
|
g_free (pad_name);
|
gst/rtpmanager/: Protect lists and structures with locks.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(gst_rtp_bin_init), (gst_rtp_bin_finalize), (new_ssrc_pad_found),
(create_recv_rtp), (gst_rtp_bin_request_new_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_class_init),
(gst_rtp_session_init), (gst_rtp_session_finalize),
(gst_rtp_session_event_recv_rtp_sink),
(gst_rtp_session_event_recv_rtcp_sink),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_request_new_pad):
Protect lists and structures with locks.
Return FLOW_OK from RTCP messages for now.
2007-04-13 09:20:55 +00:00
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
2011-11-24 00:52:40 +00:00
|
|
|
g_warning ("rtpbin: this is not our template");
|
2007-04-03 11:35:39 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_rtp_bin_release_pad (GstElement * element, GstPad * pad)
|
|
|
|
{
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
GstRtpBinSession *session;
|
|
|
|
GstRtpBin *rtpbin;
|
|
|
|
|
2008-11-21 16:17:22 +00:00
|
|
|
g_return_if_fail (GST_IS_GHOST_PAD (pad));
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
g_return_if_fail (GST_IS_RTP_BIN (element));
|
|
|
|
|
|
|
|
rtpbin = GST_RTP_BIN (element);
|
|
|
|
|
|
|
|
GST_RTP_BIN_LOCK (rtpbin);
|
2009-05-22 10:20:13 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "Trying to release pad %s:%s",
|
2009-05-22 13:45:19 +00:00
|
|
|
GST_DEBUG_PAD_NAME (pad));
|
2009-05-22 10:20:13 +00:00
|
|
|
|
2009-05-22 13:45:19 +00:00
|
|
|
if (!(session = find_session_by_pad (rtpbin, pad)))
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
goto unknown_pad;
|
|
|
|
|
2009-05-22 13:45:19 +00:00
|
|
|
if (session->recv_rtp_sink_ghost == pad) {
|
|
|
|
remove_recv_rtp (rtpbin, session);
|
|
|
|
} else if (session->recv_rtcp_sink_ghost == pad) {
|
|
|
|
remove_recv_rtcp (rtpbin, session);
|
|
|
|
} else if (session->send_rtp_sink_ghost == pad) {
|
|
|
|
remove_send_rtp (rtpbin, session);
|
|
|
|
} else if (session->send_rtcp_src_ghost == pad) {
|
|
|
|
remove_rtcp (rtpbin, session);
|
2020-10-06 01:13:30 +00:00
|
|
|
} else if (pad_is_recv_fec (session, pad)) {
|
|
|
|
remove_recv_fec_for_pad (rtpbin, session, pad);
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
}
|
2009-05-21 23:03:55 +00:00
|
|
|
|
|
|
|
/* no more request pads, free the complete session */
|
2009-05-22 13:45:19 +00:00
|
|
|
if (session->recv_rtp_sink_ghost == NULL
|
|
|
|
&& session->recv_rtcp_sink_ghost == NULL
|
|
|
|
&& session->send_rtp_sink_ghost == NULL
|
2020-10-06 01:13:30 +00:00
|
|
|
&& session->send_rtcp_src_ghost == NULL
|
|
|
|
&& session->recv_fec_sink_ghosts == NULL) {
|
2009-05-22 10:20:13 +00:00
|
|
|
GST_DEBUG_OBJECT (rtpbin, "no more pads for session %p", session);
|
2009-05-21 23:03:55 +00:00
|
|
|
rtpbin->sessions = g_slist_remove (rtpbin->sessions, session);
|
2009-05-22 10:20:13 +00:00
|
|
|
free_session (session, rtpbin);
|
2009-05-21 23:03:55 +00:00
|
|
|
}
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* ERROR */
|
|
|
|
unknown_pad:
|
|
|
|
{
|
|
|
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
2011-11-24 00:52:40 +00:00
|
|
|
g_warning ("rtpbin: %s:%s is not one of our request pads",
|
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.
2008-10-07 11:33:10 +00:00
|
|
|
GST_DEBUG_PAD_NAME (pad));
|
|
|
|
return;
|
|
|
|
}
|
Add RTP session management elements. Still in progress.
Original commit message from CVS:
* configure.ac:
* gst/rtpmanager/Makefile.am:
* gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_new),
(signal_waiting_threads), (async_jitter_queue_ref),
(async_jitter_queue_ref_unlocked),
(async_jitter_queue_set_low_threshold),
(async_jitter_queue_set_high_threshold),
(async_jitter_queue_set_max_queue_length),
(async_jitter_queue_get_g_queue), (calculate_ts_diff),
(async_jitter_queue_length_ts_units_unlocked),
(async_jitter_queue_unref_and_unlock), (async_jitter_queue_unref),
(async_jitter_queue_lock), (async_jitter_queue_unlock),
(async_jitter_queue_push), (async_jitter_queue_push_unlocked),
(async_jitter_queue_push_sorted),
(async_jitter_queue_push_sorted_unlocked),
(async_jitter_queue_insert_after_unlocked),
(async_jitter_queue_pop_intern_unlocked), (async_jitter_queue_pop),
(async_jitter_queue_pop_unlocked), (async_jitter_queue_length),
(async_jitter_queue_length_unlocked),
(async_jitter_queue_set_flushing_unlocked),
(async_jitter_queue_unset_flushing_unlocked),
(async_jitter_queue_set_blocking_unlocked):
* gst/rtpmanager/async_jitter_queue.h:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init),
(gst_rtp_bin_class_init), (gst_rtp_bin_init),
(gst_rtp_bin_finalize), (gst_rtp_bin_set_property),
(gst_rtp_bin_get_property), (gst_rtp_bin_change_state),
(gst_rtp_bin_request_new_pad), (gst_rtp_bin_release_pad):
* gst/rtpmanager/gstrtpbin.h:
* gst/rtpmanager/gstrtpclient.c: (new_pad), (create_stream),
(free_stream), (find_stream_by_ssrc), (gst_rtp_client_base_init),
(gst_rtp_client_class_init), (gst_rtp_client_init),
(gst_rtp_client_finalize), (gst_rtp_client_set_property),
(gst_rtp_client_get_property), (gst_rtp_client_change_state),
(gst_rtp_client_request_new_pad), (gst_rtp_client_release_pad):
* gst/rtpmanager/gstrtpclient.h:
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_base_init),
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_dispose), (gst_rtp_jitter_buffer_getcaps),
(gst_jitter_buffer_sink_setcaps), (free_func),
(gst_rtp_jitter_buffer_flush_start),
(gst_rtp_jitter_buffer_flush_stop),
(gst_rtp_jitter_buffer_src_activate_push),
(gst_rtp_jitter_buffer_change_state), (priv_compare_rtp_seq_lt),
(compare_rtp_buffers_seq_num), (gst_rtp_jitter_buffer_sink_event),
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop),
(gst_rtp_jitter_buffer_query),
(gst_rtp_jitter_buffer_set_property),
(gst_rtp_jitter_buffer_get_property):
* gst/rtpmanager/gstrtpjitterbuffer.h:
* gst/rtpmanager/gstrtpmanager.c: (plugin_init):
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_base_init),
(gst_rtp_pt_demux_class_init), (gst_rtp_pt_demux_init),
(gst_rtp_pt_demux_finalize), (gst_rtp_pt_demux_chain),
(gst_rtp_pt_demux_getcaps), (find_pad_for_pt),
(gst_rtp_pt_demux_setup), (gst_rtp_pt_demux_release),
(gst_rtp_pt_demux_change_state):
* gst/rtpmanager/gstrtpptdemux.h:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_base_init),
(gst_rtp_session_class_init), (gst_rtp_session_init),
(gst_rtp_session_finalize), (gst_rtp_session_set_property),
(gst_rtp_session_get_property), (gst_rtp_session_change_state),
(gst_rtp_session_chain_recv_rtp),
(gst_rtp_session_chain_recv_rtcp),
(gst_rtp_session_chain_send_rtp), (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink), (create_rtcp_src),
(gst_rtp_session_request_new_pad), (gst_rtp_session_release_pad):
* gst/rtpmanager/gstrtpsession.h:
Add RTP session management elements. Still in progress.
2007-04-03 09:13:17 +00:00
|
|
|
}
|