Commit f6b0ca05 authored by Zeeshan Ali's avatar Zeeshan Ali
Browse files

The pad-template on the sinkpad should be set by the derived classes. Also...

The pad-template on the sinkpad should be set by the derived classes. Also added some usefull macros.

Original commit message from CVS:
The pad-template on the sinkpad should be set by the derived classes. Also added some usefull macros.
parent 37c0c434
2005-10-25 Zeeshan Ali <zeenix@gmail.com>
* gst-libs/gst/rtp/gstbasertpdepayload.c:
(gst_base_rtp_depayload_base_init),
(gst_base_rtp_depayload_finalize):
* gst-libs/gst/rtp/gstbasertpdepayload.h:
* gst-libs/gst/rtp/gstbasertppayload.h:
The pad-template on the sinkpad should be set by the derived classes. Also
added some usefull macros.
2005-10-24 Wim Taymans <wim@fluendo.com>
 
* ext/vorbis/vorbisdec.c: (vorbis_handle_data_packet):
......
......@@ -36,12 +36,6 @@ enum
ARG_QUEUEDELAY,
};
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("application/x-rtp")
);
static GstElementClass *parent_class = NULL;
static void gst_base_rtp_depayload_base_init (GstBaseRTPDepayloadClass * klass);
......@@ -100,10 +94,7 @@ static void gst_base_rtp_depayload_set_gst_timestamp
static void
gst_base_rtp_depayload_base_init (GstBaseRTPDepayloadClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_factory));
//GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
}
static void
......@@ -176,7 +167,9 @@ gst_base_rtp_depayload_finalize (GObject * object)
{
// free our queue
g_queue_free (GST_BASE_RTP_DEPAYLOAD (object)->queue);
G_OBJECT_CLASS (parent_class)->finalize (object);
if (G_OBJECT_CLASS (parent_class)->finalize)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gboolean
......
......@@ -38,6 +38,9 @@ G_BEGIN_DECLS
#define GST_IS_BASE_RTP_DEPAYLOAD_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_RTP_DEPAYLOAD))
#define GST_BASE_RTP_DEPAYLOAD_SINKPAD(depayload) (GST_BASE_RTP_DEPAYLOAD (depayload)->sinkpad)
#define GST_BASE_RTP_DEPAYLOAD_SRCPAD(depayload) (GST_BASE_RTP_DEPAYLOAD (depayload)->srcpad)
// in milliseconds
#define RTP_QUEUEDELAY 100;
......
......@@ -42,7 +42,6 @@ typedef struct _GstBaseRTPPayloadClass GstBaseRTPPayloadClass;
#define GST_BASE_RTP_PAYLOAD_SINKPAD(payload) (GST_BASE_RTP_PAYLOAD (payload)->sinkpad)
#define GST_BASE_RTP_PAYLOAD_SRCPAD(payload) (GST_BASE_RTP_PAYLOAD (payload)->srcpad)
#define GST_BASE_RTP_PAYLOAD_SINKPAD(payload) (GST_BASE_RTP_PAYLOAD (payload)->sinkpad)
#define GST_BASE_RTP_PAYLOAD_PT(payload) (GST_BASE_RTP_PAYLOAD (payload)->pt)
#define GST_BASE_RTP_PAYLOAD_MTU(payload) (GST_BASE_RTP_PAYLOAD (payload)->mtu)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment