diff options
author | Bartlomiej Moskal <bartlomiej.moskal@qt.io> | 2022-07-19 14:53:22 +0200 |
---|---|---|
committer | Bartlomiej Moskal <bartlomiej.moskal@qt.io> | 2022-07-27 13:20:19 +0200 |
commit | 711c1edf18d0e1b4ff7d1fc40bd7c1802082c98c (patch) | |
tree | 9a3a75887c81f9989fe2e1ed0cd0d6429c79bc0a | |
parent | f4242aed90c6a2097e588cf581a0d0ecfc10f53f (diff) |
Android: Filters out unsupported FLAC audio codecs
When using Android backend, MediaRecorder is used for recording. API for
MediaRecorder do not allow to set audio encoder with FLAC option. That
is why we need to filters out unsupported FLAC audio codecs from
encoders list.
Task-number: QTBUG-98121
Change-Id: I4b0ea35a2f111afb7ff07cb3206255789834ff8a
Reviewed-by: Samuel Mira <samuel.mira@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 6acdd79dd6d6c381dc13461d165dbc4dccf670be)
-rw-r--r-- | src/multimedia/platform/android/qandroidformatsinfo.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/multimedia/platform/android/qandroidformatsinfo.cpp b/src/multimedia/platform/android/qandroidformatsinfo.cpp index 584c7a122..fcfab0468 100644 --- a/src/multimedia/platform/android/qandroidformatsinfo.cpp +++ b/src/multimedia/platform/android/qandroidformatsinfo.cpp @@ -81,7 +81,6 @@ QAndroidFormatInfo::QAndroidFormatInfo() { const QMediaFormat::AudioCodec aac = hasDecoder(QMediaFormat::AudioCodec::AAC); const QMediaFormat::AudioCodec mp3 = hasDecoder(QMediaFormat::AudioCodec::MP3); - const QMediaFormat::AudioCodec flac = hasDecoder(QMediaFormat::AudioCodec::FLAC); const QMediaFormat::AudioCodec opus = hasDecoder(QMediaFormat::AudioCodec::Opus); const QMediaFormat::AudioCodec vorbis = hasDecoder(QMediaFormat::AudioCodec::Vorbis); @@ -94,12 +93,12 @@ QAndroidFormatInfo::QAndroidFormatInfo() decoders = { { QMediaFormat::AAC, {aac}, {} }, { QMediaFormat::MP3, {mp3}, {} }, - { QMediaFormat::FLAC, {flac}, {} }, - { QMediaFormat::Mpeg4Audio, {mp3, aac, flac, vorbis}, {} }, - { QMediaFormat::MPEG4, {mp3, aac, flac, vorbis}, {h264, h265, av1} }, - { QMediaFormat::Ogg, {opus, vorbis, flac}, {} }, - { QMediaFormat::Matroska, {mp3, opus, vorbis}, {vp8, vp9, h264, h265, av1} }, - { QMediaFormat::WebM, {opus, vorbis}, {vp8, vp9} } + // FLAC encoder is not supported by the MediaRecorder used for recording + // { QMediaFormat::FLAC, {flac}, {} }, + { QMediaFormat::Mpeg4Audio, {mp3, aac, vorbis}, {} }, + { QMediaFormat::MPEG4, {mp3, aac, vorbis}, {h264, h265, av1} }, + { QMediaFormat::Ogg, {opus, vorbis}, {} }, + { QMediaFormat::Matroska, {mp3, opus}, {vp8, vp9, h264, h265, av1} }, }; removeUnspecifiedValues(decoders); |