summaryrefslogtreecommitdiffstats
path: root/src/multimedia/qmediaformat.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix QDoc errors Qt MultimediaNico Vertriest2021-08-301-9/+14
| | | | | | | Task-number: QTBUG-95708 Change-Id: I978447fde6f10d4f8bfe2afad3191bd7e854272d Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Fix Qt Multimedia Documentation Part 2Nicholas Bennett2021-08-111-3/+68
| | | | | | | | | | | | | | | | Define enums for mediaformat, audioformat, videoformat Remove doc references to qdelcarativecamerafocus Remove brightness and related properties from QVideoWidget Remove QMediaPlayer::setVolume() doc references Remove QMediaRecorder::setVolume() doc references Document missing QAudioFormat::SampleFormat enums Update or remove old function or class links in docs Spelling correction, sentence shortening for clarity Remove qdoc comments in a namespace that is not to be documented Pick-to: 6.2 Change-Id: If0e56da12535fd31bd4fbe97fd83c3a38df22dbc Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix Qt Multimedia Documentation Part 3Nicholas Bennett2021-08-101-2/+5
| | | | | | | | | API docs review and changes to solve qdoc warnings Task-number: QTBUG-95115 Pick-to: 6.2 Change-Id: I165360e66930fc3cc1c27ff158a188a7c054d86d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Overhaul documentation for Qt 6 Release, Second BlockNicholas Bennett2021-08-101-33/+38
| | | | | | | | | | | | | | | Remove Audio QML type Add links to technical definitions Spelling and grammer check Changes to adhere to Qt Doc guide Integrated change to qt 6 page (porting guide) Break out Audio QML type removal into it's own line in changes table Reflow docs text within 100 characters Task-number: QTBUG-94646 QTBUG-94906 Change-Id: I65ca7083e68d0bf534fd4faecfa7c501bab83b24 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Part 1 Fix Qt Multimedia documentation issuesTopi Reinio2021-07-091-12/+29
| | | | | | | | | | | | | TODO: * src/multimedia/audio/qaudiobuffer.cpp:333: (qdoc) warning: Cannot find 'QAudioBuffer::StereoFrame' * multimediaquick/camerafocus.qdoc content refers to now-removed classes * multimediawidgets module doc needs CMake build instructions/snippet * Lots of undocumented parameters, enum values, other minor things Pick-to: 6.2 Change-Id: I4861aa0edf2904e5e43783f5167c5d2ba575b91b Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename QMediaCaptureSession::encoder to recorderLars Knoll2021-07-081-1/+1
| | | | | | | | | | | | | As the class is called QMediaRecorder this is required for API consistency. Also cleaned up the front end code and examples where they used encoder instead of recorder. Cleanup of the backend will have to come in a separate change. Change-Id: I6e63e607473e68f628b1f89ffa3edcbc5bf5c2c8 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Bartlomiej Moskal <bartlomiej.moskal@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Clean up file format and audio profile handlingLars Knoll2021-06-251-18/+30
| | | | | | | | | | | | | | | | | | | | 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>
* Fix media codecs resolver when switching between audio and audio/videoPiotr Srebrny2021-06-161-4/+7
| | | | | | | | | | | | Removing isSupported condition as it is true when audio only format is selected while flags indicate that video codec is required. The same occurs when going from audio/video format to audio format. Reset format if it does not support video while required. Change-Id: I2c056d935351cfc7a471a7376fa51da320cdb353 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Rename QMediaEncoder to QMediaRecorderLars Knoll2021-06-161-2/+2
| | | | | | | | As per API review, this is the better name. Since we removed the old QMediaRecorder class, the name is free as well. Change-Id: I1ec9af3876af8b6957e20c13f9e225bf1e5032d5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove the inheritance between QMediaEncoderSettings and QMediaFormatLars Knoll2021-06-041-1/+147
| | | | | | | | | | 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>
* Fix crashes on Linuxwip/qt6Friedemann Kleint2021-05-261-3/+14
| | | | | | | Check for videosink and QPlatformMediaFormatInfo in QMediaFormat. Change-Id: I9603dae66fc4eb6a4433f43d2464e9f97916235f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make QMediaFormat movableVolker Hilsheimer2021-05-121-3/+31
| | | | | | | | | | 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>
* Support WAV format recordings on macOSDoris Verria2021-05-121-1/+1
| | | | | | | | Apple supports recording to a wav file so we can add the WAV container and audio codec to the list of supported encoding formats for macOS/iOS. Change-Id: Ic161d8ef1184d2d6040da6c07995b51b821b7bf1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QMediaFormat::ModeDoris Verria2021-05-121-5/+3
| | | | | | | | | 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-13/+4
| | | | | | 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/+9
| | | | | | | | | 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>
* Next steps in consistent class namingLars Knoll2021-03-021-7/+7
| | | | | | | | | | All platform interfaces should be named QPlatformMediaFoo. This is consistent with QPA in qtbase, where the backend for QFoo is called QPlatformFoo. Change-Id: I40e7b035638eb27e670210e149f6f8b717e21a63 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* More changes for QMediaFormat handling on the backendLars Knoll2021-02-091-310/+44
| | | | | | | | | | 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-23/+49
| | | | | | | | | 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-25/+124
| | | | | | | | | | | | | 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/+479
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>