summaryrefslogtreecommitdiffstats
path: root/src/multimedia/qmediaformat.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix potential thread-safety on lazy media format initializationArtem Dyomin2023-09-061-14/+3
| | | | | | | | | | | | | Let's have a common approach of lazy media format initialization for all platforms. The approach was introduced in some recent CR, but it hasn't been integrated due to other reasons. Pick-to: 6.5 6.6 Change-Id: I0fff558463753149d2381a2435f8ba300243f0a8 Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Include moc_*.cpp files in main QtMM codeArtem Dyomin2022-12-131-0/+2
| | | | | | | | | | | | | | | The reason of the refactoring is following the common approach that leads to reducing compilation time and binary size. - logic hasn't been touched - some headers have been decoupled into header and cpp - the same refactorings of examples, tests, plugins are coming in the next commits Task-number: QTBUG-103290 Pick-to: 6.5 6.4 Change-Id: I6716cef5116769230c36e8d584d9ba6ec40aabb2 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Doc: Fix the remaining qdoc warningsVenugopal Shivashankar2022-10-101-1/+1
| | | | | Change-Id: I1136925b83ce75d4983d7070d01557e3b5152397 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Fix undocumented members warningVenugopal Shivashankar2022-10-071-0/+32
| | | | | | Pick-to: 6.4 Change-Id: I465dd06e2bd20755c39b1f5953a6e57d49c877b3 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-241-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ida08dfe6c84778656e942178c3d39042c9ef1ed2 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Doc: Replace \qmlbacsictype with \qmlvaluetypeJaishree Vyas2022-03-211-1/+2
| | | | | | | | A more descriptive name for this command would be \qmlvaluetype Task-number: QTBUG-96776 Change-Id: I24f1f859695d4d16587867e8af9060ef140c693a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Fix for return value of mimeTypeForFormat issuePekka Gehör2021-11-081-2/+2
| | | | | | | | | | After the fix mp3 and flac types are also in the right place in the list. So, saved file types are correct. Fixes: QTBUG-98023 Pick-to: 6.2 Change-Id: I7c89f6482a074e0b9f2af654c7cab25f62960473 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Clear remaining documentation warningsTopi Reinio2021-09-241-1/+1
| | | | | | | | | | * \qmlbasictype does not allow \instantiates information. * QMediaMetaData::Key values are documented in the class description, so link there when referring to individual keys. Pick-to: 6.2 Change-Id: Id754afd847d94911b88cb304c405293f5c9a246d Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Fix the remaining qdoc warningsLars Knoll2021-09-221-19/+4
| | | | | | | | Fix all qdoc warnings inside the Qt Multimedia module. Pick-to: 6.2 6.2.0 Change-Id: I4a581aa4f9fa9d96d58279884116ed10ca7bf837 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fixes to mediaFormat value type docsLars Knoll2021-09-221-58/+58
| | | | | | | | | | The type is exposed to QML as 'mediaFormat', so document it as a value type with a lower case 'm'. Fix the enumerations to be prefixed with MediaFormat. (note upper case 'M'). Pick-to: 6.2 6.2.0 Change-Id: I2f420b1d8b46007f8ab1f4e61cd8196f8793022e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix docs for QMediaFormatLars Knoll2021-09-211-15/+280
| | | | | | | | | | | | Add documentation for QML, add a Q_INVOKABLE for three methods that we need on the QML side and add docs for methods that were not documented for C++. Task-number: QTBUG-95066 Pick-to: 6.2 6.2.0 Change-Id: Iff1504a7964aeceb1fd97677556338e87bfb89f7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Fix various documentation issuesTopi Reinio2021-09-091-12/+26
| | | | | | | | | | | | | * Fix linking issues * Document all QMediaFormat::AudioCodec enum values * Fix example \quotefromfile paths * Document QMediaFormat::ResolveFlags * Drop links to removed classes/functions Pick-to: 6.2 6.2.0 Fixes: QTBUG-96340 Change-Id: Iae82295e9cd396b392af2e577b21158ad1509fd3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* 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>