mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 23:18:52 +00:00
vorbisenc: Add samplerate and channels to the srcpad caps
This commit is contained in:
parent
c07271ea02
commit
1f37f9f41d
1 changed files with 5 additions and 2 deletions
|
@ -72,7 +72,8 @@ static GstStaticPadTemplate vorbis_enc_src_factory =
|
||||||
GST_STATIC_PAD_TEMPLATE ("src",
|
GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("audio/x-vorbis")
|
GST_STATIC_CAPS ("audio/x-vorbis, "
|
||||||
|
"rate = (int) [ 1, 200000 ], " "channels = (int) [ 1, 255 ]")
|
||||||
);
|
);
|
||||||
|
|
||||||
enum
|
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);
|
buf3 = gst_vorbis_enc_buffer_from_header_packet (vorbisenc, &header_code);
|
||||||
|
|
||||||
/* mark and put on caps */
|
/* 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",
|
caps = _gst_caps_set_buffer_array (caps, "streamheader",
|
||||||
buf1, buf2, buf3, NULL);
|
buf1, buf2, buf3, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue