Lines Matching refs:rtpbin
416 static void remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session);
417 static void remove_recv_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session);
418 static void remove_recv_fec (GstRtpBin * rtpbin, GstRtpBinSession * session);
419 static void remove_send_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session);
420 static void remove_send_fec (GstRtpBin * rtpbin, GstRtpBinSession * session);
421 static void remove_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session);
424 static GstRtpBinSession *create_session (GstRtpBin * rtpbin, gint id);
425 static GstPad *complete_session_sink (GstRtpBin * rtpbin,
428 complete_session_receiver (GstRtpBin * rtpbin, GstRtpBinSession * session,
430 static GstPad *complete_session_rtcp (GstRtpBin * rtpbin,
556 find_session_by_id (GstRtpBin * rtpbin, gint id) in find_session_by_id() argument
560 for (walk = rtpbin->sessions; walk; walk = g_slist_next (walk)) { in find_session_by_id()
577 find_session_by_pad (GstRtpBin * rtpbin, GstPad * pad) in find_session_by_pad() argument
581 for (walk = rtpbin->sessions; walk; walk = g_slist_next (walk)) { in find_session_by_pad()
704 GstRtpBin *rtpbin; in ssrc_demux_pad_removed() local
706 rtpbin = session->bin; in ssrc_demux_pad_removed()
708 GST_RTP_BIN_LOCK (rtpbin); in ssrc_demux_pad_removed()
716 free_stream (stream, rtpbin); in ssrc_demux_pad_removed()
718 GST_RTP_BIN_UNLOCK (rtpbin); in ssrc_demux_pad_removed()
723 create_session (GstRtpBin * rtpbin, gint id) in create_session() argument
742 g_signal_emit (rtpbin, gst_rtp_bin_signals[SIGNAL_NEW_STORAGE], 0, storage, in create_session()
748 sess->bin = rtpbin; in create_session()
755 rtpbin->sessions = g_slist_prepend (rtpbin->sessions, sess); in create_session()
758 GST_OBJECT_LOCK (rtpbin); in create_session()
759 g_object_set (demux, "max-streams", rtpbin->max_streams, NULL); in create_session()
760 g_object_set (session, "sdes", rtpbin->sdes, "rtp-profile", in create_session()
761 rtpbin->rtp_profile, "rtcp-sync-send-time", rtpbin->rtcp_sync_send_time, in create_session()
763 if (rtpbin->use_pipeline_clock) in create_session()
764 g_object_set (session, "use-pipeline-clock", rtpbin->use_pipeline_clock, in create_session()
767 g_object_set (session, "ntp-time-source", rtpbin->ntp_time_source, NULL); in create_session()
769 g_object_set (session, "max-dropout-time", rtpbin->max_dropout_time, in create_session()
770 "max-misorder-time", rtpbin->max_misorder_time, NULL); in create_session()
771 GST_OBJECT_UNLOCK (rtpbin); in create_session()
799 gst_bin_add (GST_BIN_CAST (rtpbin), session); in create_session()
800 gst_bin_add (GST_BIN_CAST (rtpbin), demux); in create_session()
801 gst_bin_add (GST_BIN_CAST (rtpbin), storage); in create_session()
807 GST_OBJECT_LOCK (rtpbin); in create_session()
808 target = GST_STATE_TARGET (rtpbin); in create_session()
809 GST_OBJECT_UNLOCK (rtpbin); in create_session()
1015 gst_rtp_bin_reset_sync (GstRtpBin * rtpbin) in gst_rtp_bin_reset_sync() argument
1019 GST_DEBUG_OBJECT (rtpbin, "Reset sync on all clients"); in gst_rtp_bin_reset_sync()
1021 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_reset_sync()
1022 for (clients = rtpbin->clients; clients; clients = g_slist_next (clients)) { in gst_rtp_bin_reset_sync()
1037 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_reset_sync()
1799 GstRtpBin *rtpbin; in create_stream() local
1803 rtpbin = session->bin; in create_stream()
1805 if (g_slist_length (session->streams) >= rtpbin->max_streams) in create_stream()
1812 if (!rtpbin->ignore_pt) { in create_stream()
1819 stream->bin = rtpbin; in create_stream()
1847 g_object_set (buffer, "latency", rtpbin->latency_ms, NULL); in create_stream()
1850 g_object_set (buffer, "drop-on-latency", rtpbin->drop_on_latency, NULL); in create_stream()
1852 g_object_set (buffer, "do-lost", rtpbin->do_lost, NULL); in create_stream()
1854 g_object_set (buffer, "mode", rtpbin->buffer_mode, NULL); in create_stream()
1856 g_object_set (buffer, "do-retransmission", rtpbin->do_retransmission, NULL); in create_stream()
1859 rtpbin->max_rtcp_rtp_time_diff, NULL); in create_stream()
1861 g_object_set (buffer, "max-dropout-time", rtpbin->max_dropout_time, NULL); in create_stream()
1863 g_object_set (buffer, "max-misorder-time", rtpbin->max_misorder_time, NULL); in create_stream()
1865 g_object_set (buffer, "rfc7273-sync", rtpbin->rfc7273_sync, NULL); in create_stream()
1868 rtpbin->max_ts_offset_adjustment, NULL); in create_stream()
1870 g_signal_emit (rtpbin, gst_rtp_bin_signals[SIGNAL_NEW_JITTERBUFFER], 0, in create_stream()
1873 if (!rtpbin->ignore_pt) in create_stream()
1874 gst_bin_add (GST_BIN_CAST (rtpbin), demux); in create_stream()
1881 if (rtpbin->buffering) { in create_stream()
1885 GST_INFO_OBJECT (rtpbin, in create_stream()
1893 GST_OBJECT_LOCK (rtpbin); in create_stream()
1894 target = GST_STATE_TARGET (rtpbin); in create_stream()
1895 GST_OBJECT_UNLOCK (rtpbin); in create_stream()
1908 GST_WARNING_OBJECT (rtpbin, "stream exceeds maximum (%d)", in create_stream()
1909 rtpbin->max_streams); in create_stream()
2007 GST_ELEMENT_REGISTER_DEFINE (rtpbin, "rtpbin", GST_RANK_NONE, GST_TYPE_RTP_BIN);
2854 gst_rtp_bin_init (GstRtpBin * rtpbin) in gst_rtp_bin_init() argument
2858 rtpbin->priv = gst_rtp_bin_get_instance_private (rtpbin); in gst_rtp_bin_init()
2859 g_mutex_init (&rtpbin->priv->bin_lock); in gst_rtp_bin_init()
2860 g_mutex_init (&rtpbin->priv->dyn_lock); in gst_rtp_bin_init()
2862 rtpbin->latency_ms = DEFAULT_LATENCY_MS; in gst_rtp_bin_init()
2863 rtpbin->latency_ns = DEFAULT_LATENCY_MS * GST_MSECOND; in gst_rtp_bin_init()
2864 rtpbin->drop_on_latency = DEFAULT_DROP_ON_LATENCY; in gst_rtp_bin_init()
2865 rtpbin->do_lost = DEFAULT_DO_LOST; in gst_rtp_bin_init()
2866 rtpbin->ignore_pt = DEFAULT_IGNORE_PT; in gst_rtp_bin_init()
2867 rtpbin->ntp_sync = DEFAULT_NTP_SYNC; in gst_rtp_bin_init()
2868 rtpbin->rtcp_sync = DEFAULT_RTCP_SYNC; in gst_rtp_bin_init()
2869 rtpbin->rtcp_sync_interval = DEFAULT_RTCP_SYNC_INTERVAL; in gst_rtp_bin_init()
2870 rtpbin->priv->autoremove = DEFAULT_AUTOREMOVE; in gst_rtp_bin_init()
2871 rtpbin->buffer_mode = DEFAULT_BUFFER_MODE; in gst_rtp_bin_init()
2872 rtpbin->use_pipeline_clock = DEFAULT_USE_PIPELINE_CLOCK; in gst_rtp_bin_init()
2873 rtpbin->send_sync_event = DEFAULT_DO_SYNC_EVENT; in gst_rtp_bin_init()
2874 rtpbin->do_retransmission = DEFAULT_DO_RETRANSMISSION; in gst_rtp_bin_init()
2875 rtpbin->rtp_profile = DEFAULT_RTP_PROFILE; in gst_rtp_bin_init()
2876 rtpbin->ntp_time_source = DEFAULT_NTP_TIME_SOURCE; in gst_rtp_bin_init()
2877 rtpbin->rtcp_sync_send_time = DEFAULT_RTCP_SYNC_SEND_TIME; in gst_rtp_bin_init()
2878 rtpbin->max_rtcp_rtp_time_diff = DEFAULT_MAX_RTCP_RTP_TIME_DIFF; in gst_rtp_bin_init()
2879 rtpbin->max_dropout_time = DEFAULT_MAX_DROPOUT_TIME; in gst_rtp_bin_init()
2880 rtpbin->max_misorder_time = DEFAULT_MAX_MISORDER_TIME; in gst_rtp_bin_init()
2881 rtpbin->rfc7273_sync = DEFAULT_RFC7273_SYNC; in gst_rtp_bin_init()
2882 rtpbin->max_streams = DEFAULT_MAX_STREAMS; in gst_rtp_bin_init()
2883 rtpbin->max_ts_offset_adjustment = DEFAULT_MAX_TS_OFFSET_ADJUSTMENT; in gst_rtp_bin_init()
2884 rtpbin->max_ts_offset = DEFAULT_MAX_TS_OFFSET; in gst_rtp_bin_init()
2885 rtpbin->max_ts_offset_is_set = FALSE; in gst_rtp_bin_init()
2889 rtpbin->sdes = gst_structure_new ("application/x-rtp-source-sdes", in gst_rtp_bin_init()
2891 rtpbin->fec_decoders = in gst_rtp_bin_init()
2893 rtpbin->fec_encoders = in gst_rtp_bin_init()
2901 GstRtpBin *rtpbin; in gst_rtp_bin_dispose() local
2903 rtpbin = GST_RTP_BIN (object); in gst_rtp_bin_dispose()
2905 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_dispose()
2907 g_slist_foreach (rtpbin->sessions, (GFunc) free_session, rtpbin); in gst_rtp_bin_dispose()
2908 g_slist_free (rtpbin->sessions); in gst_rtp_bin_dispose()
2909 rtpbin->sessions = NULL; in gst_rtp_bin_dispose()
2910 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_dispose()
2918 GstRtpBin *rtpbin; in gst_rtp_bin_finalize() local
2920 rtpbin = GST_RTP_BIN (object); in gst_rtp_bin_finalize()
2922 if (rtpbin->sdes) in gst_rtp_bin_finalize()
2923 gst_structure_free (rtpbin->sdes); in gst_rtp_bin_finalize()
2925 if (rtpbin->fec_decoders) in gst_rtp_bin_finalize()
2926 gst_structure_free (rtpbin->fec_decoders); in gst_rtp_bin_finalize()
2928 if (rtpbin->fec_encoders) in gst_rtp_bin_finalize()
2929 gst_structure_free (rtpbin->fec_encoders); in gst_rtp_bin_finalize()
2931 g_mutex_clear (&rtpbin->priv->bin_lock); in gst_rtp_bin_finalize()
2932 g_mutex_clear (&rtpbin->priv->dyn_lock); in gst_rtp_bin_finalize()
3041 GstRtpBin *rtpbin; in gst_rtp_bin_set_property() local
3043 rtpbin = GST_RTP_BIN (object); in gst_rtp_bin_set_property()
3047 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_set_property()
3048 rtpbin->latency_ms = g_value_get_uint (value); in gst_rtp_bin_set_property()
3049 rtpbin->latency_ns = rtpbin->latency_ms * GST_MSECOND; in gst_rtp_bin_set_property()
3050 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_set_property()
3052 gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, "latency", value); in gst_rtp_bin_set_property()
3055 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_set_property()
3056 rtpbin->drop_on_latency = g_value_get_boolean (value); in gst_rtp_bin_set_property()
3057 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_set_property()
3059 gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, in gst_rtp_bin_set_property()
3063 gst_rtp_bin_set_sdes_struct (rtpbin, g_value_get_boxed (value)); in gst_rtp_bin_set_property()
3066 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_set_property()
3067 rtpbin->do_lost = g_value_get_boolean (value); in gst_rtp_bin_set_property()
3068 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_set_property()
3069 gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, "do-lost", value); in gst_rtp_bin_set_property()
3072 rtpbin->ntp_sync = g_value_get_boolean (value); in gst_rtp_bin_set_property()
3075 if (!rtpbin->max_ts_offset_is_set) { in gst_rtp_bin_set_property()
3076 if (rtpbin->ntp_sync) { in gst_rtp_bin_set_property()
3077 rtpbin->max_ts_offset = 0; in gst_rtp_bin_set_property()
3079 rtpbin->max_ts_offset = DEFAULT_MAX_TS_OFFSET; in gst_rtp_bin_set_property()
3084 g_atomic_int_set (&rtpbin->rtcp_sync, g_value_get_enum (value)); in gst_rtp_bin_set_property()
3087 rtpbin->rtcp_sync_interval = g_value_get_uint (value); in gst_rtp_bin_set_property()
3090 rtpbin->ignore_pt = g_value_get_boolean (value); in gst_rtp_bin_set_property()
3093 rtpbin->priv->autoremove = g_value_get_boolean (value); in gst_rtp_bin_set_property()
3098 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_set_property()
3099 rtpbin->use_pipeline_clock = g_value_get_boolean (value); in gst_rtp_bin_set_property()
3100 for (sessions = rtpbin->sessions; sessions; in gst_rtp_bin_set_property()
3105 "use-pipeline-clock", rtpbin->use_pipeline_clock, NULL); in gst_rtp_bin_set_property()
3107 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_set_property()
3111 rtpbin->send_sync_event = g_value_get_boolean (value); in gst_rtp_bin_set_property()
3114 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_set_property()
3115 rtpbin->buffer_mode = g_value_get_enum (value); in gst_rtp_bin_set_property()
3116 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_set_property()
3118 gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, "mode", value); in gst_rtp_bin_set_property()
3121 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_set_property()
3122 rtpbin->do_retransmission = g_value_get_boolean (value); in gst_rtp_bin_set_property()
3123 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_set_property()
3124 gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, in gst_rtp_bin_set_property()
3128 rtpbin->rtp_profile = g_value_get_enum (value); in gst_rtp_bin_set_property()
3132 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_set_property()
3133 rtpbin->ntp_time_source = g_value_get_enum (value); in gst_rtp_bin_set_property()
3134 for (sessions = rtpbin->sessions; sessions; in gst_rtp_bin_set_property()
3139 "ntp-time-source", rtpbin->ntp_time_source, NULL); in gst_rtp_bin_set_property()
3141 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_set_property()
3146 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_set_property()
3147 rtpbin->rtcp_sync_send_time = g_value_get_boolean (value); in gst_rtp_bin_set_property()
3148 for (sessions = rtpbin->sessions; sessions; in gst_rtp_bin_set_property()
3153 "rtcp-sync-send-time", rtpbin->rtcp_sync_send_time, NULL); in gst_rtp_bin_set_property()
3155 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_set_property()
3159 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_set_property()
3160 rtpbin->max_rtcp_rtp_time_diff = g_value_get_int (value); in gst_rtp_bin_set_property()
3161 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_set_property()
3162 gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, in gst_rtp_bin_set_property()
3166 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_set_property()
3167 rtpbin->max_dropout_time = g_value_get_uint (value); in gst_rtp_bin_set_property()
3168 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_set_property()
3169 gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, in gst_rtp_bin_set_property()
3171 gst_rtp_bin_propagate_property_to_session (rtpbin, "max-dropout-time", in gst_rtp_bin_set_property()
3175 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_set_property()
3176 rtpbin->max_misorder_time = g_value_get_uint (value); in gst_rtp_bin_set_property()
3177 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_set_property()
3178 gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, in gst_rtp_bin_set_property()
3180 gst_rtp_bin_propagate_property_to_session (rtpbin, "max-misorder-time", in gst_rtp_bin_set_property()
3184 rtpbin->rfc7273_sync = g_value_get_boolean (value); in gst_rtp_bin_set_property()
3185 gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, in gst_rtp_bin_set_property()
3189 rtpbin->max_streams = g_value_get_uint (value); in gst_rtp_bin_set_property()
3192 rtpbin->max_ts_offset_adjustment = g_value_get_uint64 (value); in gst_rtp_bin_set_property()
3193 gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, in gst_rtp_bin_set_property()
3197 rtpbin->max_ts_offset = g_value_get_int64 (value); in gst_rtp_bin_set_property()
3198 rtpbin->max_ts_offset_is_set = TRUE; in gst_rtp_bin_set_property()
3201 gst_rtp_bin_set_fec_decoders_struct (rtpbin, g_value_get_boxed (value)); in gst_rtp_bin_set_property()
3204 gst_rtp_bin_set_fec_encoders_struct (rtpbin, g_value_get_boxed (value)); in gst_rtp_bin_set_property()
3216 GstRtpBin *rtpbin; in gst_rtp_bin_get_property() local
3218 rtpbin = GST_RTP_BIN (object); in gst_rtp_bin_get_property()
3222 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_get_property()
3223 g_value_set_uint (value, rtpbin->latency_ms); in gst_rtp_bin_get_property()
3224 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_get_property()
3227 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_get_property()
3228 g_value_set_boolean (value, rtpbin->drop_on_latency); in gst_rtp_bin_get_property()
3229 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_get_property()
3232 g_value_take_boxed (value, gst_rtp_bin_get_sdes_struct (rtpbin)); in gst_rtp_bin_get_property()
3235 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_get_property()
3236 g_value_set_boolean (value, rtpbin->do_lost); in gst_rtp_bin_get_property()
3237 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_get_property()
3240 g_value_set_boolean (value, rtpbin->ignore_pt); in gst_rtp_bin_get_property()
3243 g_value_set_boolean (value, rtpbin->ntp_sync); in gst_rtp_bin_get_property()
3246 g_value_set_enum (value, g_atomic_int_get (&rtpbin->rtcp_sync)); in gst_rtp_bin_get_property()
3249 g_value_set_uint (value, rtpbin->rtcp_sync_interval); in gst_rtp_bin_get_property()
3252 g_value_set_boolean (value, rtpbin->priv->autoremove); in gst_rtp_bin_get_property()
3255 g_value_set_enum (value, rtpbin->buffer_mode); in gst_rtp_bin_get_property()
3258 g_value_set_boolean (value, rtpbin->use_pipeline_clock); in gst_rtp_bin_get_property()
3261 g_value_set_boolean (value, rtpbin->send_sync_event); in gst_rtp_bin_get_property()
3264 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_get_property()
3265 g_value_set_boolean (value, rtpbin->do_retransmission); in gst_rtp_bin_get_property()
3266 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_get_property()
3269 g_value_set_enum (value, rtpbin->rtp_profile); in gst_rtp_bin_get_property()
3272 g_value_set_enum (value, rtpbin->ntp_time_source); in gst_rtp_bin_get_property()
3275 g_value_set_boolean (value, rtpbin->rtcp_sync_send_time); in gst_rtp_bin_get_property()
3278 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_get_property()
3279 g_value_set_int (value, rtpbin->max_rtcp_rtp_time_diff); in gst_rtp_bin_get_property()
3280 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_get_property()
3283 g_value_set_uint (value, rtpbin->max_dropout_time); in gst_rtp_bin_get_property()
3286 g_value_set_uint (value, rtpbin->max_misorder_time); in gst_rtp_bin_get_property()
3289 g_value_set_boolean (value, rtpbin->rfc7273_sync); in gst_rtp_bin_get_property()
3292 g_value_set_uint (value, rtpbin->max_streams); in gst_rtp_bin_get_property()
3295 g_value_set_uint64 (value, rtpbin->max_ts_offset_adjustment); in gst_rtp_bin_get_property()
3298 g_value_set_int64 (value, rtpbin->max_ts_offset); in gst_rtp_bin_get_property()
3301 g_value_take_boxed (value, gst_rtp_bin_get_fec_decoders_struct (rtpbin)); in gst_rtp_bin_get_property()
3304 g_value_take_boxed (value, gst_rtp_bin_get_fec_encoders_struct (rtpbin)); in gst_rtp_bin_get_property()
3315 GstRtpBin *rtpbin; in gst_rtp_bin_handle_message() local
3317 rtpbin = GST_RTP_BIN (bin); in gst_rtp_bin_handle_message()
3366 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_handle_message()
3371 for (sessions = rtpbin->sessions; sessions; in gst_rtp_bin_handle_message()
3397 if (rtpbin->buffering) { in gst_rtp_bin_handle_message()
3399 rtpbin->buffering = FALSE; in gst_rtp_bin_handle_message()
3406 rtpbin->buffering = TRUE; in gst_rtp_bin_handle_message()
3411 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_handle_message()
3440 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_handle_message()
3446 if (running_time > rtpbin->buffer_start) { in gst_rtp_bin_handle_message()
3447 offset = running_time - rtpbin->buffer_start; in gst_rtp_bin_handle_message()
3448 if (offset >= rtpbin->latency_ns) in gst_rtp_bin_handle_message()
3449 offset -= rtpbin->latency_ns; in gst_rtp_bin_handle_message()
3457 for (sessions = rtpbin->sessions; sessions; in gst_rtp_bin_handle_message()
3495 rtpbin->buffer_start = min_out_time; in gst_rtp_bin_handle_message()
3497 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_handle_message()
3515 GstRtpBin *rtpbin; in gst_rtp_bin_change_state() local
3518 rtpbin = GST_RTP_BIN (element); in gst_rtp_bin_change_state()
3519 priv = rtpbin->priv; in gst_rtp_bin_change_state()
3526 GST_LOG_OBJECT (rtpbin, "clearing shutdown flag"); in gst_rtp_bin_change_state()
3530 GST_LOG_OBJECT (rtpbin, "setting shutdown flag"); in gst_rtp_bin_change_state()
3534 GST_RTP_BIN_DYN_LOCK (rtpbin); in gst_rtp_bin_change_state()
3535 GST_LOG_OBJECT (rtpbin, "dynamic lock taken, we can continue shutdown"); in gst_rtp_bin_change_state()
3536 GST_RTP_BIN_DYN_UNLOCK (rtpbin); in gst_rtp_bin_change_state()
3619 ensure_early_fec_decoder (GstRtpBin * rtpbin, GstRtpBinSession * session) in ensure_early_fec_decoder() argument
3628 factory = gst_structure_get_string (rtpbin->fec_decoders, sess_id_str); in ensure_early_fec_decoder()
3640 GST_ERROR_OBJECT (rtpbin, "Failed to build decoder from factory: %s", in ensure_early_fec_decoder()
3647 GST_INFO_OBJECT (rtpbin, "Built FEC decoder: %" GST_PTR_FORMAT in ensure_early_fec_decoder()
3659 expose_recv_src_pad (GstRtpBin * rtpbin, GstPad * pad, GstRtpBinStream * stream, in expose_recv_src_pad() argument
3709 GST_RTP_BIN_SHUTDOWN_LOCK (rtpbin, shutdown); in expose_recv_src_pad()
3712 klass = GST_ELEMENT_GET_CLASS (rtpbin); in expose_recv_src_pad()
3721 GST_RTP_BIN_SHUTDOWN_UNLOCK (rtpbin); in expose_recv_src_pad()
3724 gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), gpad); in expose_recv_src_pad()
3762 GstRtpBin *rtpbin; in new_payload_found() local
3764 rtpbin = stream->bin; in new_payload_found()
3766 GST_DEBUG_OBJECT (rtpbin, "new payload pad %u", pt); in new_payload_found()
3768 expose_recv_src_pad (rtpbin, pad, stream, pt); in new_payload_found()
3775 GstRtpBin *rtpbin; in payload_pad_removed() local
3778 rtpbin = stream->bin; in payload_pad_removed()
3782 GST_RTP_BIN_DYN_LOCK (rtpbin); in payload_pad_removed()
3787 gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), gpad); in payload_pad_removed()
3789 GST_RTP_BIN_DYN_UNLOCK (rtpbin); in payload_pad_removed()
3795 GstRtpBin *rtpbin; in pt_map_requested() local
3798 rtpbin = session->bin; in pt_map_requested()
3800 GST_DEBUG_OBJECT (rtpbin, "payload map requested for pt %u in session %u", pt, in pt_map_requested()
3812 GST_DEBUG_OBJECT (rtpbin, "could not get caps"); in pt_map_requested()
3895 GstRtpBin *rtpbin; in new_ssrc_pad_found() local
3900 rtpbin = session->bin; in new_ssrc_pad_found()
3902 GST_DEBUG_OBJECT (rtpbin, "new SSRC pad %08x, %s:%s", ssrc, in new_ssrc_pad_found()
3905 GST_RTP_BIN_SHUTDOWN_LOCK (rtpbin, shutdown); in new_ssrc_pad_found()
3915 GST_DEBUG_OBJECT (rtpbin, "linking jitterbuffer RTP"); in new_ssrc_pad_found()
3921 GST_DEBUG_OBJECT (rtpbin, "linking fec decoder"); in new_ssrc_pad_found()
3936 GST_DEBUG_OBJECT (rtpbin, "linking jitterbuffer RTCP"); in new_ssrc_pad_found()
3947 GST_DEBUG_OBJECT (rtpbin, "connecting sync signal"); in new_ssrc_pad_found()
3970 GST_RTP_BIN_SHUTDOWN_UNLOCK (rtpbin); in new_ssrc_pad_found()
3978 GST_RTP_BIN_SHUTDOWN_UNLOCK (rtpbin); in new_ssrc_pad_found()
3980 expose_recv_src_pad (rtpbin, pad, stream, 255); in new_ssrc_pad_found()
3990 GST_DEBUG_OBJECT (rtpbin, "we are shutting down"); in new_ssrc_pad_found()
3996 GST_RTP_BIN_SHUTDOWN_UNLOCK (rtpbin); in new_ssrc_pad_found()
3997 GST_DEBUG_OBJECT (rtpbin, "could not create stream"); in new_ssrc_pad_found()
4003 complete_session_sink (GstRtpBin * rtpbin, GstRtpBinSession * session) in complete_session_sink() argument
4020 GST_DEBUG_OBJECT (rtpbin, "requesting RTP decoder"); in complete_session_sink()
4026 GST_DEBUG_OBJECT (rtpbin, "linking RTP decoder"); in complete_session_sink()
4045 GST_DEBUG_OBJECT (rtpbin, "no RTP decoder given"); in complete_session_sink()
4077 complete_session_receiver (GstRtpBin * rtpbin, GstRtpBinSession * session, in complete_session_receiver() argument
4097 GST_DEBUG_OBJECT (rtpbin, "linking AUX receiver"); in complete_session_receiver()
4137 GST_DEBUG_OBJECT (rtpbin, "getting demuxer RTP sink pad"); in complete_session_receiver()
4139 GST_DEBUG_OBJECT (rtpbin, "linking demuxer RTP sink pad"); in complete_session_receiver()
4179 create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) in create_recv_rtp() argument
4189 GST_DEBUG_OBJECT (rtpbin, "finding session %u", sessid); in create_recv_rtp()
4192 session = find_session_by_id (rtpbin, sessid); in create_recv_rtp()
4194 GST_DEBUG_OBJECT (rtpbin, "creating session %u", sessid); in create_recv_rtp()
4196 session = create_session (rtpbin, sessid); in create_recv_rtp()
4206 recv_rtp_sink = complete_session_sink (rtpbin, session); in create_recv_rtp()
4210 GST_DEBUG_OBJECT (rtpbin, "ghosting session sink pad"); in create_recv_rtp()
4215 complete_session_receiver (rtpbin, session, sessid); in create_recv_rtp()
4239 remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session) in remove_recv_rtp() argument
4260 gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), in remove_recv_rtp()
4267 complete_session_fec (GstRtpBin * rtpbin, GstRtpBinSession * session, in complete_session_fec() argument
4273 if (!ensure_early_fec_decoder (rtpbin, session)) in complete_session_fec()
4276 GST_DEBUG_OBJECT (rtpbin, "getting FEC sink pad"); in complete_session_fec()
4302 complete_session_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, in complete_session_rtcp() argument
4310 GST_DEBUG_OBJECT (rtpbin, "getting RTCP sink pad"); in complete_session_rtcp()
4316 GST_DEBUG_OBJECT (rtpbin, "getting RTCP decoder"); in complete_session_rtcp()
4322 GST_DEBUG_OBJECT (rtpbin, "linking RTCP decoder"); in complete_session_rtcp()
4339 GST_DEBUG_OBJECT (rtpbin, "no RTCP decoder given"); in complete_session_rtcp()
4344 GST_DEBUG_OBJECT (rtpbin, "getting sync src pad"); in complete_session_rtcp()
4349 GST_DEBUG_OBJECT (rtpbin, "getting demuxer RTCP sink pad"); in complete_session_rtcp()
4390 create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ, in create_recv_rtcp() argument
4401 GST_DEBUG_OBJECT (rtpbin, "finding session %u", sessid); in create_recv_rtcp()
4404 session = find_session_by_id (rtpbin, sessid); in create_recv_rtcp()
4406 GST_DEBUG_OBJECT (rtpbin, "creating session %u", sessid); in create_recv_rtcp()
4408 session = create_session (rtpbin, sessid); in create_recv_rtcp()
4417 decsink = complete_session_rtcp (rtpbin, session, sessid); in create_recv_rtcp()
4442 create_recv_fec (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) in create_recv_fec() argument
4457 GST_DEBUG_OBJECT (rtpbin, "finding session %u", sessid); in create_recv_fec()
4460 session = find_session_by_id (rtpbin, sessid); in create_recv_fec()
4462 GST_DEBUG_OBJECT (rtpbin, "creating session %u", sessid); in create_recv_fec()
4464 session = create_session (rtpbin, sessid); in create_recv_fec()
4469 decsink = complete_session_fec (rtpbin, session, fec_idx); in create_recv_fec()
4500 remove_recv_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session) in remove_recv_rtcp() argument
4504 gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), in remove_recv_rtcp()
4521 remove_recv_fec_for_pad (GstRtpBin * rtpbin, GstRtpBinSession * session, in remove_recv_fec_for_pad() argument
4545 gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), ghost); in remove_recv_fec_for_pad()
4549 remove_recv_fec (GstRtpBin * rtpbin, GstRtpBinSession * session) in remove_recv_fec() argument
4557 remove_recv_fec_for_pad (rtpbin, session, (GstPad *) tmp->data); in remove_recv_fec()
4564 complete_session_src (GstRtpBin * rtpbin, GstRtpBinSession * session) in complete_session_src() argument
4580 GST_DEBUG_OBJECT (rtpbin, "getting RTP encoder"); in complete_session_src()
4587 GST_DEBUG_OBJECT (rtpbin, "linking RTP encoder"); in complete_session_src()
4610 GST_DEBUG_OBJECT (rtpbin, "no RTP encoder given"); in complete_session_src()
4614 klass = GST_ELEMENT_GET_CLASS (rtpbin); in complete_session_src()
4622 gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), session->send_rtp_src_ghost); in complete_session_src()
4666 GstRtpBin *rtpbin = session->bin; in setup_aux_sender_fold() local
4677 newsess = find_session_by_id (rtpbin, sessid); in setup_aux_sender_fold()
4680 newsess = create_session (rtpbin, sessid); in setup_aux_sender_fold()
4696 if (!complete_session_src (rtpbin, newsess)) in setup_aux_sender_fold()
4715 GST_DEBUG_OBJECT (rtpbin, in setup_aux_sender_fold()
4737 setup_aux_sender (GstRtpBin * rtpbin, GstRtpBinSession * session, in setup_aux_sender() argument
4789 request_fec_encoder (GstRtpBin * rtpbin, GstRtpBinSession * session, in request_fec_encoder() argument
4797 factory = gst_structure_get_string (rtpbin->fec_encoders, sess_id_str); in request_fec_encoder()
4809 GST_ERROR_OBJECT (rtpbin, "Failed to build encoder from factory: %s", in request_fec_encoder()
4816 GST_INFO_OBJECT (rtpbin, "Built FEC encoder: %" GST_PTR_FORMAT in request_fec_encoder()
4837 create_send_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) in create_send_rtp() argument
4852 session = find_session_by_id (rtpbin, sessid); in create_send_rtp()
4855 session = create_session (rtpbin, sessid); in create_send_rtp()
4868 encoder = request_fec_encoder (rtpbin, session, sessid); in create_send_rtp()
4871 GST_DEBUG_OBJECT (rtpbin, "Linking FEC encoder"); in create_send_rtp()
4881 GST_DEBUG_OBJECT (rtpbin, "getting RTP AUX sender"); in create_send_rtp()
4885 GST_DEBUG_OBJECT (rtpbin, "linking AUX sender"); in create_send_rtp()
4886 if (!setup_aux_sender (rtpbin, session, aux)) in create_send_rtp()
4917 if (!complete_session_src (rtpbin, session)) in create_send_rtp()
4997 remove_send_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session) in remove_send_rtp() argument
5001 gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), in remove_send_rtp()
5013 gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), in remove_send_rtp()
5020 remove_send_fec (GstRtpBin * rtpbin, GstRtpBinSession * session) in remove_send_fec() argument
5027 gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), ghost); in remove_send_fec()
5038 create_send_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ, in create_send_rtcp() argument
5051 session = find_session_by_id (rtpbin, sessid); in create_send_rtcp()
5053 GST_DEBUG_OBJECT (rtpbin, "creating session %u", sessid); in create_send_rtcp()
5055 session = create_session (rtpbin, sessid); in create_send_rtcp()
5070 GST_DEBUG_OBJECT (rtpbin, "getting RTCP encoder"); in create_send_rtcp()
5077 GST_DEBUG_OBJECT (rtpbin, "linking RTCP encoder"); in create_send_rtcp()
5097 GST_DEBUG_OBJECT (rtpbin, "no RTCP encoder given"); in create_send_rtcp()
5144 remove_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session) in remove_rtcp() argument
5148 gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), in remove_rtcp()
5223 GstRtpBin *rtpbin; in gst_rtp_bin_request_new_pad() local
5232 rtpbin = GST_RTP_BIN (element); in gst_rtp_bin_request_new_pad()
5235 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_request_new_pad()
5245 GST_DEBUG_OBJECT (rtpbin, "Trying to request a pad with name %s", pad_name); in gst_rtp_bin_request_new_pad()
5249 result = create_recv_rtp (rtpbin, templ, pad_name); in gst_rtp_bin_request_new_pad()
5252 result = create_recv_rtcp (rtpbin, templ, pad_name); in gst_rtp_bin_request_new_pad()
5255 result = create_send_rtp (rtpbin, templ, pad_name); in gst_rtp_bin_request_new_pad()
5258 result = create_send_rtcp (rtpbin, templ, pad_name); in gst_rtp_bin_request_new_pad()
5261 result = create_recv_fec (rtpbin, templ, pad_name); in gst_rtp_bin_request_new_pad()
5266 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_request_new_pad()
5270 gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), result); in gst_rtp_bin_request_new_pad()
5279 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_request_new_pad()
5289 GstRtpBin *rtpbin; in gst_rtp_bin_release_pad() local
5294 rtpbin = GST_RTP_BIN (element); in gst_rtp_bin_release_pad()
5296 GST_RTP_BIN_LOCK (rtpbin); in gst_rtp_bin_release_pad()
5297 GST_DEBUG_OBJECT (rtpbin, "Trying to release pad %s:%s", in gst_rtp_bin_release_pad()
5300 if (!(session = find_session_by_pad (rtpbin, pad))) in gst_rtp_bin_release_pad()
5304 remove_recv_rtp (rtpbin, session); in gst_rtp_bin_release_pad()
5306 remove_recv_rtcp (rtpbin, session); in gst_rtp_bin_release_pad()
5308 remove_send_rtp (rtpbin, session); in gst_rtp_bin_release_pad()
5310 remove_rtcp (rtpbin, session); in gst_rtp_bin_release_pad()
5312 remove_recv_fec_for_pad (rtpbin, session, pad); in gst_rtp_bin_release_pad()
5321 GST_DEBUG_OBJECT (rtpbin, "no more pads for session %p", session); in gst_rtp_bin_release_pad()
5322 rtpbin->sessions = g_slist_remove (rtpbin->sessions, session); in gst_rtp_bin_release_pad()
5323 free_session (session, rtpbin); in gst_rtp_bin_release_pad()
5325 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_release_pad()
5332 GST_RTP_BIN_UNLOCK (rtpbin); in gst_rtp_bin_release_pad()