Lines Matching refs:demux
125 static void gst_rtp_ssrc_demux_clear_ssrc (GstRtpSsrcDemux * demux,
164 find_demux_pads_for_ssrc (GstRtpSsrcDemux * demux, guint32 ssrc) in find_demux_pads_for_ssrc() argument
168 for (walk = demux->srcpads; walk; walk = g_slist_next (walk)) { in find_demux_pads_for_ssrc()
179 get_demux_pad_for_ssrc (GstRtpSsrcDemux * demux, guint32 ssrc, PadType padtype) in get_demux_pad_for_ssrc() argument
184 GST_OBJECT_LOCK (demux); in get_demux_pad_for_ssrc()
186 dpads = find_demux_pads_for_ssrc (demux, ssrc); in get_demux_pad_for_ssrc()
188 GST_OBJECT_UNLOCK (demux); in get_demux_pad_for_ssrc()
204 GST_OBJECT_UNLOCK (demux); in get_demux_pad_for_ssrc()
257 forward_initial_events (GstRtpSsrcDemux * demux, guint32 ssrc, GstPad * pad, in forward_initial_events() argument
264 sinkpad = demux->rtp_sink; in forward_initial_events()
266 sinkpad = demux->rtcp_sink; in forward_initial_events()
278 find_or_create_demux_pad_for_ssrc (GstRtpSsrcDemux * demux, guint32 ssrc, in find_or_create_demux_pad_for_ssrc() argument
289 INTERNAL_STREAM_LOCK (demux); in find_or_create_demux_pad_for_ssrc()
291 retpad = get_demux_pad_for_ssrc (demux, ssrc, padtype); in find_or_create_demux_pad_for_ssrc()
293 INTERNAL_STREAM_UNLOCK (demux); in find_or_create_demux_pad_for_ssrc()
298 num_streams = (GST_ELEMENT_CAST (demux)->numsrcpads) >> 1; in find_or_create_demux_pad_for_ssrc()
299 if (num_streams >= demux->max_streams) { in find_or_create_demux_pad_for_ssrc()
300 INTERNAL_STREAM_UNLOCK (demux); in find_or_create_demux_pad_for_ssrc()
304 GST_DEBUG_OBJECT (demux, "creating new pad for SSRC %08x", ssrc); in find_or_create_demux_pad_for_ssrc()
306 klass = GST_ELEMENT_GET_CLASS (demux); in find_or_create_demux_pad_for_ssrc()
323 GST_OBJECT_LOCK (demux); in find_or_create_demux_pad_for_ssrc()
324 demux->srcpads = g_slist_prepend (demux->srcpads, dpads); in find_or_create_demux_pad_for_ssrc()
325 GST_OBJECT_UNLOCK (demux); in find_or_create_demux_pad_for_ssrc()
340 gst_element_add_pad (GST_ELEMENT_CAST (demux), rtp_pad); in find_or_create_demux_pad_for_ssrc()
341 gst_element_add_pad (GST_ELEMENT_CAST (demux), rtcp_pad); in find_or_create_demux_pad_for_ssrc()
355 g_signal_emit (G_OBJECT (demux), in find_or_create_demux_pad_for_ssrc()
358 INTERNAL_STREAM_UNLOCK (demux); in find_or_create_demux_pad_for_ssrc()
367 GstRtpSsrcDemux *demux; in gst_rtp_ssrc_demux_set_property() local
369 demux = GST_RTP_SSRC_DEMUX (object); in gst_rtp_ssrc_demux_set_property()
372 demux->max_streams = g_value_get_uint (value); in gst_rtp_ssrc_demux_set_property()
384 GstRtpSsrcDemux *demux; in gst_rtp_ssrc_demux_get_property() local
386 demux = GST_RTP_SSRC_DEMUX (object); in gst_rtp_ssrc_demux_get_property()
389 g_value_set_uint (value, demux->max_streams); in gst_rtp_ssrc_demux_get_property()
487 gst_rtp_ssrc_demux_init (GstRtpSsrcDemux * demux) in gst_rtp_ssrc_demux_init() argument
489 GstElementClass *klass = GST_ELEMENT_GET_CLASS (demux); in gst_rtp_ssrc_demux_init()
491 demux->rtp_sink = in gst_rtp_ssrc_demux_init()
494 gst_pad_set_chain_function (demux->rtp_sink, gst_rtp_ssrc_demux_chain); in gst_rtp_ssrc_demux_init()
495 gst_pad_set_event_function (demux->rtp_sink, gst_rtp_ssrc_demux_sink_event); in gst_rtp_ssrc_demux_init()
496 gst_pad_set_iterate_internal_links_function (demux->rtp_sink, in gst_rtp_ssrc_demux_init()
498 gst_element_add_pad (GST_ELEMENT_CAST (demux), demux->rtp_sink); in gst_rtp_ssrc_demux_init()
500 demux->rtcp_sink = in gst_rtp_ssrc_demux_init()
503 gst_pad_set_chain_function (demux->rtcp_sink, gst_rtp_ssrc_demux_rtcp_chain); in gst_rtp_ssrc_demux_init()
504 gst_pad_set_event_function (demux->rtcp_sink, gst_rtp_ssrc_demux_sink_event); in gst_rtp_ssrc_demux_init()
505 gst_pad_set_iterate_internal_links_function (demux->rtcp_sink, in gst_rtp_ssrc_demux_init()
507 gst_element_add_pad (GST_ELEMENT_CAST (demux), demux->rtcp_sink); in gst_rtp_ssrc_demux_init()
509 demux->max_streams = DEFAULT_MAX_STREAMS; in gst_rtp_ssrc_demux_init()
511 g_rec_mutex_init (&demux->padlock); in gst_rtp_ssrc_demux_init()
527 gst_rtp_ssrc_demux_reset (GstRtpSsrcDemux * demux) in gst_rtp_ssrc_demux_reset() argument
529 g_slist_free_full (demux->srcpads, in gst_rtp_ssrc_demux_reset()
531 demux->srcpads = NULL; in gst_rtp_ssrc_demux_reset()
537 GstRtpSsrcDemux *demux; in gst_rtp_ssrc_demux_dispose() local
539 demux = GST_RTP_SSRC_DEMUX (object); in gst_rtp_ssrc_demux_dispose()
541 gst_rtp_ssrc_demux_reset (demux); in gst_rtp_ssrc_demux_dispose()
549 GstRtpSsrcDemux *demux; in gst_rtp_ssrc_demux_finalize() local
551 demux = GST_RTP_SSRC_DEMUX (object); in gst_rtp_ssrc_demux_finalize()
552 g_rec_mutex_clear (&demux->padlock); in gst_rtp_ssrc_demux_finalize()
558 gst_rtp_ssrc_demux_clear_ssrc (GstRtpSsrcDemux * demux, guint32 ssrc) in gst_rtp_ssrc_demux_clear_ssrc() argument
562 GST_OBJECT_LOCK (demux); in gst_rtp_ssrc_demux_clear_ssrc()
563 dpads = find_demux_pads_for_ssrc (demux, ssrc); in gst_rtp_ssrc_demux_clear_ssrc()
565 GST_OBJECT_UNLOCK (demux); in gst_rtp_ssrc_demux_clear_ssrc()
569 GST_DEBUG_OBJECT (demux, "clearing pad for SSRC %08x", ssrc); in gst_rtp_ssrc_demux_clear_ssrc()
571 demux->srcpads = g_slist_remove (demux->srcpads, dpads); in gst_rtp_ssrc_demux_clear_ssrc()
572 GST_OBJECT_UNLOCK (demux); in gst_rtp_ssrc_demux_clear_ssrc()
574 g_signal_emit (G_OBJECT (demux), in gst_rtp_ssrc_demux_clear_ssrc()
585 GST_WARNING_OBJECT (demux, "unknown SSRC %08x", ssrc); in gst_rtp_ssrc_demux_clear_ssrc()
592 GstRtpSsrcDemux *demux; member
612 GST_OBJECT_LOCK (fdata->demux); in forward_event()
613 for (walk = fdata->demux->srcpads; walk; walk = walk->next) { in forward_event()
621 GST_OBJECT_UNLOCK (fdata->demux); in forward_event()
634 GstRtpSsrcDemux *demux; in gst_rtp_ssrc_demux_sink_event() local
637 demux = GST_RTP_SSRC_DEMUX (parent); in gst_rtp_ssrc_demux_sink_event()
639 fdata.demux = demux; in gst_rtp_ssrc_demux_sink_event()
655 GstRtpSsrcDemux *demux; in gst_rtp_ssrc_demux_chain() local
660 demux = GST_RTP_SSRC_DEMUX (parent); in gst_rtp_ssrc_demux_chain()
668 GST_DEBUG_OBJECT (demux, "received buffer of SSRC %08x", ssrc); in gst_rtp_ssrc_demux_chain()
670 srcpad = find_or_create_demux_pad_for_ssrc (demux, ssrc, RTP_PAD); in gst_rtp_ssrc_demux_chain()
675 forward_initial_events (demux, ssrc, srcpad, RTP_PAD); in gst_rtp_ssrc_demux_chain()
686 active_pad = get_demux_pad_for_ssrc (demux, ssrc, RTP_PAD); in gst_rtp_ssrc_demux_chain()
703 GST_DEBUG_OBJECT (demux, "Dropping invalid RTP packet"); in gst_rtp_ssrc_demux_chain()
710 GST_WARNING_OBJECT (demux, in gst_rtp_ssrc_demux_chain()
712 "Max streams number reached (%u)", ssrc, demux->max_streams); in gst_rtp_ssrc_demux_chain()
722 GstRtpSsrcDemux *demux; in gst_rtp_ssrc_demux_rtcp_chain() local
728 demux = GST_RTP_SSRC_DEMUX (parent); in gst_rtp_ssrc_demux_rtcp_chain()
763 GST_DEBUG_OBJECT (demux, "received RTCP of SSRC %08x", ssrc); in gst_rtp_ssrc_demux_rtcp_chain()
765 srcpad = find_or_create_demux_pad_for_ssrc (demux, ssrc, RTCP_PAD); in gst_rtp_ssrc_demux_rtcp_chain()
770 forward_initial_events (demux, ssrc, srcpad, RTCP_PAD); in gst_rtp_ssrc_demux_rtcp_chain()
781 active_pad = get_demux_pad_for_ssrc (demux, ssrc, RTCP_PAD); in gst_rtp_ssrc_demux_rtcp_chain()
797 GST_DEBUG_OBJECT (demux, "Dropping invalid RTCP packet"); in gst_rtp_ssrc_demux_rtcp_chain()
803 GST_DEBUG_OBJECT (demux, "dropping unexpected RTCP packet"); in gst_rtp_ssrc_demux_rtcp_chain()
810 GST_WARNING_OBJECT (demux, in gst_rtp_ssrc_demux_rtcp_chain()
812 "Max streams number reached (%u)", ssrc, demux->max_streams); in gst_rtp_ssrc_demux_rtcp_chain()
818 find_demux_pad_for_pad (GstRtpSsrcDemux * demux, GstPad * pad) in find_demux_pad_for_pad() argument
822 for (walk = demux->srcpads; walk; walk = g_slist_next (walk)) { in find_demux_pad_for_pad()
837 GstRtpSsrcDemux *demux; in gst_rtp_ssrc_demux_src_event() local
840 demux = GST_RTP_SSRC_DEMUX (parent); in gst_rtp_ssrc_demux_src_event()
848 GstRtpSsrcDemuxPads *dpads = find_demux_pad_for_pad (demux, pad); in gst_rtp_ssrc_demux_src_event()
869 GstRtpSsrcDemux *demux; in gst_rtp_ssrc_demux_iterate_internal_links_src() local
874 demux = GST_RTP_SSRC_DEMUX (parent); in gst_rtp_ssrc_demux_iterate_internal_links_src()
876 GST_OBJECT_LOCK (demux); in gst_rtp_ssrc_demux_iterate_internal_links_src()
877 for (current = demux->srcpads; current; current = g_slist_next (current)) { in gst_rtp_ssrc_demux_iterate_internal_links_src()
881 otherpad = demux->rtp_sink; in gst_rtp_ssrc_demux_iterate_internal_links_src()
884 otherpad = demux->rtcp_sink; in gst_rtp_ssrc_demux_iterate_internal_links_src()
897 GST_OBJECT_UNLOCK (demux); in gst_rtp_ssrc_demux_iterate_internal_links_src()
923 GstRtpSsrcDemux *demux; in gst_rtp_ssrc_demux_iterate_internal_links_sink() local
927 demux = GST_RTP_SSRC_DEMUX (parent); in gst_rtp_ssrc_demux_iterate_internal_links_sink()
930 if (pad == demux->rtp_sink) in gst_rtp_ssrc_demux_iterate_internal_links_sink()
932 else if (pad == demux->rtcp_sink) in gst_rtp_ssrc_demux_iterate_internal_links_sink()
937 it = gst_element_iterate_src_pads (GST_ELEMENT_CAST (demux)); in gst_rtp_ssrc_demux_iterate_internal_links_sink()
948 GstRtpSsrcDemux *demux; in gst_rtp_ssrc_demux_src_query() local
951 demux = GST_RTP_SSRC_DEMUX (parent); in gst_rtp_ssrc_demux_src_query()
957 if ((res = gst_pad_peer_query (demux->rtp_sink, query))) { in gst_rtp_ssrc_demux_src_query()
983 GstRtpSsrcDemux *demux; in gst_rtp_ssrc_demux_change_state() local
985 demux = GST_RTP_SSRC_DEMUX (element); in gst_rtp_ssrc_demux_change_state()
1002 gst_rtp_ssrc_demux_reset (demux); in gst_rtp_ssrc_demux_change_state()