summaryrefslogtreecommitdiffstats
path: root/src/plugins/android
Commit message (Collapse)AuthorAgeFilesLines
* QMediaPlayer: handle resource files in a cross-platform way.Yoann Lopes2015-04-077-34/+16
| | | | | | | | | | | | | | | | | | | | It was the backend's responsibility to handle resource files in an appropriate way. In practice, it was either not handled at all, or implemented in an almost identical manner in every backend that does handle it. This is now dealt with in QMediaPlayer, always passing to the backend something it will be able to play. If the backend has the StreamPlayback capability, we pass a QFile from which it streams the data. If it doesn't, we copy the resource to a temporary file and pass its path to the backend. Task-number: QTBUG-36175 Task-number: QTBUG-42263 Task-number: QTBUG-43839 Change-Id: I57b355c72692d02661baeaf74e66581ca0a0bd1d Reviewed-by: Andrew Knight <qt@panimo.net> Reviewed-by: Peng Wu <peng.wu@intopalo.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-03-171-2/+2
|\ | | | | | | Change-Id: Id24f14bef17b86e7027e055473f0357854780979
| * Android: fix some MediaPlayer signals not being emitted on first load.Yoann Lopes2015-03-041-2/+2
| | | | | | | | | | | | | | | | | | | | When loading the first media while the video output was not yet ready, mediaChanged() and mediaStatusChanged() signals were not emitted. That's because in that particular situation, the backend believed the delayed loading was a reload of the same media. Change-Id: If5dfbf383ea2dac065fc26b70640ebfb2c52862d Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-132-10/+15
|\| | | | | | | Change-Id: I5575a4ba13212c9bfe73a3de3ef17c6528beafc3
| * Android: fix adjusting camera viewfinder resolution.Yoann Lopes2015-02-111-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | The viewfinder resolution must be in the same aspect ratio as the image capture resolution. When adjusting the viewfinder resolution to comply with that restriction, we assumed that the ratios had to be exactly equal. Though, in practice, there can be a small difference. For example for resolutions 2592x1952 (ratio=1.3278) and resolution 640x480 (ratio=1.3333). Task-number: QTBUG-37525 Change-Id: Ia5a6dd3a4a6d901b24bf74f8aa4e34bffe61f89b Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
| * Encode urls passed to media player properlyJoni Poikelin2015-02-101-1/+1
| | | | | | | | | | | | Task-number: QTBUG-44383 Change-Id: I2c63d5530ad76474ccad8ad69493419dd46032fa Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Update copyright headersAntti Kokko2015-02-1279-553/+553
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I1c6faa4f59f8eca54f01ef20941fa60161dd7872 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Add video filtering support to VideoOutputLaszlo Agocs2015-02-032-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the QAbstractVideoFilter base class and integrate it with VideoOutput. This can be used to perform arbitrary filtering or image processing on the frames of a video stream of a VideoOutput element right before the OpenGL texture is provided to the scenegraph by the video node. This opens up the possibility to integrate computer vision frameworks or accelerated image processing with Qt Quick applications that display video streams using Qt Multimedia. Conceptually it is somewhat similar to QVideoProbe, this approach however allows modifying the frame, in real time with tight integration to the scenegraph node, and targets Qt Quick meaning setting up the filter and processing the results of the computations happen completely in QML. [ChangeLog] Added QAbstractVideoFilter that serves as a base class for QML video filtering elements that integrate compute, vision, and image processing frameworks with VideoOutput. Change-Id: Ice1483f8c2daec5a43536978627a7bbb64549480 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Add additional exposure modes to QCameraExposure.Andrew den Exter2014-11-281-0/+50
|/ | | | | | | | | [ChangeLog][GStreamer][Android] Camera exposure mode extended to support Action, Landscape, NightPortrait, Theatre, Sunset, SteadyPhoto, Fireworks, Party, Candlelight, and Barcode modes. Change-Id: I13d4bb042d27c0bd2ffcd369882b56bbabc84335 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Fix bogus videonode plugin handlingv5.4.0-rc1Laszlo Agocs2014-11-181-1/+1
| | | | | | | | | | | | | | | | Each plugin must provide its own unique key. Otherwise we will only ever see one single plugin. Right now running on i.MX6 is often broken because the imx6 videonode plugin is not picked up since only the egl one is seen by the system. With the fix both plugins provide their own unique key so both become visible. Additionally, introduce a QT_VIDEONODE environment variable. This is useful to specify which plugin to use. This is necessary in case multiple custom videonode plugins support the same formats. Change-Id: Iaa1988f8436dcb938cb9a95e2e0d68a4e92e113c Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Android: Use the new findClass() method.Christian Strømme2014-10-174-73/+60
| | | | | | | Avoid local caching. Change-Id: I1e30896da664c5a45c38c09412c16cb8ff70c5c7 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Android: fix some problems with the media player.Yoann Lopes2014-09-263-82/+69
| | | | | | | | | | | | | - Correctly emit positionChanged signal. One of the problems with this was that QMediaPlayer automatically sends periodic position updates while playing a media. There's no need to have the same logic in the backend. - Seeking after reaching the end of the media now correctly works Auto tests included. Change-Id: I6d5ecbae6e05f94a8aac1a0834cf57427adf219b Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: fix QMediaPlayer's state and mediaStatus signals.Yoann Lopes2014-09-242-3/+53
| | | | | | | | | Emit signals only after both properties are written to avoid having incoherent values in signal handlers. Task-number: QTBUG-40314 Change-Id: I6c8445e61cccf1a9803647329c4fa1f0e452f56d Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-017-47/+113
|\ | | | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstreamervideoinputdevicecontrol.cpp src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp Change-Id: Ic854589562d2deeaa0ebf75840cb8a2ee32e99de
| * Android: fix retrieving metadata from assets, qrc and remote files.Yoann Lopes2014-08-257-47/+113
| | | | | | | | | | | | | | | | | | | | | | We need the same logic as for the media player: local files and assets must be loaded with a FileDescriptor. Because of a bug in Android API level >= 14, remote files have to be loaded in different ways depending on the version. Task-number: QTBUG-40274 Change-Id: I6411b959064d22219cf981a4dc8f4f26cf16f65f Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-2479-1615/+983
|/ | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: Ied06887225df341064c12bcc14c259ae74116f2e Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Android: Make sure we check and clear exceptions from the camera.Christian Strømme2014-07-143-36/+59
| | | | | | | | | | In several places we where ignoring the fact that we might get an exception from the camera code on Android. Failing to clear them will cause the application to to terminate. Task-number: QTBUG-39425 Change-Id: Idfe40e1749f54d551d37dae25912d9ddbc3da01e Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: fix setting camera parameters from QML.Yoann Lopes2014-07-108-136/+189
| | | | | | | | | | | | We were ignoring new parameter values when the camera was not loaded. All QML properties that were set at initialization time were therefore ignored since the camera is not loaded at that point. We now store all camera parameters and apply them once the camera is loaded. Task-number: QTBUG-39307 Change-Id: If66d768941c25cede2aea1b48fb928c4735c10f8 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: fix crash when stopping the camera while a recording is activeYoann Lopes2014-06-301-1/+2
| | | | | | | | | | When unloading the camera, any active recording is automatically stopped, which in turn triggers the viewfinder to be restarted... We don't try anymore to restart the viewfinder after stopping recording unless the camera is still active. Change-Id: I77e4e3fc8d7116ac660d8bb23f6c400ebed4ffed Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: fix registering recorded videos with the Android media scannerYoann Lopes2014-06-301-1/+1
| | | | | Change-Id: I6dfc4e13b8a0bccb1bcfead728f7e1ddb7b58bb4 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: correctly update camera focus zones.Yoann Lopes2014-06-301-15/+14
| | | | | | | | | When setting a null custom focus point, we were correctly resetting the focus zones but we were not emitting the focusZonesChanged signal, causing the QML Camera to not update its focus zones. Change-Id: I59940c4cd2979fa08dc26566dc0f6d19e503f64f Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: Use a file descriptor for all local media files.Christian Strømme2014-06-052-6/+11
| | | | | | | | | Using a fd is more consistent across different Android versions and also works with files that are in the applications private storage. Task-number: QTBUG-39346 Change-Id: I462822459d12d7842d15f1cb7caafc75c18fe32c Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: don't start camera preview until the viewfinder is ready.Yoann Lopes2014-06-052-12/+26
| | | | | | | | | If no video output is set for a camera, don't try to start the camera and report an error. If the video output is not ready, delay starting until it is. Change-Id: Id08e31a4e795b71ac036a6532e9499ca5670d790 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: fix media player's volume.Yoann Lopes2014-06-051-11/+18
| | | | | | | | | - Preserve the volume when changing the current media. - Don't actually set a new volume when the media player is muted. Intead, save the value to apply it when setMuted(false) is called. Change-Id: I829eb280406ea35ff82a0c2638b2d19cf1d90643 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: Don't expose java calls in the control classes.Christian Strømme2014-06-0415-114/+238
| | | | | | | Makes the abstraction more clear. Change-Id: Ia9a7b0b157e1182158cd26b62775d13f6c5e1727 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Make it possible to build multimedia for embedded AndroidChristian Strømme2014-06-041-2/+2
| | | | | Change-Id: I3400b18379242ea4d1b4f94f5da6b60c64d551e4 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Rename the wrapper classesChristian Strømme2014-06-0434-533/+533
| | | | | Change-Id: I2ce15c8475da3186f128ba59b7c58f9b5b0a67e1 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: fix calling start() and stop() on the video surface.Yoann Lopes2014-05-301-1/+1
| | | | | | | | | We restart the surface when the frame size changes, though we were not using the correct function to get the surface's current frame size. This was causing start() and stop() to be called for every frame. Change-Id: I8ff4b4852cb7fcc92ac3b1b3ad7bf991d7bddc6b Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: Fix loading from qrcChristian Strømme2014-05-212-1/+6
| | | | | | | | | On Android < 4.1 our temporary file is discarded without checking the content. With this change we just open the file and pass the fd to the mediaplayer instead. Change-Id: I9233822725d8987c572b2d0b598721cee886de80 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: fix QMediaPlayer::bufferStatus value.Yoann Lopes2014-05-152-3/+17
| | | | | | | | | | | It was returning the buffering progress for the whole media, which is not what is expected according to the documentation. It should return instead how much the playback buffer is filled. This information is not available on Android so we simply return 100% when the status is BufferedMedia or BufferingMedia, 0% otherwise. Change-Id: I9fb55a9317948ba9375291a57bbf100f186382a2 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: Fix namespace usage.Christian Strømme2014-05-125-6/+12
| | | | | | | Make it possible to build multimedia with a Qt namespace Change-Id: Ibaeaf7edb38f8d784b8d0fcb9a26ca712488c23b Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Moved QMediaStorageLocation out of the Android plugin.Yoann Lopes2014-05-097-218/+23
| | | | | | | | It's now a private API in the QtMultimedia library in order to be accessible in other plugins. Change-Id: I63541de1e8c540cebc210f9037646ce74d866c6f Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Merge remote-tracking branch 'origin/release' into stableJani Heikkinen2014-04-231-2/+8
|\ | | | | | | Change-Id: Ieb521fb1e9f297a167eea19c771cb5915c01df97
| * Android: Release the surface texture when not in useChristian Strømme2014-04-121-2/+8
| | | | | | | | | | | | | | | | | | | | | | With some Android versions the preview texture is released when the application is suspended. If we don't release the texture in our code, the preview will be empty when the application resumes. Task-number: QTBUG-38165 Change-Id: I72244727081d8f94ee5f6cb0ab660ca59f4bb2de Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Android: Camera code clean-upChristian Strømme2014-04-154-334/+304
| | | | | | | | | | Change-Id: Ib400afde12067764c3dcc0f44e40ddc1abb3012f Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Android: Use QMutexLock in camera callbacks.Christian Strømme2014-04-151-8/+4
|/ | | | | | | We should not release the locks before the native callbacks returns. Change-Id: Ia2691f6c5be66a3dcf371e48e3bac7498b401833 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Use Q_GLOBAL_STATIC instead of a static QMapChristian Strømme2014-04-091-5/+6
| | | | | Change-Id: I7b65e0874051c4ef504914a0bd66e8471ec34fa7 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Fix the signature for setOnInfoListener.Christian Strømme2014-04-091-1/+1
| | | | | | | | The argument part of the signature should be OnInfoListener and not OnErrorListener. Change-Id: I735fe1b0338b66c2f729254ed9e3251136781cbe Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Fix QtMediaRecorderChristian Strømme2014-04-083-12/+17
| | | | | | | | | | Don't extend the MediaRecorder class as this causes ART to fail when it doesn't find the postEventFromNative() function. Task-number: QTBUG-38166 Change-Id: Ia38ce4558a2cc95a9b4cd05b9f926d41e53fdc0d Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Use androidSdkVersion() to get the API level.Christian Strømme2014-04-081-31/+39
| | | | | Change-Id: Idc0b09ab2dc5d93e8da8dab3bd0e99e27fbc57e1 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Remove inheritance to QJNIObject in the Camera wrapperChristian Strømme2014-04-081-22/+25
| | | | | | | The QJNIObject was never intended to be used as a base class. Change-Id: I4986aeaebecd6e4136fed311e69368e20da4d060 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Fix MediaRecorder wrapperChristian Strømme2014-04-082-24/+25
| | | | | | | The QJNIObject was never intended to be used as a base class. Change-Id: I8311f909a37aeae6040eba4471b379cfc732297b Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* let videonode plugins declare that they extend QtQuickOswald Buddenhagen2014-04-071-0/+1
| | | | | Change-Id: I4facc9ca0616927f7b1101cecb989fece38c2f7a Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Clean-up in jmultimediautils class.Christian Strømme2014-03-273-36/+15
| | | | | | | Remove unused code. Change-Id: I2c0db45dd95e6a79387bba1b1ccd4b62b7d22aec Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Fix MetadataRetriver wrapperChristian Strømme2014-03-273-23/+29
| | | | | | | The QJNIObject was never intended to be used as a base class. Change-Id: Ic4effd5e1c89a08515c756bd5092fb1e1eead688 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Fix QtSurfaceTextureChristian Strømme2014-03-2710-169/+80
| | | | | | | | | | | | Don't extend SurfaceTexture as this causes ART to fail when it doesn't find the postEventFromNative() function. The postEventFromNative() function was implemented sometime after API 11, so to avoid this situation we can use composition instead. Task-number: QTBUG-37605 Change-Id: Ie1013d218291ba0035f1bb18a0c0655fd2170bfd Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Don't call release() unless it's necessary.Christian Strømme2014-03-271-1/+3
| | | | | | | | If the mediaplayer is in either Idle or Uninitialized state, then there is no need to call release again. Change-Id: Idb6f2d9ea7aad7a9036e7e9a534c3bd296324068 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Fix reload check in onStateChanged().Christian Strømme2014-03-271-1/+3
| | | | | | | The condition was missing the Uninitialized flag. Change-Id: I555f4eae6cc33bee0a4925e626dd56041e4b0471 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Make the Mediaplayer more robustChristian Strømme2014-03-218-337/+614
| | | | | | | | | | | | In some cases the the Android media player would get into a unexpected state and we where then not able to recover. With this patch we monitor the state changes more closely and recover when possible. Task-number: QTBUG-35651 Change-Id: I142c63fbbf716d3f94ebdcf016a7cadad7b13207 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: fix QMediaRecorder failing to start in some cases.Yoann Lopes2014-03-171-2/+6
| | | | | | | | | | Because camera operations are performed in a dedicated thread, starting a recorder was sometimes failing because the camera was not yet ready (unlocking it was not done yet). Camera locking and unlocking are now synchronous operations. Change-Id: I92c3c2f3666b63e7451e4ee1ab89dcbc85ae6c24 Reviewed-by: Christian Stromme <christian.stromme@digia.com>