From df0b7b7ae1e1a92b76fa8fd2d0c0701b59e5071c Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sat, 3 Jan 2004 01:27:31 +0000 Subject: [PATCH] ext/alsa/gstalsasrc.c: Remove bogus "src" request pad. Original commit message from CVS: * ext/alsa/gstalsasrc.c: (gst_alsa_src_pad_factory), (gst_alsa_src_base_init): Remove bogus "src" request pad. * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_base_init), (gst_mpeg_parse_class_init): Move pad template registration to class_init, since the derived class (mpegdemux) doesn't want them. --- ChangeLog | 9 +++++++++ gst/mpegstream/gstmpegparse.c | 12 ++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d3fb0a510..c988f937a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-01-02 David Schleef + + * ext/alsa/gstalsasrc.c: (gst_alsa_src_pad_factory), + (gst_alsa_src_base_init): Remove bogus "src" request pad. + * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_base_init), + (gst_mpeg_parse_class_init): Move pad template registration + to class_init, since the derived class (mpegdemux) doesn't + want them. + 2004-01-03 Ronald Bultje * sys/ximage/Makefile.am: diff --git a/gst/mpegstream/gstmpegparse.c b/gst/mpegstream/gstmpegparse.c index 6ea4bc2a97..02d98df4d6 100644 --- a/gst/mpegstream/gstmpegparse.c +++ b/gst/mpegstream/gstmpegparse.c @@ -133,10 +133,6 @@ gst_mpeg_parse_base_init (GstMPEGParseClass *klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); gst_element_class_set_details (element_class, &mpeg_parse_details); } @@ -174,6 +170,14 @@ gst_mpeg_parse_class_init (GstMPEGParseClass *klass) klass->parse_pes = NULL; klass->send_data = gst_mpeg_parse_send_data; klass->handle_discont = gst_mpeg_parse_handle_discont; + + /* FIXME: this is a hack. We add the pad templates here instead + * in the base_init function, since the derived class (mpegdemux) + * uses different pads. IMO, this is wrong. */ + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&src_factory)); + gst_element_class_add_pad_template (gstelement_class, + gst_static_pad_template_get (&sink_factory)); } static void