);
G_DEFINE_TYPE (GstRtpMP1SDepay, gst_rtp_mp1s_depay,
- GST_TYPE_BASE_RTP_DEPAYLOAD);
+ GST_TYPE_RTP_BASE_DEPAYLOAD);
-static gboolean gst_rtp_mp1s_depay_setcaps (GstBaseRTPDepayload * depayload,
+static gboolean gst_rtp_mp1s_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps);
-static GstBuffer *gst_rtp_mp1s_depay_process (GstBaseRTPDepayload * depayload,
+static GstBuffer *gst_rtp_mp1s_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf);
static void
gst_rtp_mp1s_depay_class_init (GstRtpMP1SDepayClass * klass)
{
GstElementClass *gstelement_class;
- GstBaseRTPDepayloadClass *gstbasertpdepayload_class;
+ GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gstelement_class = (GstElementClass *) klass;
- gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass;
+ gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
- gstbasertpdepayload_class->process = gst_rtp_mp1s_depay_process;
- gstbasertpdepayload_class->set_caps = gst_rtp_mp1s_depay_setcaps;
+ gstrtpbasedepayload_class->process = gst_rtp_mp1s_depay_process;
+ gstrtpbasedepayload_class->set_caps = gst_rtp_mp1s_depay_setcaps;
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_mp1s_depay_src_template));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_mp1s_depay_sink_template));
- gst_element_class_set_details_simple (gstelement_class,
+ gst_element_class_set_static_metadata (gstelement_class,
"RTP MPEG1 System Stream depayloader", "Codec/Depayloader/Network/RTP",
"Extracts MPEG1 System Streams from RTP packets (RFC 3555)",
"Wim Taymans <wim.taymans@gmail.com>");
}
static gboolean
-gst_rtp_mp1s_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
+gst_rtp_mp1s_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{
GstCaps *srccaps;
GstStructure *structure;
srccaps = gst_caps_new_simple ("video/mpeg",
"systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
- res = gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps);
+ res = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps);
gst_caps_unref (srccaps);
return res;
}
static GstBuffer *
-gst_rtp_mp1s_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
+gst_rtp_mp1s_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{
GstBuffer *outbuf;
- GstRTPBuffer rtp;
+ GstRTPBuffer rtp = { NULL };
gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp);
outbuf = gst_rtp_buffer_get_payload_buffer (&rtp);
gst_rtp_buffer_unmap (&rtp);
if (outbuf)
- GST_DEBUG ("gst_rtp_mp1s_depay_chain: pushing buffer of size %d",
- gst_buffer_get_size (outbuf));
+ GST_DEBUG ("gst_rtp_mp1s_depay_chain: pushing buffer of size %"
+ G_GSIZE_FORMAT, gst_buffer_get_size (outbuf));
return outbuf;
}