summaryrefslogtreecommitdiffstats
path: root/src/plugins/android/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-5.15.13' into ↵v5.15.13-lts-lgpl5.15Tarja Sundqvist2024-01-045-4/+74
|\ | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I3b153fa928169f990cd278566dda2f7c7706a015
| * Android: Handle Pause() by QAudioRecorderBartlomiej Moskal2023-01-054-4/+68
| | | | | | | | | | | | | | | | | | | | Add implementation for pause() method for the QAudioRecorder on the Android side. Fixes: QTBUG-106897 Fixes: QTBUG-105505 Change-Id: Ie98b35c2c5dcb09c141c0216ba01c732e85e75a4 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
| * Fix access to multi front/back cameras on Android devicesAndrey Yaromenok2022-12-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Allow to access second (and more) front or back cameras on Android devices by adding a counter number at the end of additional camera name and description (don't need to brake current code compatibility or confuse majority of the users with only one front/back cameras on their devices) Fixes: QTBUG-59726 Change-Id: Icecb3af7521d4bbd3fbb0b953895c045cfdbf60a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.11' into ↵v5.15.11-lts-lgplTarja Sundqvist2023-06-091-2/+13
|\| | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I3279e8339e4fadcc6d5aaafa01e4b15a92168a6c
| * Android: Align emit sequenceSamuel Mira2022-06-221-2/+13
| | | | | | | | | | | | | | | | | | Change the emit sequence according to match docs and other platforms. Fixes: QTBUG-104041 Change-Id: Ic7a3b25d0b0538414b5b467b57a61790238692ed Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-2581-1691/+1691
|/ | | | | | | | | | | This reverts commit 80d46e3a5f64ff2456c40bdba63b6d5c69a32cdd. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I5c64ffa120f916711e5cf01c828774f8456dec06 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Update commercial license headersTarja Sundqvist2021-01-2781-1691/+1691
| | | | | | | | | | | | | | | | Updated header.COMM to files in tqtc-qtmultimedia. Examples, tests or documentation files are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reaso for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4171 Change-Id: I86ebf7c3653b55983cefff246c0cb019cbcda8c4 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-03-022-5/+5
| | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I72aa0ccae06030043ba40f0f908826e5ca4a31ab Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-211-2/+2
|\ | | | | | | Change-Id: I0bc0e3caceaca0def467237983d9c611c46c5d7a
| * Android: JNI_OnLoad return JNI_VERSION_1_6 instead of JNI_VERSION_1_4Assam Boudjelthia2020-01-201-2/+2
| | | | | | | | | | | | | | | | Update instance of old code using JNI_VERSION_1_4 to make the code consistent. Change-Id: I21a3f7eb43614896536838f83bd5eb6027af64c1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-2010-23/+72
|\| | | | | | | Change-Id: Ib250ceecd02291f752b7775f329f0f494c4aed38
| * Android: Remove usage of qt_androidRequestPermissionVal Doroshchuk2019-11-154-15/+13
| | | | | | | | | | | | | | Use specific function instead, e.g. qt_androidRequestCameraPermission. Change-Id: I925e4d8ac4f1993c073930a79453894dd516d769 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Android: Don't close camera when recording permission is askedVal Doroshchuk2019-11-157-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If camera permission is granted and recording is requested it also requires recording audio permission. If it was not granted before the popup will be shown to ask the user to grant the permission and the app goes to inactive state, which destroys the camera handlers. When the camera is loaded but the app requires additional permissions, it should not destroy the camera. Change-Id: Iee3662a7ac3381b0eb29190779b0116f9f64304f Fixes: QTBUG-79909 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-142-0/+38
| |\ | | | | | | | | | Change-Id: Ie351f3c36eecf9e83a5b6a55ec0aac27387b5656
| | * Android: Fix fetching video frame data from the GUI thread5.13Val Doroshchuk2019-11-122-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If QAbstractVideoSurface is not used on rendering thread added a way to pass shared opengl context via GLContext surface property. Camera and media players that are created in Qt Quick will usually have their rendering done on the render thread, but the callback for custom video surface(s) (or probes) will usually be handle on the GUI thread, so to make it convenient to for the user to access the frame data, which is rendered on request, we now set-up context sharing and render to a fbo on the calling thread, if needed. Task-number: QTBUG-69333 Change-Id: I4cc5c1f741c82376f1402a047b946b59281c9a4c Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | Introduce QVideoFrame::image()VaL Doroshchuk2019-10-311-2/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Since QVideoFrame::pixelFormat's do not 100% match QImage::Format's, introducing converstion function. Returns an image based on current frame. Converts data if needed to supported QImage format. Change-Id: I3331578c01cf9c999a380efc4a83bf9eddb07901 (cherry picked from commit 93f966335e1ed8ed47b7e8b32452d43c2f8a7bb1) Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Remove usages of deprecated APIsSona Kurazyan2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace the usages of deprecated APIs by corresponding alternatives. - Made the tests for deprecated APIs to compile conditionally, based on the deprecation version. Task-number: QTBUG-76491 Task-number: QTBUG-76540 Task-number: QTBUG-76541 Change-Id: Ifd397dae9b3ebc2ba2504db7baa2d8ff21bfb3a7 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Port from QMutex::Recursive to QRecursiveMutexMarc Mutz2019-08-011-45/+46
| | | | | | | | | | | | | | | | Also port from QMutexLocker to std::lock_guard or std::unique_lock, as the former will not support QRecursiveMutex going forward. Change-Id: I1ed1a129e2b9b77aa0a729e8cab03c673566a345 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Remove usages of deprecated qSortSona Kurazyan2019-06-201-2/+2
| | | | | | | | | | | | Task-number: QTBUG-76491 Change-Id: I7a22d6612848e25bb780d205c6cdbb314cd4762d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-182-12/+43
|\| | | | | | | Change-Id: I82d63ba32a0c9f8b883d00ef1bd68df3a10da96c
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-142-12/+43
| |\ | | | | | | | | | Change-Id: I03225f5e980a69246b046351f7d7d8e84f102ca0
| | * Android: Allow starting camera without viewfinder availableVal Doroshchuk2019-05-131-11/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it is not able to start camera without viewfinder. For this purpose there is QAndroidCameraDataVideoOutput with SurfaceView in order to be able to start the camera preview. Implemented dummy QAbstractVideoSurface to render to it when no video output is provided before starting the preview. Task-number: QTBUG-73582 Fixes: QTBUG-73237 Change-Id: Ic76d247b5d5352e8539ba61271484e56d3a40fbd Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * Android: Don't open camera if it was already openedVal Doroshchuk2019-05-131-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The application should only have one Camera object active at a time for a particular hardware camera. Since there is no way to determine that the camera has been already opened by the same application, added a fix to prevent opening the camera if it was already opened and not released. Task-number: QTBUG-73582 Change-Id: Ide9ddea0c32489d86a613846ecf2e91ef94a776c Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | Deprecate canonicalUrl and canonicalRequest in QMediaContentVaL Doroshchuk2019-05-132-3/+3
|/ / | | | | | | | | | | | | | | | | | | | | Since QMediaContent can contain only one content and media resources are already deprecated, canonicalUrl and canonicalRequest are a bit confusing and outdated. Deprecated and replaced by QMediaContent::request() which already contains the url. Change-Id: I418006e112f49466b0129bf1e6e1ae629c714538 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-042-19/+23
|\| | | | | | | Change-Id: Iedfcb12f51d26843d062d443d11eef5959d1c4bd
| * Android: Don't postpone setting of camera's stateVal Doroshchuk2019-05-032-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if the application is inactive, the state is postponed to be set and processed when the app becomes active. This also postpones stateChanged() signal and saving the state value, while it should be set (but not processed) immediately as done in another backends. Added a fix to store the state and emit stateChanged regardless of activity of the application. When the application becames available, the state will be processed. In case of an error while opening the camera: - UnloadedState is emitted - CameraError - UnloadedStatus Change-Id: Ie376d29366168a6b15eccea884f385070f94fe35 Task-number: QTBUG-73582 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-04-103-46/+36
|\| | | | | | | | | | | | | | | Conflicts: tests/auto/integration/qdeclarativevideooutput/tst_qdeclarativevideooutput.cpp Done-with: Val Doroshchuk <valentyn.doroshchuk@qt.io> Change-Id: I745dd948c1e98180115f85c17bef802351bbdb6b
| * Android: Fix status of QMediaRecorder after start/stopVal Doroshchuk2019-04-032-45/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the camera is ready for capture -> QMediaRecorder::LoadedStatus. If CaptureVideo is changed to CaptureStillImage -> StoppedState and UnloadedStatus. If camera's status is StoppingStatus -> StoppedState and UnloadedStatus. If camera's status is LoadingStatus -> LoadingStatus. If recording is requested -> RecordingState and RecordingStatus. If recording is audio-only -> immediately LoadedStatus, before start and after stop. Fixes tst_QCameraBackend::testVideoRecording Task-number: QTBUG-73582 Change-Id: I976c4e3afab529e0949571c4002e9ceba74cac97 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| * Android: Use CaptureStillImage as default capture modeVal Doroshchuk2019-03-281-1/+1
| | | | | | | | | | | | | | | | Fixes tst_QCameraBackend::testCaptureMode. Change-Id: I2f6486102ebcbf7e1ab0feea8c13658772d5b90f Fixes: QTBUG-73582 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Android: Introduce HTTP headers to MediaPlayerVal Doroshchuk2019-03-253-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Added using the headers from QNetworkRequest to be sent together with the request for the data in MediaPlayer::setDataSource. The MediaPlayer requires also a Context object, together with headers, to resolve the Uri. It will try to find a content provider. Since no content providers are implemented, this produces a warning: "MediaPlayer: Couldn't open file on client side; trying server side: java.io.FileNotFoundException: No content provider" Task-number: QTBUG-74073 Change-Id: I1566953b523e84400882ba9d3a968cec6b4a61cf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Android: Implement audio rolesVal Doroshchuk2019-02-0811-0/+420
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced custom and standard audio role controls using MediaPlayer.setAudioAttributes(AudioAttributes) which added in API level 21. Custom audio roles might contain a list of roles separated by comma. E.g "CONTENT_TYPE_MOVIE,USAGE_ALARM", which means content type is movie and usage is alarm. [ChangeLog][Platform Specific Changes][Android] Implemented audio roles. Task-number: QTBUG-73119 Change-Id: I281d1ce899d29f54d271516a1fca5f11c897fc90 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-022-8/+17
|\| | | | | | | Change-Id: Ia13d887c3e3bf00b6ded5d052384fc5689b816fe
| * Android: Fix memory leak of GL resourcesVal Doroshchuk2019-01-312-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DeferredDelete events have implicitly higher priority, which makes this event to be handled before MetaCall events. See QSGSoftwareRenderThread::sync(): ... QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete); Where it processes deferred deletes and no meta calls will be delivered even if they were requested before the deferred delete. Task-number: QTBUG-67280 Change-Id: Iba23550d2cffb1cea1b4c2fe4c903078d9f2f046 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-054-4/+108
|\| | | | | | | Change-Id: I600b0532f154dc885913f14a5d24261c0de93893
| * Android: implement QMediaPlayer::setPlaybackRate()Yoann Lopes2018-09-264-3/+105
| | | | | | | | | | | | | | | | Only possible on Android API level 23 or higher. Task-number: QTBUG-61115 Change-Id: I147575ed0a48f84d4208978a67e0856918e65b3d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Android: Fix crash when play() is called but state is not setVal Doroshchuk2018-09-241-1/+3
| | | | | | | | | | | | | | | | | | Change state to PlayingState only when media content has been provided. Task-number: QTBUG-70653 Task-number: QTBUG-68998 Change-Id: Iad8fc2c964ff22e90de6eb9b84c82a0950d0b1ac Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Android: Change video frame format from BGR32 to ABGR32Val Doroshchuk2018-10-031-1/+1
|/ | | | | | | | | | | | When mapping video frame, data will be downloaded to QImage from frame buffer with QImage::Format_RGBX8888 which is XBGR32 in Little Endian. Thus added new pixel format QVideoFrame::Format_ABGR32. Changed QVideoFrame::Format_BGR32 to QVideoFrame::Format_ABGR32. Task-number: QTBUG-69968 Change-Id: I0f58d1a5b5cbdb5ab48ee5ad4d75f9b62f516333 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Android: Fix the player state when play() is called with no mediaVal Doroshchuk2018-08-161-2/+1
| | | | | | | | | | | | If play() is called before any media is set, don't change the current state to PlayingState. This was inconsistent with the other backends, and required an unneeded call to stop() when a media later got set. Task-number: QTBUG-68998 Change-Id: I8281c7bf83e36e9a80f2136ca9fc2430c55e8bd6 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Replace deprecated qSort() by std::sort()Friedemann Kleint2018-02-281-2/+4
| | | | | Change-Id: I74ffd5bafaef9ebbe7f12600ad831c8deb58ae64 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-061-1/+0
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I5acdc7e0bd3729b80522dfff0f388cf2507fb111
| * Revert "Android: Set the correct scan line for the video surface format"v5.10.0-rc3v5.10.0-rc2v5.10.0Christian Stromme2017-11-281-1/+0
| | | | | | | | | | | | | | | | | | | | The change causes the video output to be shown upside down. This reverts commit 2ec485482d185f92e4de33f634bc3ef9dd6c9188. Task-number: QTBUG-64764 Change-Id: I9d3e63d2c0cce17d945b62ffead38ab5f58ace7f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-201-3/+7
|\| | | | | | | Change-Id: Icaf645e271b21320c4cb6269178d9e722092a263
| * Fix crash when an app is sent to background while capturing an imageVal Doroshchuk2017-11-101-3/+7
| | | | | | | | | | | | | | | | | | | | | | Since the native notify* methods for QtCameraListener.java are executed on different thread, there is a potential for a race condition when the applicationStateChanged is received before the notify* signals, which leads to the camera being release before the slots are executed. Task-number: QTBUG-52366 Change-Id: Ifc82f3a75a7e88e4e76fac3edbf16bb9f138fde7 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-271-0/+1
|\| | | | | | | Change-Id: Ib509a8c90dd6c7229510a400612cc27a4957d015
| * Android: Set the correct scan line for the video surface formatChristian Strømme2017-10-231-0/+1
| | | | | | | | | | | | | | | | | | The default value for QVideoSurfaceFormat is TopToBottom, so we need to change it. Task-number: QTBUG-51213 Change-Id: I47826a60fbae57f3d30d358a9ab8f05b784aeebd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Replace Q_NULLPTR with nullptrKevin Funk2017-09-271-2/+2
| | | | | | | | | | Change-Id: I3b7601b4a97f8a2b1d2da6ef134f1577846ba713 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-2223-133/+133
|/ | | | | Change-Id: I17b3650a3df5688274151c1f2c4629e4a5062028 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Android: Fix crash caused by stale video-frame objectsChristian Strømme2017-04-272-18/+36
| | | | | | | | | | Make sure that the frame being processed is still valid, that is, the size is valid and correct, and that the frame buffer is accessible. Task-number: QTBUG-60115 Change-Id: Ic64b6f7d45d92b7923d97d6ecdc630da31abee17 Reviewed-by: Michael Dippold <mike@dippold.com> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Android: Run-time permission checks for cameraChristian Strømme2017-04-233-1/+16
| | | | | | | | | | | | | | | The camera should ask for permission before being used. Normally this should be handle by the user, which can provide proper reasons for why the camera is used. To verify that we are allowed to open the camera, and as a good default, we'll check the permission and request access if needed. [ChangeLog][Android] Added run-time permission checks for accessing the camera. Task-number: QTBUG-55992 Change-Id: Ifb4e176728aab3076fdba292e17e17d33b1260a2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Android: Fix camera preview orientationChristian Strømme2017-04-203-0/+19
| | | | | | | | | | | | Before API level 24 the display orientation (the preview) was always set to 0. On newer versions of Android the clockwise rotation is set to be either 0 or 180, depending on the hardware. Since we don't want Android to apply transformation on our surface, we'll just enforce that the display orientation is always set to 0. Task-number: QTBUG-56536 Change-Id: Ie1aacda97540d5c97e6cbd8edb2afc53e7041e1e Reviewed-by: Andy Shaw <andy.shaw@qt.io>