summaryrefslogtreecommitdiff
path: root/src/imports/multimedia
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Update to latest qml CMake APIAlexandru Croitor2021-06-074-673/+0
| | | | | | Task-number: QTBUG-91621 Change-Id: I0a096697f692378f8be7b942d06ee231c399319d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename the QML plugin to quickmultimediaLars Knoll2021-06-031-3/+3
| | | | | | | | | declarative_multimedia is a Qt 4 style name. Change-Id: Ied48e4e883192986674b4cd5b1bb3957119bd629 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove qmldirLars Knoll2021-06-031-7/+0
| | | | | | | | | The file gets autogenerated by the build system nowadays. Change-Id: I764e6fa74eea338a2a97870c2703ff821e92c3b2 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a deadlock when changing the video outputLars Knoll2021-05-261-0/+1
| | | | | | | | | | | | | | | | | Changing the videooutput and deleting the mediaplayer directly afterwards could lead to a deadlock, as the videosink was blocking on a pad and then calling a slot on the main thread using a blocking queued connection. If the main thread was changing the state of the gst pipeline at the same time, this could lead to a deadlock. Avoid it by pausing the pipeline before changing the video output. Change-Id: I0d0cbad0ab97a4eb83dd3c66c664c01de3b0ea90 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a crash on macOS when running the qquickvideooutput autotestLars Knoll2021-05-201-1/+0
| | | | | | | | Just requires a nullptr check. Change-Id: I0e5b0cd75079bbce94529835e6512d99aace08f0 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge QPlatformCameraImageProcessing into QPlatformCameraLars Knoll2021-05-201-0/+1
| | | | | | | | | | | | Clean up the API while wer're at it, and rename manualWhiteBalance to colorTemperature. Simplify the backend API now that we only have white balance and color temperature in there. Change-Id: Ied8702b0c68a8fbea08d314d96c0261049db5b4d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge the QPlatformCameraFocus class into QPlatformCameraLars Knoll2021-05-181-1/+0
| | | | | | | | | | Adjust the backend API while we're at it, so that the base class does some of the state management and signal emissions. Slight cleanups of the code in the different backends. Change-Id: Ie246da060260c5aeb6af54e7414deb0395b0cdf1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove qmake files from the repositoryLars Knoll2021-04-231-41/+0
| | | | | | Change-Id: I1131b555014a57e3224a8871de4cb1d01c406fd1 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Clean up the file and class names for the mock backendLars Knoll2021-04-231-0/+1
| | | | | | Change-Id: I3750bdb99503a425757f149963370ae4100a011b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Fix camera and compilation on macOSLars Knoll2021-04-191-1/+0
| | | | | | | | | Follow up after the previous changes and make sure things compile and work again on macOS. Change-Id: I7415899eb84a788b8afa26fce7ec889301ce466a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move the remaining items from the QML plugin into multimediaquickLars Knoll2021-04-196-2039/+4
| | | | | | | | | | | Move the remaining code and docs from the QML plugin into libQtMultimediaQuick, so that all QML related code is in one place. Rename class names and files from qdeclarative* to qquick*. Change-Id: I159b9ddc6bfc113da62b5906596d82fac168ed84 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Convert the remaining QML APIs related to captureLars Knoll2021-04-1914-3157/+1
| | | | | | | | | Expose the C++ classes to QML instead of having all those wrapper classes. Change-Id: Id151a386a8f13da5c0eda3fa06a6e3b7032e0cb6 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* New QML API for image capturingLars Knoll2021-04-199-600/+6
| | | | | | | | | | | | | Adjust the QML API for image capturing to fit with the new handling of capture sessions. Simplify some things and avoid using a wrapper class to the largest degree by inheriting from QCameraImageCapture. Remove the old image capturing code. Change-Id: Ic99116f5202f2d0438fe0d048be2faa6687f0e4b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add error handling for QML Camera itemLars Knoll2021-04-191-0/+1
| | | | | | | | | | | | By adding some Q_PROPERTYs and a changed signal for errors. And rename the QMediaPlayer::error() signal to errorOccurred(). This doesn't conflict with the error() getter and makes it consistent with the Camera item. Change-Id: I9d94d86df64066b5b6b2bfa9229d45b80b91b09f Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Start using the new type registration scheme for QML typesLars Knoll2021-04-163-1579/+5
| | | | | | | | | For now, this is only partially used, mainly for the C++ types we can expose directly. Some more cleanups in the qml plugin are required. Change-Id: I05085d3622dca1b3152895e1af035fbe3549b23d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add a couple of Q_PROPERTY macrosLars Knoll2021-04-161-0/+1
| | | | | | | | And export ImageCapture for Qt Quick. Change-Id: Ie9385a4a4a4212d06ffadf242a0e047d95b76226 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Register the C++ based API under new names to be able to test itLars Knoll2021-04-161-0/+9
| | | | | | | | | | | The C++ classes will get exposed directly and replace the wrapper classes that got used in Qt 5.x. Expose them under their name prefixed with 'N' for now to test them. They will eventually replace the old implementation. Change-Id: Ia79ee788552a2253b6a310a1ff57d004ecf00adc Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Use QCameraFocus directly in QMLLars Knoll2021-04-166-238/+20
| | | | | | | | | | | And get rid of QDeclarativeCameraFocus. At the same time move the zoom methods into the CameraFocus object to be consistent with our C++ API. Change-Id: Ic20027dd320453704d6a5ab3c57bd21e55b4fa90 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Get rid of QDeclarativeCameraImageProcessingLars Knoll2021-04-166-474/+3
| | | | | | | | | Expose QCameraImageProcessing directly to QML. The API is the same. Change-Id: I6f0e3d7f7eef7e1d593152edae5df98d260c6f66 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Kill all versioned importsLars Knoll2021-04-162-69/+19
| | | | | | | | And don't register the items with a version neither. Change-Id: I514480fe7570cba468404bc891f238991690f499 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Expose QMediaMetaData as a value type to QMLLars Knoll2021-04-168-627/+4
| | | | | | | | And get rid of the QML wrapper class. Change-Id: Idd024bb9582f7d27c943ad5e065914337216bdd5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Get rid of QDeclarativeAudioLars Knoll2021-04-164-815/+12
| | | | | | | | | | The class was a wrapper class for QMediaPlayer used for the MediaPlayer and Audio QML types. Remove it, as QMediaPlayer can be exposed directly. Change-Id: I46a13741ceb170db57c8bb54b7a922e483eab537 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* API cleanups in QMediaPlayerLars Knoll2021-04-162-21/+22
| | | | | | | | | Rename some methods with better names and adjust the API so that it also can be used for QML. Change-Id: Ica19675966680416fbe870808336d8fc82065bc1 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Remove the graphicsType enum from QVideoSinkLars Knoll2021-04-161-1/+0
| | | | | | | | | This is redundant, as we can determine the type from whether we have a native window id or an RHI handle set on the sink. Change-Id: I7795e2f1d504fb7df107d1a402ae55adff33d05b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QAbstractVideoFilterLars Knoll2021-04-142-8/+0
| | | | | | | | | | | | | | The API covers a relatively rare use case, and is far from ideal, as it doesn't cooperate very well with HW accerlerated rendering. Since QVideoFrame and the QML VideoOutput item offer the option to get a texture for the frame, it's probably better to use that as the basis for further processing. Change-Id: I89deb915f660312fb3a83b066a5371f5454346da Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the notifyInterval() functionalityLars Knoll2021-04-084-65/+0
| | | | | | | | | This was nothing else than a timer, something you can just as well implement on top of Qt Multimedia if required. Change-Id: I1ef362f1f4ad5a5f85e92bfbb1d73b7710271e5c Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QMediaPlayer::setCustomRole() and relatedLars Knoll2021-04-084-89/+0
| | | | | | | | | setAudioRole should be enough here. And if more roles are required, let's rather extend the enum. Change-Id: I40194171c6053ffa1d3adf309e77d85a8c6524e2 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove packed pixel formats that can't be HW acceleratedLars Knoll2021-04-081-0/+1
| | | | | | | | | | | Remove 24bit packed pixel formats, as those would require unpacking on the CPU to be able to be processed efficiently on the GPU side. As such, they are not really formats that should be used for uncompressed video. Change-Id: I29c8b87aeaf97aee13ea2b93afd5115741198eee Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Simplify rendering code for video frames by always using CVPixelBuffersLars Knoll2021-04-081-1/+0
| | | | | | | | | | | | | | | | Fix compilation on iOS/macOS. Always use CVPixelBuffer and a AVPlayerItemVideoOutput to access the texture data. This gives a unified code path between macOS and iOS. Apple has fast conversions of CVPixelBuffers to Metal and OpenGL textures, so this will significantly simplify the output code paths on Apple platforms. Change-Id: I3dd847b881ef700923aac40fcc51560d9e1a0008 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QAbstractVideoSurfaceLars Knoll2021-04-061-18/+0
| | | | | | | | We're not using it anymore, QVideoSink is the replacement. Change-Id: I6b29838c39db421d5bca281b28e97e0e0b72caad Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Fix video playback on WindowsLars Knoll2021-04-061-0/+1
| | | | | | | | | | Adjust to the output architecture changes. Things compile and windowed playback does work again. Textured and SW playback will require more work. Change-Id: Iab433c0821167c7c7de2e5c41330e922313327af Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Fix compilation on AndroidLars Knoll2021-04-061-1/+0
| | | | | | | | | | Only checked that it compiles. This will require some work to get working correctly again and clean up naming inside the code base. Change-Id: I96fb6510dc7bba0264da09395ada2ea96af70261 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Don't add cameraControl and imageCaptureControl on session initializationDoris Verria2021-04-061-1/+1
| | | | | | | | | | | | Add API for adding and relasing a session's cameraControl and imageCaptureControl. The session is audio-only until attaching a camera to it, so initialize the cameraControl on addCamera(). Do the same for the imageCaptureControl. Still need to change for other platforms besides darwin. To be followed by changes in the mediaEncoder too. Change-Id: I69097c73b745ffef3727135312a36f1f1d2627e5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up most QAbstractVideoSurface usagesLars Knoll2021-04-062-11/+6
| | | | | | | | | | The class is scheduled to be removed, once all it's usages are gone. QVideoSink is the replacement going forward. Change-Id: Idc0a4133496839bf9f95aa9bcf7d6d37cacd549b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the custom video surface examplesLars Knoll2021-04-061-0/+2
| | | | | | | | | | | They are actually pretty bad examples, as they use QAbstractVideoSurface (which completely changes), and worse, draw everything in software, which is really bad performance wise. Change-Id: I6e6b51baa0915cc52f0741fc47fcbd105d880491 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix compilation on macOSLars Knoll2021-04-061-2/+0
| | | | | | Change-Id: I2043be014eb2edc4892cf2190805bcfc626f1fb3 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Fix QML video renderingLars Knoll2021-04-061-6/+9
| | | | | | | | | | | Use the new QVideoSink class to get the video frames. Fix some APIs, so that we correctly connect VideoOutput and MediaPlayer. Change-Id: I65a0d045988c46a917f70dfb922c1bbdb32f6511 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get windowed playback working againLars Knoll2021-04-061-0/+1
| | | | | | | | | | | And start moving over to the new QVideoSink API. Fun side effect: HW accelerated video decoding does work with this change on Linux. Change-Id: Ic88d13b4fc7028b300349f9bf7ed1a7b3e08d37c Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QCameraImageCapture::cancelCapture()Lars Knoll2021-03-192-11/+0
| | | | | | | | | | | This feature just complicates the implementation for a very questionable gain. The functionality wasn't implemented on half the backends anyway, and whether cancelling is successful is highly timing dependent. Change-Id: Ie3abef3ff7c17ad9e62aebd52c92acd2649f789a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Some fixes to meta data handlingLars Knoll2021-03-191-3/+0
| | | | | | | | | | | Remove the year property, Date is much more useful and complete (plus it's supported everywhere). Fix some bugs in the gstreamer implementation. Change-Id: Ib2be80e73bc432e7dfa20e33da782017194db5dd Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move the audio input settings from the encoder to the capture sessionLars Knoll2021-03-182-4/+6
| | | | | | | | | This is closer to where those settings should be. They certainly don't belong into the media encoder. Change-Id: I45801ee7c875600719052b6ae41e1ea5c04e4389 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add a QMediaEncoder classLars Knoll2021-03-172-68/+68
| | | | | | | | | | | | | | | This class is currently a simply a rename of QMediaRecorder, but they will start to diverge in the next commits. QMediaRecorder is now an all-in-one class, that contains a QMediaCaptureSession and handles standard recording cases. QMediaEncoder will in the next couple of commits loose APIs that should be in other places in the capture pipeline. Change-Id: Ied1098092920610dac08e966078d44a22110bcf7 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make QMediaCaptureSession the new central class for media capturingLars Knoll2021-03-167-80/+14
| | | | | | | | | | | You now need to instantiate a capture session and hook up camera, image capture and recording to it. This gives a cleaner architecture for the whole capturing process. Change-Id: I7c7f6c4a841512b038834f4653ef7ab790c43f8f Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the mediaSource propertiesLars Knoll2021-03-164-11/+0
| | | | | | | | | Those provide access to the underlying C++ object and do not make a whole lot of sense. Change-Id: I22c8c8e0f44d76423b282d87b72a1184786b82f7 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-162-7/+7
| | | | | | | | 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>
* Some cleanups in QVideoSurfaceFormatLars Knoll2021-03-163-10/+0
| | | | | | | | | | | Remove the pixel aspect ratio property. It's almost always 1/1 or something very close to it. Remove the pseudo property API. If we need to bind this to QML as a value type there are better ways to do it. Change-Id: I02f2170b0f1672529e298593a668eb418caed964 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move HandleType and MapMode from QAbstractVideoBuffer to QVideoFrameLars Knoll2021-03-161-0/+1
| | | | | | | | | | QAbstractVideoBuffer is a class that is only required inside our implementation, so we can make it private. This change prepares for it. Change-Id: I4ba4542c1eab742f2fc93231e2e5063dbc5d5e94 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Simplify state handling in QCamera and QMediaRecorderLars Knoll2021-03-1610-143/+49
| | | | | | | | | Remove the loaded/unloaded states. Instead simply have a boolean indicating whether the camera is active. Change-Id: I1dad15f2c4f2f606f6d64320cea3763d1213a09b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove enum values that do not make senseLars Knoll2021-03-163-8/+2
| | | | | | | | Vendor specific extensions where anyway never used. Change-Id: I70a15e05a22fdcd6b4a44cdf2cbbda7d81a13336 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QCameraFocus::focusPointMode propertyLars Knoll2021-03-164-134/+4
| | | | | | | | | | | | | It doesn't make a whole lot of sense to have this. The only thing that we can properly support is setting a focus point, but that doesn't require all the additional API here. Add support for retrieving the current focus point of the camera if the camera support it. Change-Id: I3ef31db8f0bfeb9d7e5d4e84ee8614637779a2c5 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>