summaryrefslogtreecommitdiffstats
path: root/src/plugins/android
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Android: print Java traces for MediaRecorder when in debug mode.Yoann Lopes2014-03-171-10/+56
| | | | | Change-Id: Ie39dd16227c49c8c07831750869e0cc28d2cc8ee Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: restart camera viewfinder after a recorder error.Yoann Lopes2014-03-172-9/+15
| | | | | Change-Id: I33f083fda5c10cfb997a21100c0ec3d4a314aee0 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: correctly report QMediaRecorder actual output location.Yoann Lopes2014-03-172-6/+5
| | | | | | | | Report the recorded media location to have changed only when recording is finished and successful. Change-Id: Iee7565b9ba12d9de09f86dffb34c40936fee198c Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: correctly report QMediaRecorder status.Yoann Lopes2014-03-172-33/+47
| | | | | | | | | | | QMediaRecorder should have the LoadedStatus before starting recording. When recording the camera, the recorder should be considered loaded when all prerequisites are met (viewfinder started, recording mode set to video and capture ready). Task-number: QTBUG-36828 Change-Id: I3279bdfdc2b361c7e0707c52e74ae47e0bb4a93d Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: implement QCameraInfoControl.Yoann Lopes2014-02-2814-170/+273
| | | | | | | | | VideoOutput will now take into account the camera sensor orientation to adjust the viewport orientation, we don't need to apply a rotation on the Android Camera anymore. Change-Id: Ia7639f0a5711ab6cc6f80b9716bc1a6f389499b4 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* New QCameraInfo class.Yoann Lopes2014-02-284-0/+26
| | | | | | | | | | | | | | | | | | | | The class allows to get the list of available cameras on the system as well as getting some static information about them such as their unique ID, display name, physical position and sensor orientation. This makes QCamera::availableDevices() and QCamera::deviceDescription() obsolete. This patch contains the API, documentation and auto-tests but not the actual implementation by each backend (except for retrieving the default camera device). [ChangeLog][QtMultimedia] Added new QCameraInfo class [ChangeLog][QtMultimedia] QCamera: availableDevices() and deviceDescription() are deprecated, use QCameraInfo instead Change-Id: I64fd65729ab26a789468979ed5444ee90bb82cd0 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-121-6/+11
|\ | | | | | | Change-Id: Ie93615076177662e75d46f3d13beeb88d424b4a6
| * Android: add missing information in frames retrieved with QVideoProbe.Yoann Lopes2014-01-301-6/+11
| | | | | | | | | | | | | | | | The number of bytes per line was missing. Change-Id: I0afbdcfd6d7195b7beb3fd09f4ed262f756be848 Reviewed-by: Denis Kormalev <dkormalev@ics.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | Normalize signal & slot signatures in connectionThiago Macieira2014-02-031-6/+6
| | | | | | | | | | | | | | Profiling shows Qt Creator spends 2% of its load time normalizing Change-Id: I1a4bef16be79ced35c47da865153ebe1bee22f9c Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>