summaryrefslogtreecommitdiffstats
path: root/src/plugins/android
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Yoann Lopes2014-01-309-134/+871
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-01-228-119/+321
| |\ | | | | | | | | | Change-Id: Ifcb0e0bac29c11980ea2a9d67b12e1b79c4bd9f6
| | * Android: fixed video rendering with multiple media players.Yoann Lopes2014-01-205-109/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems all Android media players share the same video buffers, which results in textures containing frames for the wrong media player. When getting a new frame, we now copy it into a FBO in order to avoid that another media player overwrites the frame being shown on screen. Task-number: QTBUG-35868 Change-Id: I6701cf7368a3ef9e73d649c3ece1f206cafd5bb3 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
| | * Android: fixes custom camera focus point.Yoann Lopes2014-01-203-7/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | The custom focus point passed to the camera was in viewport orientation but should be in sensor orientation. The two might differ. Task-number: QTBUG-36208 Change-Id: Id272402090c2814e02abc527c0f6a6e932a60081 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
| | * Android: fixes some issues with JCamera.Yoann Lopes2014-01-161-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Quit the worker thread only when the worker is deleted. This makes sure all events are processed before terminating the worker. - Correctly cache the preview size even when it's an invalid one. Task-number: QTBUG-36204 Change-Id: I76055984e8ece3f7f40dba7dd89d28a4faa1e72e Reviewed-by: Denis Kormalev <dkormalev@ics.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
| * | Android: optimized NV21 top ARGB32 conversion.Yoann Lopes2014-01-171-15/+550
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now based on fixed-point arithmetic and uses pre-generated lookup tables for YUV coefficients and RGB clamping. The new implementation is on average 2x-3x faster than the previous one (tested on the Samsung Galaxy S4). Change-Id: I1daf12f7f9b2f2334e90e0ede79e6d83800f1db6 Reviewed-by: Denis Kormalev <dkormalev@ics.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | | Android: fix crash in QAndroidCaptureSession.Yoann Lopes2014-01-291-1/+3
|/ / | | | | | | | | | | | | | | Don't try to apply video recording settings until a camera is actually started. Change-Id: I5348b91669835b9d776f56a3f49e3f8a11533d15 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* / Use QStringRef instead of QString whenever possible.Jędrzej Nowacki2014-01-152-2/+2
|/ | | | | | | That way we reduce count of temporary QString instances. Change-Id: Id806c68ea616828c2355c07b8576616fa6a8da17 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: QVideoProbe support for cameraDenis Kormalev2014-01-089-11/+248
| | | | | | | | | | | QMediaVideoProbeControl sublclass added to capture service to make QVideoProbe work with Android camera. [ChangeLog][QtMultimedia][Android] QVideoProbe support for camera Task-number: QTBUG-35416 Change-Id: I14d0a0e8abd14ee8f577e2901b976b8ed46eb320 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: camera moved to a dedicated threadDenis Kormalev2013-12-235-163/+687
| | | | | | | | | | | | | Actual camera work moved to JCameraWorker which lives in dedicated thread. JCamera now acts as proxy calling JCameraWorker methods with invokeMethod (when it is needed). [ChangeLog][QtMultimedia][Android] camera operations moved to a dedicated thread Task-number: QTBUG-35564 Change-Id: Ie4edcbf0869d56b0fef4ad0c820450cc77657fdd Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: fix camera previewDenis Kormalev2013-12-115-43/+91
| | | | | | | | | | | | | At some(?) devices we can't rely on one shot preview callback because it receives data only after we start new previewing session. And this cause situation when imageCaptured signal is never emitted. This fix applies preview callback with already allocated buffers and collects all preview images in these buffers. When we capture image - we can simply fetch last preview image (if there was any) from c++ part. Task-number: QTBUG-34993 Change-Id: I608750c344ca3c089f4673df4907e0f47e57e2ba Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android add support for qrc in mediaplayer.Christian Strømme2013-12-092-3/+14
| | | | | | | | | | [ChangeLog][QtMultimedia][Android] Enable mediaplayer to read files from the Qt Resource system. Task-number: QTBUG-31422 Change-Id: Iaaefb35566b623b78b9f8aa22daf6ac92fb35e67 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: fix camera viewfinder orientation.Yoann Lopes2013-12-054-6/+50
| | | | | | | | | | | | | | | The camera sensor on Android devices might be in a different orientation than the device natural orientation. There is no API in Qt to know about the camera orientation, so correcting the viewfinder orientation is not possible without making guesses. This patch makes sure the viewfinder orientation always matches the device natural orientation. For example, if the camera is mounted in landscape, and the device natural orientation is portrait, the viewfinder will automatically be rotated 90 degrees counter-clockwise. Task-number: QTBUG-35086 Change-Id: Ia890872971d72657debe709f61edba27d09dec65 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-12-031-7/+17
|\ | | | | | | Change-Id: I53a7a2a3e096f76d50f2bb3ae125f6022de5c3f5
| * Android: print a warning when using SurfaceTexture on Android 2.3.Yoann Lopes2013-11-301-7/+17
| | | | | | | | | | | | | | | | | | | | SurfaceTexture is available since Android 3.0, print a warning when camera preview or video playback is used on an older Android version. Task-number: QTBUG-35075 Change-Id: Ie04c62df99048a25e8fd971e0708157d0d32c503 Reviewed-by: Christian Stromme <christian.stromme@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Android: Add missing 'L' prefix and ';' postfix in areaToRect()Christian Strømme2013-12-031-1/+1
|/ | | | | | | | While it works just fine without the post-/prefix, they are suppose to be there... Change-Id: I99365d37c70c65ccf0713d6b2d8330030b265e8e Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: use correct format when capturing a picture to a buffer.Yoann Lopes2013-11-062-10/+40
| | | | | | | | Don't decode the JPEG data to raw RGB using QImage. QCameraImageCapture reports anyway that JPEG is the only supported buffer format. Change-Id: Ib17760e4361b004775c002b686ef7529b3768aab Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: fix two race conditions in the media player.Yoann Lopes2013-11-062-3/+2
| | | | | | | | | | start() could be called before the media player was marked as prepared. When changing media, setMediaPath() could be called before the media player was reset. Task-number: QTBUG-34558 Change-Id: I886fd5f5008f76dcbc88c57d7b16a439b394d4a7 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: fix camera preview showing black frames after restarting it.Yoann Lopes2013-10-293-3/+13
| | | | | | | | | Clear the camera preview size when stopping the preview in order to force it to be reset when starting it again. Task-number: QTBUG-34346 Change-Id: I0edf8d996348745b9aa7cf0790c16b6cd813b33b Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Add Linguist comment for translation of Drive-mode.Friedemann Kleint2013-10-151-0/+1
| | | | | | | | | Translators not familiar with cameras might mistake it for something related to driving a car. Change-Id: If54a563a32af537d291b79253056b7b57e108f5b Reviewed-by: Robert Loehning <robert.loehning@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Android: fix media recording location.Yoann Lopes2013-10-092-18/+24
| | | | | | | | | When letting the plugin decide where to save the recorded media, doing several recordings would always use the same output file instead of creating a different one every time. Change-Id: If352257d6c91ada8565c1463820321f84c9bb92f Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: fixed image capture preview.Yoann Lopes2013-10-0110-17/+130
| | | | | | | | | | We used to generate the capture preview from the video output, grabbing the pixels of the last frame (in a FBO). This is not possible anymore, we instead query the camera for a preview frame, which is in the NV21 format and needs to be converted to RGB. Change-Id: I1c728b3a708a6f052a83aebf9f15f511eab7a02f Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: refactor video renderer.Yoann Lopes2013-10-0117-295/+542
| | | | | | | | | | | | | Removed the overhead of having to create a shared OpenGL context in the GUI thread and pre-render the frame into a FBO. We now directly render the GL_TEXTURE_EXTERNAL_OES in the QtQuick render thread, using an Android-specific QSGVideoNode. We also use a callback from the render thread to create the texture from there and not have to create a separate shared OpenGL context. Change-Id: I6c8eb94b47d0a03329c912701b8af3fb5ebd1876 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: fix plugin json metadata.Yoann Lopes2013-09-261-1/+2
| | | | | Change-Id: I0f2feca44843760df13a938d9190daf2d447d645 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: Adapt the multimedia plugin to new QJNI APIChristian Strømme2013-09-2019-253/+229
| | | | | Change-Id: Id87f5518724eed6c9de6d5d3b8141860bd511643 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: fix compilation on x86.Yoann Lopes2013-09-191-2/+2
| | | | | | Task-number: QTBUG-33554 Change-Id: I4da7410d3b77ec6d72a73d3b6ceb7b76bb48d2b7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: added camera support.Yoann Lopes2013-09-1284-67/+7683
| | | | | | | | | This patch includes all camera features: viewport, settings, image capture, and video recording. It also adds support for QAudioRecorder. Change-Id: Ib962177cc8de4bac03f42a2bc0f534e03464bbfc Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: Use isValid() to check if the jobject is valid.Christian Strømme2013-08-211-2/+2
| | | | | Change-Id: I5ec67b9b2abfae2e2c2a44f0bcc7c72cb54beb49 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: fixed media player buffering logic.Yoann Lopes2013-08-192-8/+7
| | | | | | | | | | | | When the media is ready, the status should always transition to LoadedMedia and then immediately to BufferingMedia or BufferedMedia. Also, when the duration is queried before the media is ready but already buffering, it should always return 0 to avoid errors from the Android media player. Task-number: QTBUG-32635 Change-Id: Ibcb9c23b4f64c4f9a1a8e0ef81989ae78cfb19ef Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: Make it possible for MediaPlayer to read from assets.Christian Strømme2013-07-091-1/+14
| | | | | | | | | The Android MediaPlayer doesn't handle assets automatically, so we need to open it and pass it in as a file descriptor. Task-number: QTBUG-31422 Change-Id: Ic29c0ab6348d760cf21aa89ae423d41e15523976 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: wait to have a valid video surface before loading a media.Yoann Lopes2013-07-095-27/+130
| | | | | | | | Setting the video surface on the Android media player after it has loaded the media doesn't work on some hardware. Change-Id: I5e621a34ace9de458bfc65bfac8fa50c29cee9a5 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: release the Android media player before destroying it.Yoann Lopes2013-07-093-0/+8
| | | | | Change-Id: I18715efd7ff346a9f6f2214727ec66ee79ad0d33 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Multimedia plugins now have a unique JSON metadata 'Keys' property.Yoann Lopes2013-06-211-1/+2
| | | | | | | | | | | | | | | | | | | | | They previously had the multimedia services they provided as keys. This was a problem when several plugins were available on the same platform, providing the same multimedia service, but with different features or capabilities. Since they had the same key, only the first plugin in the directory was loaded. Nevertheless, it was actually working until commit 732dcfe7 in qtbase, as all plugins were loaded even when sharing the same key. The services a multimedia plugin provides are now declared in the 'Services' property. To preserve compatibility with third-party plugins, if that new property doesn't exist it falls back to the 'Keys' property. Task-number: QTBUG-31868 Task-number: QTBUG-31476 Change-Id: Ic3ba32eeef21b69b922bd3d4feb111101559d132 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Android: Fix for uncaught java exception.Christian Strømme2013-06-131-14/+14
| | | | | | | | | | | If an exception's getMessage() function returns a null object, we can't send it directly to the Log function, as it will throw an exception... To avoid this we can prepend the string from getMessage() with an empty string. Change-Id: Ie026cbf9af133352919a4536c152b6d35cb8c0a7 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: fixed crash when resetting the video surface.Yoann Lopes2013-05-221-1/+2
| | | | | Change-Id: I64a28cbcb8a48d13a9e1c98005da9f4cce821cb4 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Decouple qmediametadata.h from qmultimedia.hSze Howe Koh2013-05-141-0/+1
| | | | | | | | qmultimedia.h is included in more places, but qmediametadata.h is larger. This patch should reduce unnecessary #include-ing. Change-Id: I4a3d174bafc555d794bb75087c1f6b79745ae903 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Make it possible to bundle Android buildsEskil Abrahamsen Blomfeldt2013-05-034-14/+21
| | | | | | | | | | | | | We need to adapt to the way the jar builds are split on Android, into a jar file which can be bundled and one which can be distributed and loaded on the classpath. We also need to add meta-information about which plugins the module depends on so that they can be bundled as well. Task-number: QTBUG-30751 Change-Id: I5cca51c3732ce72985df29672a219c3fd4fe7bac Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Install the jar fileBogDan Vatra2013-04-021-0/+4
| | | | | | Change-Id: Ife46aba11920c5109d974f9e388e49320bf1a95a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android multimedia plug-in.Christian Strømme2013-03-0628-0/+3434
Adds MediaPlayer support for Android. Change-Id: I4c7b1e19927b2e50b227f3a3b3f7ca2e99397618 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>