2004-01-02 Ronald Bultje <rbultje@ronald.bitfreak.net>
+ * sys/v4l/gstv4lmjpegsink.c: (gst_v4lmjpegsink_init):
+ * sys/v4l/gstv4lmjpegsrc.c: (gst_v4lmjpegsrc_init):
+ * sys/v4l/gstv4lsrc.c: (gst_v4lsrc_base_init), (gst_v4lsrc_init):
+ Fix pad template stuff.
+
+2004-01-02 Ronald Bultje <rbultje@ronald.bitfreak.net>
+
* gst/matroska/ebml-read.c: (gst_ebml_read_sint):
* gst/matroska/ebml-write.c: (gst_ebml_write_sint):
fix signed integer reading/writing.
static void gst_v4lmjpegsink_set_clock (GstElement *element, GstClock *clock);
-static GstPadTemplate *sink_template;
-
static GstElementClass *parent_class = NULL;
static guint gst_v4lmjpegsink_signals[LAST_SIGNAL] = { 0 };
static void
gst_v4lmjpegsink_init (GstV4lMjpegSink *v4lmjpegsink)
{
- v4lmjpegsink->sinkpad = gst_pad_new_from_template (sink_template, "sink");
+ GstElementClass *klass = GST_ELEMENT_GET_CLASS (v4lmjpegsink);
+
+ v4lmjpegsink->sinkpad = gst_pad_new_from_template (
+ gst_element_class_get_pad_template (klass, "sink"), "sink");
gst_element_add_pad (GST_ELEMENT (v4lmjpegsink), v4lmjpegsink->sinkpad);
gst_pad_set_chain_function (v4lmjpegsink->sinkpad, gst_v4lmjpegsink_chain);
static GstElementStateReturn gst_v4lmjpegsrc_change_state (GstElement *element);
-static GstPadTemplate *src_template;
-
static GstElementClass *parent_class = NULL;
static guint gst_v4lmjpegsrc_signals[LAST_SIGNAL] = { 0 };
static void
gst_v4lmjpegsrc_init (GstV4lMjpegSrc *v4lmjpegsrc)
{
+ GstElementClass *klass = GST_ELEMENT_GET_CLASS (v4lmjpegsrc);
+
GST_FLAG_SET(GST_ELEMENT(v4lmjpegsrc), GST_ELEMENT_THREAD_SUGGESTED);
- v4lmjpegsrc->srcpad = gst_pad_new_from_template (src_template, "src");
+ v4lmjpegsrc->srcpad = gst_pad_new_from_template (
+ gst_element_class_get_pad_template (klass, "src"), "src");
gst_element_add_pad(GST_ELEMENT(v4lmjpegsrc), v4lmjpegsrc->srcpad);
gst_pad_set_get_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_get);
static void gst_v4lsrc_set_clock (GstElement *element,
GstClock *clock);
-static GstPadTemplate *src_template = NULL;
-
static GstElementClass *parent_class = NULL;
static guint gst_v4lsrc_signals[LAST_SIGNAL] = { 0 };
static void
gst_v4lsrc_base_init (gpointer g_class)
{
+ GstPadTemplate *src_template;
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details (gstelement_class, &gst_v4lsrc_details);
static void
gst_v4lsrc_init (GstV4lSrc *v4lsrc)
{
+ GstElementClass *klass = GST_ELEMENT_GET_CLASS (v4lsrc);
+
GST_FLAG_SET(GST_ELEMENT(v4lsrc), GST_ELEMENT_THREAD_SUGGESTED);
- v4lsrc->srcpad = gst_pad_new_from_template (src_template, "src");
+ v4lsrc->srcpad = gst_pad_new_from_template (
+ gst_element_class_get_pad_template (klass, "src"), "src");
gst_element_add_pad(GST_ELEMENT(v4lsrc), v4lsrc->srcpad);
gst_pad_set_get_function (v4lsrc->srcpad, gst_v4lsrc_get);