diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-01-26 11:01:12 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-01-26 11:01:12 +0100 |
commit | 1f37f9f41d1992325649165b9caf00066e14f942 (patch) | |
tree | 8c5118f95460edfd7e17751e98d98685a9bc6cb1 | |
parent | c07271ea0287762801412c61f9f24c6b09675052 (diff) |
vorbisenc: Add samplerate and channels to the srcpad caps
-rw-r--r-- | ext/vorbis/gstvorbisenc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/vorbis/gstvorbisenc.c b/ext/vorbis/gstvorbisenc.c index caf249e5e..0e4156c59 100644 --- a/ext/vorbis/gstvorbisenc.c +++ b/ext/vorbis/gstvorbisenc.c @@ -72,7 +72,8 @@ static GstStaticPadTemplate vorbis_enc_src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-vorbis") + GST_STATIC_CAPS ("audio/x-vorbis, " + "rate = (int) [ 1, 200000 ], " "channels = (int) [ 1, 255 ]") ); enum @@ -724,7 +725,9 @@ gst_vorbis_enc_handle_frame (GstAudioEncoder * enc, GstBuffer * buffer) buf3 = gst_vorbis_enc_buffer_from_header_packet (vorbisenc, &header_code); /* mark and put on caps */ - caps = gst_caps_new_empty_simple ("audio/x-vorbis"); + caps = gst_caps_new_simple ("audio/x-vorbis", + "rate", G_TYPE_INT, vorbisenc->frequency, + "channels", G_TYPE_INT, vorbisenc->channels, NULL); caps = _gst_caps_set_buffer_array (caps, "streamheader", buf1, buf2, buf3, NULL); |