summaryrefslogtreecommitdiffstats
path: root/ext/mpeg2enc
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2004-01-02 07:09:23 +0000
committerDavid Schleef <ds@schleef.org>2004-01-02 07:09:23 +0000
commitab8b69675431e3623eac1ecaee91ad80a0786048 (patch)
treee02bdfe53325126a1f8dfe3e8eecea00e64b2111 /ext/mpeg2enc
parent9e9bd20111b288df5012b8965ab392a550ccde08 (diff)
downloadgst-plugins-bad-ab8b69675431e3623eac1ecaee91ad80a0786048.tar.gz
gst-plugins-bad-ab8b69675431e3623eac1ecaee91ad80a0786048.tar.bz2
gst-plugins-bad-ab8b69675431e3623eac1ecaee91ad80a0786048.zip
Convert elements to use gst_pad_use_explicit_caps() where appropriate.
Original commit message from CVS: Convert elements to use gst_pad_use_explicit_caps() where appropriate.
Diffstat (limited to 'ext/mpeg2enc')
-rw-r--r--ext/mpeg2enc/gstmpeg2enc.cc19
1 files changed, 2 insertions, 17 deletions
diff --git a/ext/mpeg2enc/gstmpeg2enc.cc b/ext/mpeg2enc/gstmpeg2enc.cc
index bee6a9b0..a435829e 100644
--- a/ext/mpeg2enc/gstmpeg2enc.cc
+++ b/ext/mpeg2enc/gstmpeg2enc.cc
@@ -106,8 +106,6 @@ static void gst_mpeg2enc_loop (GstElement *element);
static GstPadLinkReturn
gst_mpeg2enc_sink_link (GstPad *pad,
const GstCaps *caps);
-static GstCaps *
- gst_mpeg2enc_src_getcaps (GstPad *pad);
static GstElementStateReturn
gst_mpeg2enc_change_state (GstElement *element);
@@ -214,7 +212,7 @@ gst_mpeg2enc_init (GstMpeg2enc *enc)
enc->srcpad = gst_pad_new_from_template (
gst_element_class_get_pad_template (klass, "src"), "src");
- gst_pad_set_getcaps_function (enc->srcpad, gst_mpeg2enc_src_getcaps);
+ gst_pad_use_explicit_caps (enc->srcpad);
gst_element_add_pad (element, enc->srcpad);
enc->options = new GstMpeg2EncOptions ();
@@ -249,7 +247,7 @@ gst_mpeg2enc_loop (GstElement *element)
/* and set caps on other side */
caps = enc->encoder->getFormat ();
- if (gst_pad_try_set_caps (enc->srcpad, caps) <= 0) {
+ if (gst_pad_set_explicit_caps (enc->srcpad, caps) <= 0) {
gst_element_error (element,
"Failed to set up encoder properly");
delete enc->encoder;
@@ -278,19 +276,6 @@ gst_mpeg2enc_sink_link (GstPad *pad,
return GST_PAD_LINK_OK;
}
-static GstCaps *
-gst_mpeg2enc_src_getcaps (GstPad *pad)
-{
- GstMpeg2enc *enc = GST_MPEG2ENC (gst_pad_get_parent (pad));
-
- if (enc->encoder) {
- return enc->encoder->getFormat ();
- }
-
- return gst_caps_copy (gst_pad_template_get_caps (
- gst_element_get_pad_template (gst_pad_get_parent (pad), "src")));
-}
-
static void
gst_mpeg2enc_get_property (GObject *object,
guint prop_id,