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>
Fix QSGGeometry object leak

Set QSGNode::OwnsGeometry flag to QSGVideoNode, otherwise the QSGGeometry
object created in QSGVideoNode::setTexturedRectGeometry() will be leaked.

Change-Id: I383b4fe2ff8c7921d2c9c101d4d90fac5a08365a
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Fix SourceResolver::State object leak

Initialize m_cRef to 0 in constructor of SourceResolver::State, otherwise
it will be leaked

Change-Id: I703ef8e91ad88112102ede7e8321d0eca795b840
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Fix memory leak in SampleGrabberCallback

Add virtual destructor to SampleGrabberCallback to let it properly
destruct its subclass when calling 'detete this'

Change-Id: I5f74f82314e22225a0a153c7f4bca531a79dd8f9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
BlackBerry: Fix the rotation of the viewfinder

This fixes the rotation of the viewfinder. We have to adjust the orientation
depending on the primary screen orientation. On a keyboard device, the viewfinder
would not rotate at all (same if auto orientation is turned off).

Task-number: QTBUG-37894
Change-Id: I2bf955fb3303ed236d3234154ded94fe78607455
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Fix unit tests

Random playback mode is not good for testing index changed signal,
because the same media might be played successively.
Calling show() might result in showFullScreen() on some platforms,
which is not expected by some video widget tests.

Change-Id: Ib47433fc6411b6dfa244a245aae508df5627ec62
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
GStreamer: each QMediaPlayer now has its own volume by default.

We were using the volume property of GStreamer's playbin element to set
the volume. This could behave differently depending on the system
configuration; it could affect the system volume or the media player
own audio stream.
We now use a 'volume' element to do software attenuation on the audio
data sent to the audio sink, it allows each QMediaPlayer to always have
its own volume.
To preserve the previous behavior, developers can set the
QT_GSTREAMER_USE_PLAYBIN_VOLUME environment variable to true.

[ChangeLog][QtMultimedia][GStreamer] QMediaPlayer::setVolume() doesn't
change the system volume anymore (it could be the case before depending
on the system configuration). Set the QT_GSTREAMER_USE_PLAYBIN_VOLUME
environment variable to true to restore that behavior.

Task-number: QTBUG-30317
Task-number: QTBUG-36511

Change-Id: Ia0249962a74ac21fb110fcb634c08706f8d5767a
Reviewed-by: Wouter Huysentruit <wouter_huysentruit@hotmail.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Add support for running on big-endian systems

Now qtmultimedia test suite passes on powerpc.

Change-Id: I540dff93195115ad1dc5725af7293e3b8540403f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
GStreamer: cleanup system includes.

Replaced some linux includes with <private/qcore_unix_p.h> to be more
portable.
Use qt_safe_open() and qt_safe_close() instead of ::open() and
::close().

Task-number: QTBUG-38061
Change-Id: Idb3f50d070ec1701cafba98e79e2e85824653a3a
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>