summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/gstrtpptdemux.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-04-11 13:49:54 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-11 02:30:24 +0100
commit03bf43d50edb50f8114419cd62278afd7f67922b (patch)
tree74c3e9532a8cabbeeaf0d9d87581a74b9ae2254d /gst/rtpmanager/gstrtpptdemux.c
parent8c67b5d7dd1457aa0bafc89fbd022a0a6d79088c (diff)
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.
Diffstat (limited to 'gst/rtpmanager/gstrtpptdemux.c')
-rw-r--r--gst/rtpmanager/gstrtpptdemux.c52
1 files changed, 39 insertions, 13 deletions
diff --git a/gst/rtpmanager/gstrtpptdemux.c b/gst/rtpmanager/gstrtpptdemux.c
index 705210b6..7ac6e90c 100644
--- a/gst/rtpmanager/gstrtpptdemux.c
+++ b/gst/rtpmanager/gstrtpptdemux.c
@@ -83,6 +83,7 @@ struct _GstRTPPtDemuxPad
/* signals */
enum
{
+ SIGNAL_REQUEST_PT_MAP,
SIGNAL_NEW_PAYLOAD_TYPE,
SIGNAL_PAYLOAD_TYPE_CHANGE,
LAST_SIGNAL
@@ -134,20 +135,45 @@ gst_rtp_pt_demux_class_init (GstRTPPtDemuxClass * klass)
gobject_klass = (GObjectClass *) klass;
gstelement_klass = (GstElementClass *) klass;
+ /**
+ * GstRTPPtDemux::request-pt-map:
+ * @demux: the object which received the signal
+ * @pt: the payload type
+ *
+ * Request the payload type as #GstCaps for @pt.
+ */
+ gst_rtp_pt_demux_signals[SIGNAL_REQUEST_PT_MAP] =
+ g_signal_new ("request-pt-map", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPPtDemuxClass, request_pt_map),
+ NULL, NULL, gst_rtp_bin_marshal_BOXED__UINT, GST_TYPE_CAPS, 1,
+ G_TYPE_UINT);
+
+ /**
+ * GstRTPPtDemux::new-payload-type
+ * @demux: the object which received the signal
+ * @pt: the payload type
+ * @pad: the pad with the new payload
+ *
+ * Emited when a new payload type pad has been created in @demux.
+ */
gst_rtp_pt_demux_signals[SIGNAL_NEW_PAYLOAD_TYPE] =
- g_signal_new ("new-payload-type",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstRTPPtDemuxClass, new_payload_type),
- NULL, NULL,
- gst_rtp_bin_marshal_VOID__UINT_OBJECT,
- G_TYPE_NONE, 2, G_TYPE_INT, GST_TYPE_PAD);
+ g_signal_new ("new-payload-type", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPPtDemuxClass, new_payload_type),
+ NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_OBJECT, G_TYPE_NONE, 2,
+ G_TYPE_UINT, GST_TYPE_PAD);
+
+ /**
+ * GstRTPPtDemux::payload-type-change
+ * @demux: the object which received the signal
+ * @pt: the new payload type
+ *
+ * Emited when the payload type changed.
+ */
gst_rtp_pt_demux_signals[SIGNAL_PAYLOAD_TYPE_CHANGE] =
- g_signal_new ("payload-type-change",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstRTPPtDemuxClass, payload_type_change),
- NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
+ g_signal_new ("payload-type-change", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPPtDemuxClass,
+ payload_type_change), NULL, NULL, g_cclosure_marshal_VOID__UINT,
+ G_TYPE_NONE, 1, G_TYPE_UINT);
gobject_klass->finalize = GST_DEBUG_FUNCPTR (gst_rtp_pt_demux_finalize);
@@ -215,7 +241,7 @@ gst_rtp_pt_demux_chain (GstPad * pad, GstBuffer * buf)
srcpad = gst_pad_new_from_template (templ, padname);
g_free (padname);
- caps = gst_pad_get_caps (srcpad);
+ caps = gst_buffer_get_caps (buf);
caps = gst_caps_make_writable (caps);
gst_caps_set_simple (caps, "payload", G_TYPE_INT, pt, NULL);
gst_pad_set_caps (srcpad, caps);