summaryrefslogtreecommitdiffstats
path: root/src/plugins/android
Commit message (Collapse)AuthorAgeFilesLines
* 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-254-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0812-0/+445
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-201-1/+1
|\| | | | | | | Change-Id: Id4521553c437efa66ad52b2e419b446184a0ec11
| * Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-10-131-1/+1
| |\ | | | | | | | | | Change-Id: Ic398983a0a680738487476150e28593665db3fb2
| | * Use the setDataSource(String) overload for non assets/file pathsAndy Shaw2018-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The setDataSource(Context, Uri) is used for passing a Uri that refers to data in a content provider. Whereas the path passed here is going to be http/rtsp instead. This fixes the warning that comes up about it not being able to open the path provided. Task-number: QTBUG-50539 Change-Id: I79882fb6d6a5683b6b95f8f9d4e2af86ea916831 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-055-4/+113
|\| | | | | | | | | | | Change-Id: I600b0532f154dc885913f14a5d24261c0de93893
| * | Android: implement QMediaPlayer::setPlaybackRate()Yoann Lopes2018-09-265-3/+110
| |/ | | | | | | | | | | | | | | 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-032-2/+2
|/ | | | | | | | | | | | 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: remove support for local/debug deploymentJake Petroules2017-09-064-26/+20
|/ | | | | | | | | | | | | | This removes the pre-dexed JAR files activated by the absence of the bundled_jar_file CONFIG option, as versions of Android >= 5 no longer support this deployment mechanism. Now, the "bundled" JARs simply become normal JARs containing class files, and are neither activated by a bundled_jar_file CONFIG entry nor do they have a -bundled suffix in the file's base name. Task-number: QTBUG-62995 Change-Id: Ib53cbfe1009aa7e37de109dc317a58968854bf59 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* 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>
* Android: Add run-time permission check for recordingChristian Strømme2017-03-303-0/+16
| | | | | | | | | | | Check and request permission to record audio if needed. [ChangeLog][Android] Added run-time permission checks for media-recording. Task-number: QTBUG-55992 Change-Id: I781e5a5447f1ad03c069b2171637525ae9108d78 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Android: Add convenience method for checking and requesting permissionsChristian Strømme2017-03-222-0/+31
| | | | | | | | This will be used to check and request permissions at run-time. Task-number: QTBUG-55992 Change-Id: I344859aeb05fecf09ac46064e9452787d615a8a1 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Android: Add logging categoryChristian Strømme2017-03-223-2/+57
| | | | | | | Adds logging category for the android plugin. Change-Id: I0b0868fa7da4ce5426b3682ab40c4317afb79cd0 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-262-8/+8
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/qnx/qnx.pro sync.profile Change-Id: I353a44578276264a9ffb80820d8c5a0babfa1638
| * Merge remote-tracking branch 'origin/5.7.1' into 5.7Liang Qi2016-11-242-8/+8
| |\ | | | | | | | | | Change-Id: I6690c4161c57734ad03ee3e03311a3e62f181e89
| | * Pass the context to QtAndroidMediaPlayerBogDan Vatra2016-09-282-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | This way it can be used in a service Task-number: QTBUG-54506 Change-Id: I2d75b69dfbf7b345322f7625baf544af2af200c5 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-112-3/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qtmultimedia.pro src/multimedia/playback/qmediaplayer.cpp src/plugins/directshow/directshow.pro tests/auto/integration/qmediaplayerbackend/BLACKLIST Change-Id: I6dacdcbb223c1d12dd72eb308a67170983c709b3
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-042-3/+4
| |\ \ | | |/ | |/| | | | Change-Id: Ib038c5e3ebb48c0e46569a35d530fa5ceaf06a32
| | * Mark AndroidCameraInfo as movableChristian Strømme2016-11-011-0/+1
| | | | | | | | | | | | | | | Change-Id: I00b8444e00cbf3dc0d4a7c2ff8b83e217a8966f5 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| | * Android: emit mediaStatus changes before state changesYoann Lopes2016-10-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure all mediaStatus changes are emitted, even when some action is done on the media player as a result of a state change. Task-number: QTBUG-49578 Change-Id: I89594da2c2efc71103a7aa64f598eea4097425f6 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-179-89/+143
|\| | | | | | | | | | | Change-Id: Ib8d05d6e21c7beb19f618cd1edc52d248b1e43b8
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-137-63/+105
| |\| | | | | | | | | | Change-Id: I3204cdf695f4b47730a88a7c41fc7a6de967b161
| | * Android: Fix texture leak in QAndroidTextureVideoOutputChristian Strømme2016-08-124-55/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the ownership of the OpenGL resources and make it simpler to release individual resources as needed. Previously we would reset the texture handle without releasing it back to the system, making us leak texture each time the video output was reset. Also, be consistent with the type used for the texture handle. Task-number: QTBUG-54340 Change-Id: Ic3b3c7322677a909e51aa5983fa99ccf8b290302 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| | * Android: fix freeze when taking pictures on some devicesYoann Lopes2016-08-122-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | On some devices and on the emulator, the preview callback must be cleared before taking a picture to avoid a camera server freeze. Task-number: QTBUG-54709 Change-Id: I9e4ad417fa08cddea7edfd232f5b5df40ada59ee Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| | * Android: restart preview when image capture failsYoann Lopes2016-08-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | The preview must be restarted after taking a picture but were doing that only when the capture succeeded. We now also do it when it fails. Change-Id: I8bfff06a811d9333220050e5e81561438f5a3786 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| | * Android: don't process capture previews when capture is canceledYoann Lopes2016-08-121-0/+3
| | | | | | | | | | | | | | | Change-Id: Ia068b0fcc30412755639412ec03e49c740b66bed Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| | * Android: fix imageCaptured() signalYoann Lopes2016-08-122-7/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When capturing two pictures in a row, the second capture would not trigger the imageCaptured() signal. The reason is that capturing a picture restarts the preview when done, which in turns clears the cached last preview frame. The second fetchLastPreviewFrame() would therefore not do anything. In this situation, we now retry fetching the frame as soon as a new one arrives (rather than bailing out). Task-number: QTBUG-48975 Change-Id: Id5476f37641c04b0edd92bddd40711d5125887f0 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * | Replaced old license headers with new and correct onesJani Heikkinen2016-08-122-26/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced - header.LGPL3 with header.LGPL - header.LGPL21 with header.LGPL Change-Id: If11396da6ff12e9122281c17fc4354b05a554ee5 Reviewed-by: Ruslan Baratov <ruslan_baratov@yahoo.com> Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-027-28/+67
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/integration/qsoundeffect/BLACKLIST Change-Id: Icd2edd4410a4ee914d489634d26b262c0c146bf4
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Yoann Lopes2016-08-016-22/+62
| |\| | | | | | | | | | Change-Id: Ic29cb09048003f18ff86d4546cd547be715eaec8
| | * Android camera: use closest viewfinder resolutionAnatoly Stolbov2016-07-271-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some cameras difference between preview aspect rate and capture aspect rate is more than 0.01. Therefore it is better to use preview size with closest aspect rate. Task-number: QTBUG-50813 Change-Id: I1284c8ec2be1aa160a656e396a52960fa06aaa56 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| | * Make sure JNI_OnLoad is not called more than onceBogDan Vatra2016-07-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Android 5.0 Google introduce a nasty bug[1] which calls JNI_OnLoad more than once. Basically every time when a library is loaded JNI_OnLoad is called if found, but it calls *again* JNI_OnLoad of its .so dependencies! [1] Workaround https://code.google.com/p/android/issues/detail?id=215069 Change-Id: I81b4a94beedaad299267ac6deab2f9c3a1693a62 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>