diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2005-09-21 17:50:29 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2005-09-21 17:50:29 +0000 |
commit | a297069e16a54bc5dc63ec903ec919b7f16bd632 (patch) | |
tree | 968aa948bf68a58f1a024b768baaeca1a8664989 /gst/rtp/gstrtpmp4vdepay.c | |
parent | 9dd3929730bc3e2656eabfd8a8edfc7a61bb0176 (diff) |
gst/rtp/gstrtpamrdec.c: Handle multiple AMr packets per payload. Handle CRC and parse ILL/ILP.
Original commit message from CVS:
* gst/rtp/gstrtpamrdec.c: (gst_rtpamrdec_sink_setcaps),
(gst_rtpamrdec_chain):
Handle multiple AMr packets per payload. Handle CRC and
parse ILL/ILP.
* gst/rtp/gstrtpamrenc.c: (gst_rtpamrenc_setcaps):
Make caps params strings for easy SDP mapping.
* gst/rtp/gstrtpdec.c: (gst_rtpdec_init), (gst_rtpdec_getcaps):
Handle capsnego better.
* gst/rtp/gstrtpmp4vdec.c: (gst_rtpmp4vdec_setcaps):
* gst/rtp/gstrtpmp4venc.c: (gst_rtpmp4venc_new_caps):
Generate and parse config string in the caps.
Diffstat (limited to 'gst/rtp/gstrtpmp4vdepay.c')
-rw-r--r-- | gst/rtp/gstrtpmp4vdepay.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gst/rtp/gstrtpmp4vdepay.c b/gst/rtp/gstrtpmp4vdepay.c index fba38d6b..0b6ae403 100644 --- a/gst/rtp/gstrtpmp4vdepay.c +++ b/gst/rtp/gstrtpmp4vdepay.c @@ -161,6 +161,7 @@ gst_rtpmp4vdec_setcaps (GstPad * pad, GstCaps * caps) GstStructure *structure; GstRtpMP4VDec *rtpmp4vdec; GstCaps *srccaps; + const gchar *str; rtpmp4vdec = GST_RTP_MP4V_DEC (GST_OBJECT_PARENT (pad)); @@ -175,6 +176,29 @@ gst_rtpmp4vdec_setcaps (GstPad * pad, GstCaps * caps) gst_pad_set_caps (rtpmp4vdec->srcpad, srccaps); gst_caps_unref (srccaps); + if ((str = gst_structure_get_string (structure, "config"))) { + GValue v = { 0 }; + + g_print ("config=%s\n", str); + + g_value_init (&v, GST_TYPE_BUFFER); + if (gst_value_deserialize (&v, str)) { + GstBuffer *buffer; + + buffer = gst_value_get_buffer (&v); + gst_buffer_ref (buffer); + g_value_unset (&v); + + g_print ("buf=%p\n", buffer); + + gst_buffer_set_caps (buffer, GST_PAD_CAPS (rtpmp4vdec->srcpad)); + + gst_pad_push (rtpmp4vdec->srcpad, buffer); + } else { + g_warning ("cannot convert config to buffer"); + } + } + return TRUE; } |