flacenc: signal in output caps that the output is framed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5524>
This commit is contained in:
Tim-Philipp Müller 2023-10-21 18:22:38 +01:00 committed by GStreamer Marge Bot
parent f87d499aaf
commit 136c82d735
2 changed files with 3 additions and 2 deletions

View file

@ -6875,7 +6875,7 @@
"presence": "always" "presence": "always"
}, },
"src": { "src": {
"caps": "audio/x-flac:\n", "caps": "audio/x-flac:\n framed: true\n",
"direction": "src", "direction": "src",
"presence": "always" "presence": "always"
} }

View file

@ -102,7 +102,7 @@ static const GstAudioChannelPosition channel_positions[8][8] = {
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-flac") GST_STATIC_CAPS ("audio/x-flac, framed=true")
); );
enum enum
@ -1158,6 +1158,7 @@ gst_flac_enc_process_stream_headers (GstFlacEnc * enc)
gst_audio_encoder_get_audio_info (GST_AUDIO_ENCODER (enc)); gst_audio_encoder_get_audio_info (GST_AUDIO_ENCODER (enc));
caps = gst_caps_new_simple ("audio/x-flac", caps = gst_caps_new_simple ("audio/x-flac",
"framed", G_TYPE_BOOLEAN, TRUE,
"channels", G_TYPE_INT, GST_AUDIO_INFO_CHANNELS (info), "channels", G_TYPE_INT, GST_AUDIO_INFO_CHANNELS (info),
"rate", G_TYPE_INT, GST_AUDIO_INFO_RATE (info), NULL); "rate", G_TYPE_INT, GST_AUDIO_INFO_RATE (info), NULL);