summaryrefslogtreecommitdiffstats
path: root/src/plugins/android
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| | * Android: Fix OpenGL texture name leakPavel Golikov2016-07-061-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes texture name leak when changing media player's source. Texture name shold be deleted by OpenGLResourcesDeleter class, but when player's source is changed OpenGLResourcesDeleter's texture name is reassigned with new one without old name deletion. This change deletes OpenGLResourcesDeleter's current texture name when new name is assigned. Task-number: QTBUG-54340 Change-Id: I22bbd60b4462b0034fd115f0582ea43b9bcaee4b Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| | * Android: Fix attach- and detachFromGLContext()Christian Strømme2016-07-053-19/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression caused by ba8127639857232d8a. The change assumed that the AndroidSurfaceTexture class could cope with changing textures, but since the callback from the SurfaceTextureListener was tied to the initial, invalid, texture handle, it would only work as long as there were only one texture; all textures would register the callback to the same invalid handle. This change maps the callback directly to the android texture object, instead of the texture handle. Task-number: QTBUG-54340 Change-Id: I39568d0f97fa6b9cb1182efaca568b16a26f0d09 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| * | This module doesn't need an Activity to work, a Context object is enoughBogDan Vatra2016-07-261-6/+5
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-54506 Change-Id: I81ad9b90fdc55aaaa828ef8256edb7bccca45e64 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-07-212-1/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/directshow/player/directshowiosource.cpp One side disintermediated filling a vector; the other reduced it to one entry. src/plugins/directshow/player/directshowiosource.h One side renamed a member, the other added another adjacent to it. src/plugins/pulseaudio/qpulseaudioengine.h One side added a header, the other replaced the next with a different header. Change-Id: I3a031975f5af43ca39cca571f215c612f640b7d6
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-302-1/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blacklisted a few functions in tst_QAudioInput. Conflicts: .qmake.conf src/plugins/avfoundation/camera/avfcameracontrol.mm src/plugins/avfoundation/camera/avfcameraservice.h src/plugins/avfoundation/camera/avfcameraservice.mm src/plugins/avfoundation/camera/avfcamerasession.h src/plugins/avfoundation/camera/avfcamerasession.mm src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.h src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm src/plugins/avfoundation/camera/avfimagecapturecontrol.mm src/plugins/avfoundation/camera/avfimageencodercontrol.mm src/plugins/avfoundation/camera/avfmediarecordercontrol.h src/plugins/avfoundation/camera/avfmediarecordercontrol.mm tests/auto/integration/qaudioinput/BLACKLIST Task-number: QTBUG-54459 Task-number: QTBUG-49736 Change-Id: I3a1fe8cef50b44d5c2785aaf4cf69fe3f16728e6
| | * Android: Fix crash in AndroidCamere::open()Christian Strømme2016-06-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We would attempt to delete the AndroidCameraPrivate object twice if the native call to open failed. On recent version of Android (~6.0), this problem is harder to reproduce, as the camera is properly released when the application goes into the background. Task-number: QTBUG-53536 Change-Id: I064d276f9025924dfdb071aa52311d2b553c6953 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| | * Android: flush the current video frame when the video output is reset.Yoann Lopes2016-06-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | The texture renderer could end up in a situation where a frame could be scheduled to be rendered after the renderer was reset. Change-Id: Ie6b6c9d0b5f5851f14aa6eb5f8421196aff8c691 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-1110-45/+519
|\| | | | | | | | | | | Change-Id: Iffd8d86489161c49a647cae77a31f5451b06cf4b
| * | Implement QCameraViewfinderSettingsControl2 interface for AndroidRuslan Baratov2016-06-0210-45/+519
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add class QAndroidViewfinderSettingsControl2 which implements QCameraViewfinderSettingsControl2 interface. This make next QCamera methods working on Android: * QCamera::setViewfinderSettings * QCamera::supportedViewfinderFrameRateRanges * QCamera::supportedViewfinderPixelFormats * QCamera::supportedViewfinderResolutions * QCamera::supportedViewfinderSettings * QCamera::viewfinderSettings Originally from: * https://github.com/headupinclouds/gatherer/issues/109 Change-Id: Ic43e434289a626691f01ed9832654fa9b0105c7d Reviewed-by: Ruslan Baratov <ruslan_baratov@yahoo.com> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Android: fix media player volume.Yoann Lopes2016-06-091-12/+1
|/ / | | | | | | | | | | | | | | Qt expects a linear volume, so does Android. We don't need to do any conversion. Change-Id: I35acf0040aff0c6c0d812b4d11fe42a7a6a97ed0 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-104-13/+63
|\| | | | | | | | | | | | | Conflicts: src/plugins/winrt/qwinrtcameracontrol.cpp Change-Id: I45d3042adf19577a72794610fa1c310cb22e26c4
| * Android: improve texture rendering on API level >= 16.Yoann Lopes2016-05-104-13/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Android API level 16 added SurfaceTexture::attachToGLContext(). This allows to create the OpenGL texture when the first video frame is available, rather than at initialization. This means we can do without the ugly hack that makes the render thread call us back through some custom property. Additionally, it allows to recreate a new OpenGL texture every time the SurfaceTexture is reset. Task-number: QTBUG-51911 Change-Id: I17b04524d426c42ef8aa0288b0731597bc9eba62 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * Android: detect more error cases when rendering frames to textures.Yoann Lopes2016-05-091-0/+3
| | | | | | | | | | | | | | | | Don't render the frame if the SurfaceTexture has been released or if the render size is invalid. Change-Id: I6b8bf14e023ff54a560b0a9e6027ef9d7d06ab6a Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
| * Android: correctly use mutex for texture rendering.Yoann Lopes2016-05-091-0/+3
| | | | | | | | | | | | | | | | | | | | Some sections were not protected by the mutex, even though they should have been. An example of problem that could happen because of this was if the SurfaceTexture was reset while the render thread was rendering that texture. Change-Id: Ie95860fd4eb722bbac04cccc430cc1a8abf1df4d Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Remove the traces of the discontinued android-no-sdk platformv5.7.0-beta1Eirik Aavitsland2016-04-122-3/+1
| | | | | | | | | | Change-Id: Ib9ba913543270e25e9c8deff492b98b0525c9219 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Android: Use the new QtAndroidPrivate::runOnAndroidThreadSyncBogDan Vatra2016-04-062-47/+27
| | | | | | | | | | Change-Id: I47cb99d84ad87f3b0f6578d3fbdc22d788b31c57 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Android: Use default API version (16)BogDan Vatra2016-03-171-1/+0
| | | | | | | | | | Change-Id: I379a4708b2d79824ee6266471e7aec983b87cd68 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-072-9/+11
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/avfoundation/mediaplayer/mediaplayer.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin5/mockserviceplugin5.pro Change-Id: I5742596230dc510ba2a09eba624429bb67179194
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-252-9/+11
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: I8e1554b648327ea2fb342b882ce8e439bd6f271d Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-1985-1192/+1702
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I324f65c61171f36641472964d095d72e452afb3a Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devChristian Strømme2016-01-1538-402/+1544
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/android/src/mediacapture/qandroidcamerasession.cpp src/plugins/wmf/mftvideo.cpp Change-Id: I78868b416ea4baec89ca3e2dc9eb4712db16d5fc
| * Merge remote-tracking branch 'origin/5.5' into 5.6Christian Strømme2016-01-121-2/+7
| |\ | | | | | | | | | Change-Id: Ia563cf734178b821c2aadda8b79b1f09b17de7cd
| | * Android: Don't call restartViewfinder() for audio only recordings.Christian Strømme2016-01-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling restartViewfinder() would try to access m_cameraSession without checking if it was valid. This change adds guards around the calls to restartViewfinder(), and one in the function itself. Task-number: QTBUG-50282 Change-Id: I1f2b4d2b2342bf2dc2b7f28a7bcd00e08a0edb44 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
| * | Android: Media player improvments.Christian Strømme2016-01-081-27/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add locks around the global media player pool to avoid races. And since we don't need any of the features a map provides us, there's no reason to use one. In the most extreme case it's unlikely that there will be more then a couple media players active at one time, so iterating over continuously storage containing only pointers should be at least as fast, if not faster, then a map or a hash (and use less space). Change-Id: Id8d7810b43a9217da402a4b825d7beec891cdf74 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
| * | Android: Call release() in AndroidMediaMetadataRetriever's destructor.Christian Strømme2016-01-073-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should be the default when the wrapper is destroyed. Note: It's not possible to re-use the instance after release() is called. Change-Id: I761cac05ed2c2cda49573c69c6803b136892c528 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
| * | Android: Make the meta-data reader asyncChristian Strømme2016-01-073-91/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reading the meta-data can be slow and cause the UI to become unresponsive. This is especially noticeable when the media source is loaded from a remote location, or over a slow network. To improve this situation the media-reader is moved off the main thread and we wait until the media is loaded before starting the meta-data extraction. Task-number: QTBUG-46491 Change-Id: I0b9cf2ae6b8e08596a2f0b8fa0042d74604c46f9 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-074-2/+61
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/android/src/wrappers/jni/androidcamera.cpp Change-Id: Ibb34f710b1dfb9a23b378462f31432581c6c26f4
| | * Android: check for exceptions in some camera operations.Yoann Lopes2015-12-034-2/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all camera operations are documented to raise exceptions, but they actually might do so depending on the hardware/drivers. Check for exceptions in all functions that could porentially fail and react appropriately. Task-number: QTBUG-49134 Change-Id: I633ca7f2e3aeb6532e1c445735e62135f52cf25f Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
| * | Android: fix QMediaRecorder crashing the camera server on some devices.Yoann Lopes2015-12-048-12/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices require MediaRecorder.setPreviewDisplay() to always be called, even though the Android doc says otherwise. Task-number: QTBUG-37837 Change-Id: I1e9b56f06e7c41bdf684f93b5ec7635f8ae9f379 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
| * | Android: support non OpenGL video surfaces for the camera.Yoann Lopes2015-12-0428-233/+1179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCamera can now pass raw frame data to its QAbstractVideoSurface. The now deprecated Android camera API we're using doesn't allow to get frame data without also displaying the frames in a SurfaceView or a SurfaceTexture. To work around that, an invisible dummy SurfaceView is used. This allows to retrieve frames in the NV21, YV12, YUY2 or RGB565 formats, depending on the Android version and on the device. Task-number: QTBUG-35416 Change-Id: I77b4f50505c3b91efb4b2288a57f50398922c0db Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
| * | Android: Camera updatesChristian Strømme2015-12-041-35/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need for callbacks to block any other threads from reading from the camera pool, so use a read/write lock instead. There's also no benefits gained from using a QMap, so use a QHash map instead. Change-Id: Iaac74c0173d2dddc296f5d2c03116724ffdc588c Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>