summaryrefslogtreecommitdiffstats
path: root/src/multimedia/qmediaformat.h
Commit message (Collapse)AuthorAgeFilesLines
* Clean up file format and audio profile handlingLars Knoll2021-06-251-5/+7
| | | | | | | | | | | | | | | | | | | | Remove the ALAC file format as it is actually always stored in an mp4 container. While the same is true for AAC, keep the format, as it's often used with it's own extension. Rename ASF to WMV and add WMA as a file format as those usually have different extensions. Add WMA and WMV codecs, as the corresponding file formats make little sense without supporting the codecs that are being used. Clean up the gstreamer implementation and test that audio only recording works for all combinations. Change-Id: I7c76add8f02eba646741c6c2a870e8af9b9fc51b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Put media format enums in class scope and make it available in namespacePiotr Srebrny2021-06-181-6/+7
| | | | | | | | | | | | The media format enums have conflicting names thus must stay in thier respecitve namespaces when exporting to QML. The dependencies are updated as declaring the namespace and gadget on the same object is not supported with the selected qtdeclarative component. Change-Id: I6c113512128af4c60b431523c5322f77b879bc30 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Mark some methods on QMediaFormat as invokableLars Knoll2021-06-171-4/+5
| | | | | Change-Id: Ia2aac9b59458c99aaf3ee34a480e52f9f425576b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix qSwap(QMediaFormat, QMediaFormat)Ulf Hermann2021-06-171-1/+6
| | | | | | | | | You need to swap all members. Fixes: QTBUG-94565 Pick-to: 6.2 Change-Id: I0decfb3ea033bc358c39618a36d77ca9e0972e84 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QMediaEncoderSettingsLars Knoll2021-06-161-1/+0
| | | | | | | | | | As per API review, fold this class into QMediaRecorder as that's the only place where it is being used. This removes one level of indirection from the API and also makes it possible to use from QML. Change-Id: Id9157df04512382cce28e89b082433ec67d36b28 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace deprecated Q_ENUMS with Q_ENUMPiotr Srebrny2021-06-091-3/+3
| | | | | Change-Id: I86d37b25783c844af92a6ef260547cb26848b1fb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the inheritance between QMediaEncoderSettings and QMediaFormatLars Knoll2021-06-041-2/+17
| | | | | | | | | | Inheriting from value classes is not a good principle for our APIs, and it doesn't work for the QML side neither. Instead, simply give QMediaEncoderSettings a QMediaFormat member. Change-Id: Ib2cd8b04c09e89f8f57a91898ce987c199d66c75 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make QMediaFormat movableVolker Hilsheimer2021-05-121-3/+10
| | | | | | | | | | The d-pointer is only a reserved placeholder, but make it a QExplicitlySharedDataPointer anyway. The default constructor just initializes to zero, so the overhead is marginal, but makes it safe to extend in the future if needed. Change-Id: Ib6269f59b59af05647c0f9295ce634d5c327339e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QMediaFormat::ModeDoris Verria2021-05-121-10/+1
| | | | | | | | | This is not needed as we can determine the mode from the encoder settings' codecs Change-Id: I1850494cad8fef1ce78f056bcbf8e8b6b0e98112 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename canEncode/Decode to isSupported(ConversionMode)Volker Hilsheimer2021-05-071-2/+1
| | | | | | Change-Id: Id55d3fb9d608be1806b4d772b7b8109a414e362d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix tst_qmediaencoderLars Knoll2021-04-271-0/+4
| | | | | | | | | Fix and re-enable all tests for QMediaEncoderSettings while at it. Change-Id: Ie15cd59a849412e02c6d38c91bf1bea16456cdd5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Get rid of the global enums in qmultimedia.hLars Knoll2021-03-161-1/+0
| | | | | | | | Move the ones that are still used into the correct place. Change-Id: I3ddc05aad35a163c88a45a1f192c49a65239c536 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* More changes for QMediaFormat handling on the backendLars Knoll2021-02-091-26/+21
| | | | | | | | | | The codecs supported by a certain muxer/demuxer are actually something we need to determine from the backend. So a static mapping in QMediaFormat will not really work. Change-Id: I848c607ed222eba160a7c9c1c7b216b991e5ceba Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add support for retrieving a mimetype for a QMediaFormatLars Knoll2021-02-091-5/+7
| | | | | | | | | 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>
* Use the new QMediaEncoderSettings in QMediaRecorderLars Knoll2021-02-091-7/+17
| | | | | | | | | | | | | Switch the backends for Android (compiles but untested), AFFoundation and GStreamer over to use the new QMediaEncoderSettings. Get rid of the old *EncoderControl classes and associated infrastructure. Change-Id: Ic75ff43eab55aeb0ab53d7248f7f5ff70b14c05f Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* New API for handling media formats and codecsLars Knoll2021-02-091-0/+155
Implement a new API for handling media formats and codecs. The API gives better control to discover supported file formats and codecs for encoding and decoding. QMediaRecorder will be moved over to use the new API in a subsequent commit. Android only has stubs implemented currently, as I can't test anything beyond simple compilation. Change-Id: Iff5f044f87c97f83d9151b10d7a78709822e077a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>