summaryrefslogtreecommitdiffstats
path: root/ext/audiofile
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/audiofile
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/audiofile')
-rw-r--r--ext/audiofile/gstafparse.c3
-rw-r--r--ext/audiofile/gstafsrc.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/ext/audiofile/gstafparse.c b/ext/audiofile/gstafparse.c
index f61d64f4..179dd849 100644
--- a/ext/audiofile/gstafparse.c
+++ b/ext/audiofile/gstafparse.c
@@ -150,6 +150,7 @@ gst_afparse_init (GstAFParse *afparse)
{
afparse->srcpad = gst_pad_new_from_template (
gst_element_get_pad_template (GST_ELEMENT (afparse), "src"), "src");
+ gst_pad_use_explicit_caps (afparse->srcpad);
gst_element_add_pad (GST_ELEMENT (afparse), afparse->srcpad);
afparse->sinkpad = gst_pad_new_from_template (
@@ -381,7 +382,7 @@ gst_afparse_open_file (GstAFParse *afparse)
/* set caps on src */
/*FIXME: add all the possible formats, especially float ! */
- gst_pad_try_set_caps (afparse->srcpad,
+ gst_pad_set_explicit_caps (afparse->srcpad,
gst_caps_new_simple (
"audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,
diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c
index 0520463d..7d477ab2 100644
--- a/ext/audiofile/gstafsrc.c
+++ b/ext/audiofile/gstafsrc.c
@@ -179,6 +179,7 @@ gst_afsrc_init (GstAFSrc *afsrc)
afsrc->srcpad = gst_pad_new_from_template (
gst_element_get_pad_template (GST_ELEMENT (afsrc), "src"), "src");
gst_element_add_pad (GST_ELEMENT (afsrc), afsrc->srcpad);
+ gst_pad_use_explicit_caps (afsrc->srcpad);
gst_pad_set_get_function (afsrc->srcpad, gst_afsrc_get);
afsrc->bytes_per_read = 4096;
@@ -339,8 +340,7 @@ gst_afsrc_open_file (GstAFSrc *src)
}
/* set caps on src */
- /*FIXME: add all the possible formats, especially float ! */
- gst_pad_try_set_caps (src->srcpad,
+ gst_pad_set_explicit_caps (src->srcpad,
gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,
"signed", G_TYPE_BOOLEAN, src->is_signed,