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.
This commit is contained in:
Zeeshan Ali 2005-10-25 17:20:55 +00:00
parent 37c0c43425
commit f6b0ca0572
4 changed files with 17 additions and 12 deletions

View file

@ -1,3 +1,13 @@
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):

View file

@ -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

View file

@ -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;

View file

@ -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)