Fix VideoOutput::autoOrientation documentation.

The type was reported to be int instead of bool.

Change-Id: I3a76cb76ca70b50060c768f87cf84d8e436d8d7f
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
AVFoundation: Add QVideoWindowControl support

This adds the capability to render videos directly to native
window surfaces when using the AVFoundation plugin.  This adds limited
support for displaying videos from QML on iOS.  These videos are
displayed in a CALayer above the QQuickWindow, so it will not be
possible to render any QtQuick items on top of a video using the
QVideoWindowControl to provide video.

[ChangeLog][QtMultimedia][iOS] Add limited support for playing videos in
QtQuick on iOS (Videos are played on top of scene with limited transform
support).

Change-Id: I80381d9a07b45b6fa1959678166e6da0004f8c19
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Mac: Re-enable qcamerabackend test

The cause of the tests flakyness has been resolved, so it should be
re-enabled.

Task-number: QTBUG-36040
Change-Id: Ic4d18ea891ed5b6c5f4acbb4d05322b910b87d29
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Android: Make the Mediaplayer more robust

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>
GStreamer: don't try to seek when it's not supported.

This eliminates warnings on the console.

Change-Id: I6a0509dba4a0f7ec6fad33f8803be746f425a616
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
GStreamer: fix memory leaks.

Many GStreamer objects were not properly managed or never released.

Change-Id: I38b3854e8b9e2264b5b647f331d3bb16b886e2d6
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Improved declarative-camera example.

- Fix setting the white balance preset, it was never actually set on the
  camera
- Improved the zoom control style

Change-Id: I95c2851e5ad8409dd79306492271f221a61cb10d
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Fix enums for QML camera types.

CameraExposure, CameraFlash and CameraFocus had signals and functions
using enum-type arguments declared in QDeclarativeCamera. This doesn't
work since an enum and a function using it both need to be declared in
the same class in order to work from QML.
The relevant enums have been duplicated (not moved, in order to
preserve QML source compatibility) from QDeclarativeCamera to
QDeclarativeCameraExposure, QDeclarativeCameraFlash and
QDeclarativeCameraFocus.

Change-Id: Ib307d7c6c9dbc59b1b82782913397160be38d4cd
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Doc: fix two typos

Change-Id: I5f417384ce75d8dc2063f92d0116f516f261e4aa
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Android: Fix reload check in onStateChanged().

The condition was missing the Uninitialized flag.

Change-Id: I555f4eae6cc33bee0a4925e626dd56041e4b0471
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Blackberry: implement QCameraInfoControl.

We also now correctly report the default camera to be the rear camera.

Change-Id: Ie96b2950344194637c8feace77246f036c9a3757
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Android: Don't call release() unless it's necessary.

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 QtSurfaceTexture

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: Fix MetadataRetriver wrapper

The QJNIObject was never intended to be used as a base class.

Change-Id: Ic4effd5e1c89a08515c756bd5092fb1e1eead688
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Android: Clean-up in jmultimediautils class.

Remove unused code.

Change-Id: I2c0db45dd95e6a79387bba1b1ccd4b62b7d22aec
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
CoreAudio: Mismatched new[]/delete in several places.

The CoreAudio plugin code in QtMultimedia had several different places
where an array was allocated with "new[]" and deleted with "delete".
Fixed by deleting with "delete[]".

Task-number: QTBUG-37861
Change-Id: Id85bc07a054ad161b0403cc0fe5c56ec5b41d4e3
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
fix: 'm_state' was not declared in this scope

Error occurred when building with DEBUG_PLAYBIN defined.
It should be m_currentState from context.

Change-Id: Iad59966ca19c9d1b589fc8641599494436a0a5f3
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Jing Bai <doris.bai@gmail.com>
Doc: Fix some documentation warnings

- Can't link to 'QSlider'
- Can't link to 'QImage'

Change-Id: Ifa1a27ca5224959d6dbb4c0055a56114740469f0
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
CoreAudio: fix supported channel count.

We were using the number of channels actually used by audio devices as
the maximum channel count. This is wrong as CoreAudio can automatically
split or merge channels in order to accommodate the device.
We now assume all channel configurations are valid.

Task-number: QTBUG-37956
Change-Id: Ia8e8bbea8543caa7fecda305be74a2953b92fd25
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
QNX: Remove most of the CPU overhead for video rendering

This patch uses the GL_OES_EGL_image extension to create a OpenGL Texture handle
for a libscreen pixmap. If the extension is not available it uses the "old"
technique as fallback where the image data is copied into a QImage.

This reduces the CPU load by more than 70% and allows HD videos to be played jitter-free.

Task-number: QTBUG-37752

Change-Id: I4cad22c39390e4cf9eb5be5f0bfe446544a11b9e
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>