diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-02-04 19:57:09 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-02-09 14:34:54 +0000 |
commit | 0eb4012490601a3d45bd7239e117ae583d71dc97 (patch) | |
tree | 61e502a4d0f3931d1327981c9e4171c1e5405cd3 /src/multimedia/platform | |
parent | 7b963b971afb942f7b7f6da5374fae251e8af887 (diff) |
Add support for retrieving a mimetype for a QMediaFormat
And remove WMA from the list of supported codecs, add ALAC
instead as it's more widely used.
Change-Id: I3c08f2d1871783dc1e15c948e2ec9a7a033cb917
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/multimedia/platform')
-rw-r--r-- | src/multimedia/platform/android/mediacapture/qandroidcapturesession.cpp | 4 | ||||
-rw-r--r-- | src/multimedia/platform/gstreamer/qgstreamerformatsinfo.cpp | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/multimedia/platform/android/mediacapture/qandroidcapturesession.cpp b/src/multimedia/platform/android/mediacapture/qandroidcapturesession.cpp index 7672e7a01..d39058d6a 100644 --- a/src/multimedia/platform/android/mediacapture/qandroidcapturesession.cpp +++ b/src/multimedia/platform/android/mediacapture/qandroidcapturesession.cpp @@ -269,14 +269,12 @@ void QAndroidCaptureSession::start() case QMediaFormat::Mpeg4Audio: extension = "m4a"; break; - case QMediaFormat::Opus: - extension = "opus"; + case QMediaFormat::ALAC: case QMediaFormat::ASF: case QMediaFormat::AVI: case QMediaFormat::Matroska: case QMediaFormat::FLAC: case QMediaFormat::Wave: - case QMediaFormat::WindowsMediaAudio: case QMediaFormat::UnspecifiedFormat: break; } diff --git a/src/multimedia/platform/gstreamer/qgstreamerformatsinfo.cpp b/src/multimedia/platform/gstreamer/qgstreamerformatsinfo.cpp index 6b2744f3d..1e5c41969 100644 --- a/src/multimedia/platform/gstreamer/qgstreamerformatsinfo.cpp +++ b/src/multimedia/platform/gstreamer/qgstreamerformatsinfo.cpp @@ -65,7 +65,7 @@ static struct { { "audio/mpeg, mpegversion=(int)1, layer=(int)3", QMediaFormat::FileFormat::MP3 }, { "audio/mpeg, mpegversion=(int)4", QMediaFormat::FileFormat::AAC }, { "audio/x-flac", QMediaFormat::FileFormat::FLAC }, - { "audio/x-wma", QMediaFormat::FileFormat::WindowsMediaAudio }, + { "audio/x-alac", QMediaFormat::FileFormat::ALAC }, { nullptr, QMediaFormat::FileFormat::UnspecifiedFormat }, }; @@ -95,7 +95,7 @@ static struct { { "audio/x-ac3", QMediaFormat::AudioCodec::AC3 }, { "audio/x-eac3", QMediaFormat::AudioCodec::EAC3 }, { "audio/x-flac", QMediaFormat::AudioCodec::FLAC }, - { "audio/x-wma", QMediaFormat::AudioCodec::WindowsMediaAudio }, + { "audio/x-alac", QMediaFormat::AudioCodec::ALAC }, { "audio/x-true-hd", QMediaFormat::AudioCodec::DolbyTrueHD }, { "audio/x-vorbis", QMediaFormat::AudioCodec::Vorbis }, { nullptr, QMediaFormat::AudioCodec::Unspecified }, @@ -109,8 +109,6 @@ static auto getList(QGstCodecsInfo::ElementType type, Map *map, Hash &hash) QGstCodecsInfo info(type); auto codecs = info.supportedCodecs(); for (const auto &c : codecs) { - if (type == QGstCodecsInfo::AudioDecoder) - qDebug() << "gst format" << c; Map *m = map; while (m->name) { if (m->name == c.toLatin1()) { |