Use QStringRef instead of QString whenever possible.

That way we reduce count of temporary QString instances.

Change-Id: Id806c68ea616828c2355c07b8576616fa6a8da17
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Fix build error on BlackBerry10

The variable type was changed to QStringRef but the
the conversion to QStringRef was left out.

Change-Id: I973b0eb5795fa7bcf89ceac809fb3ff607a85913
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Fix build without Qml and Quick modules.

Conditionally enable auto-tests that depend on the Quick and Qml
modules.

Task-number: QTBUG-35911
Change-Id: I8b9d304ea630093d423b48a4ebc53ef6f4280244
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Android: fixes some issues with JCamera.

- 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>
Bump MODULE_VERSION to 5.2.2

Change-Id: I662277a4ed9341f188e5e3f1abab50c6f5f85577
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Allow the user to specify the viewfinder resolution instead of guessing

Guessing badly prevents the camerabin pipeline from loading at all and
the fallbacks used are not representive of the capabilities of most
cameras. So either stay out of the process and let gstreamer negotiate
a resolution if it can, or use a resolution supplied through the viewfinder
settings control by someone hopefully better informed.

Task-number: QTBUG-30842
Change-Id: Iec2dcc2476f38822f9e0d02301e46a1f49b7c6da
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Remove workaround for resolved gstreamer bug.

Reloading the capture pipeline before recording is unnecessary and
introduces a big pause. Don't do it.

https://bugzilla.gnome.org/show_bug.cgi?id=649832 was resolved in gstreamer 0.10.23

Change-Id: I0de02af52dcc193bce7a4e3e61407ae1c2d3818c
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Fix writing orientation and date exif tags in camerabin.

Orientation tags need to be transformed from the string tag returned
by gstreamer to the orientation in degrees.  Date tags need to be
inserted with gst_date_time_new_local_time.  Finally setting a tag
value shouldn't clear all other tags.

Change-Id: I28922148251084c12cf6c93d9b097fa5df41da9d
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Fix incorrect/missing application of recording settings in camerabin.

Don't set profiles if no settings are specified.
Apply all settings before starting a pipeline as the mode can switch
without being restarted and incompatible video recording settings can
prevent the pipeline starting even in image capture mode.
Set audio encoding settings and encoder profiles if they are supplied.

Change-Id: I06febf977c2cae306383f9dbaae0f81f531b4757
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Android: optimized NV21 top ARGB32 conversion.

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: fixes custom camera focus point.

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>
Allow plugins to override the QML VideoOutput type.

Move QDeclarativeVideoOutput to the private QtMultimediaQuickTools
library to make the QDeclarativeVideoOutputBackend interface
implementable by a plugin.

Change-Id: I763c483a1fc9ec56dc7b8be0bc71523f029a36ee
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Android: fixed video rendering with multiple media players.

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>
Merge remote-tracking branch 'origin/release' into stable

Change-Id: Ifcb0e0bac29c11980ea2a9d67b12e1b79c4bd9f6
Update changelog for 5.2.1

Change-Id: Id1df662afb2ec0e7eb7055bbc2c5c523a5bda125
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Fixes mediaplayer crashes on OSX

Fixes the "libqavfmediaplayer.dylib 0x0000000110fa7c8c -[AVFMediaPlayerSessionObserver unloadMedia]" crash on Macs.
The problem was: writing to memory that had already been released. If not sure, one should always check if the objects exist before deleting it.

Solution tested on OSX 10.7, 10.8, 10.9

[ChangeLog][qtmultimedia][avfmediaplayersession]

Task-number: QTBUG-34213
Change-Id: Iac108711851c348e96e73542b4e71653007eeb54
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Fix sending End Of Stream on gst plugin

When streaming to gst a typefind operation
is performed which jumps around to find which
codec the file provides, this fix the call to
send an EOS before we try to read and not after
which causes confusion to gst.

Task-number: QTBUG-32963
Change-Id: I2658b6a4e960430c8ab422a3bee5e11956663116
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Merge remote-tracking branch 'origin/release' into stable

Change-Id: If97b68b56071e241c659ddd231f28e433954d7be
Merge branch 'stable' into st