Commit Graph

1189 Commits

Author SHA1 Message Date
Michael Olbrich
6eba2a2715 enable imx6 specific QSGVideoNode based on a config test
This way it also works custom mkspecs

Change-Id: I7414aac775b797da3487e9625c7212486118b532
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-03-04 17:54:06 +01:00
Andy Nichols
1286300a4c AVFoundation: Cleanup AVCaptureSession with proper reference counting
The reference counting was not being done for AVCaptureSession so it was
being destroyed before we got a chance to properly clean it up (which
lead to crashes).  We also make sure to remove any observers from
AVCaptureSession now before destroying it.

Task-number: QTBUG-37109
Task-number: QTBUG-29955
Change-Id: Ia9b49ad1eab01b4f7424e2a1c699d903cd9bf902
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-03-04 17:53:39 +01:00
Yoann Lopes
9a55f5ce57 AVFoundation: implement QCameraInfoControl.
Change-Id: I05f3daa5c4acb90e046e26d6d577ae40dfed0e30
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-03-04 17:53:18 +01:00
Andy Nichols
70415c3d97 AVFoundation: Call stop() on VideoSurface when changing sources
Before we were reusing the active surface when we switched videos.  This
leads to an inconsitency in states, and the sourceRect property of the
video surface does not get updated.

Task-number: QTBUG-28655
Change-Id: Ie29bf1d9b1c11b6f51a869253c730202001c07cf
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-03-04 15:34:09 +01:00
Andy Nichols
1fe5a7964f AVFoundation: Fix y-inverted QML Videos
When the code that supports iOS was added, we introduced a bug where QML
videos would be played y-inverted on OS X.  This is because we made no
effort to y-invert the Framebuffer Object before rendering the texture
in the SceneGraph.  Now we render the video the the FBO y-inverted, so
there is no need to y-invert the resulting texture.

Task-number: QTBUG-35955
Change-Id: I41af1aaae57923b9972b5be5ec65f7d2a97d77c5
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-03-04 14:13:11 +01:00
Andy Nichols
16430262d9 AVFoundation: Remove debug code
Some debug code made it into the released code, so each time you used
the QWidget based video player the terminal would print data about the
window frame size.

Change-Id: I86eb00ce5edb23b7a2abf6a63893cd17aaeb0ee3
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-03-03 16:45:47 +01:00
Andy Nichols
8c9b6f67a7 CoreAudio: Use the real default audio device for QSoundEffect
There is an assumption in QtMultimedia that the first audio device
returned by QAudioDeviceInfo::availableDevices is the default device, so
we must make an effor to make sure this is true.  This commit should fix
the issue on OS X.

Task-number: QTBUG-36638
Change-Id: Id388d7218b465cb29d826f46ee825e982c5f7ffc
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-03-03 16:45:38 +01:00
Andy Nichols
775914ffb2 CoreAudio: Make it possible to set volume on of QAudioOutput
QAudioOutput::setVolume stopped working for CoreAudio when it was ported
to live in it's own plugin.  This was because it was not possible to set
the volume of QAudioOutput in iOS.  Now the functionality has been
restored and added for iOS as well.  For OS X we use the old method of
setting the volume property of the AudioUnit.  On iOS it is not possible
to set the volume on a per AudioUnit basis, so we now manually modify
the buffer contents (the same we do for QAudioInput already).

Task-number: QTBUG-36756
Change-Id: I42b5892fe5534217043fa55e7b5b9a4ce824050d
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-03-03 15:55:00 +01:00
Andy Nichols
1f5b5cb473 AVFoundation: Improve config test
This should prevent the avfoundation plugin from being built on system
that can not support using it (ex. 32bit builds on OS X 10.7)

Task-number: QTBUG-36239
Change-Id: I9f861b7580b0e015ddbc1231440d677bf6eee1ec
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-03-03 14:55:17 +01:00
Andy Nichols
4d31ec0793 CoreAudio: Allow more flexability when specifying SampleRates
The available sample rates for a given device are the nominal sample
rates reported by the device.  It is possible to use other sample rates
and CoreAudio will take care of the conversion.  So what we will do is
report what rates are available for a device, but not explicitly require
those sample rates to have a valid format.

Task-number: QTBUG-36265
Change-Id: Idbbdeacbb6bc1fe434bcd8dec519ad70d4ccd545
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-03-03 14:54:54 +01:00
Sergio Ahumada
d5dfef66bb Prefer to use normalised signal/slot signatures
Change-Id: I48ae4b46f7a0342a1436ba78958b057e919e3a8a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-03-03 12:12:31 +01:00
Thiago Macieira
d45a02e8c9 Add missing virtual destructor for new class
qmediaserviceproviderplugin.h:166:28: error: ‘struct QMediaServiceCameraInfoInterface’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]

Change-Id: I08c6718bfd87c5adeea9969afdd4766150163238
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-03-01 14:10:01 +01:00
Yoann Lopes
b2f40ef75d Android: implement QCameraInfoControl.
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>
2014-02-28 14:10:22 +01:00
Yoann Lopes
f783c48a17 VideoOutput: fix autoOrientation with a camera source.
Don't assume the camera frames are always in the same orientation as the
display in its primary orientation. We now take into account the camera
sensor position and orientation to calculate the viewport orientation.

Change-Id: Ib333c87f1804d1010ada42cb757e4fab78d75a04
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-02-28 14:10:14 +01:00
Yoann Lopes
b28ee24628 New QCameraInfo class.
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>
2014-02-28 14:10:00 +01:00
Yoann Lopes
d964388b38 QSoundEffect: fix changing the loop count while playing.
The running count was not updated with the new value.

Auto-test added and documentation updated to be more clear about this
behavior.

Task-number: QTBUG-36643

Change-Id: I29e98ca4679f950a75133b21873738bcb72d23d4
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-02-25 15:00:44 +01:00
Yoann Lopes
92323612d0 android: add missing feature tags.
Adding the CAMERA and RECORD_AUDIO permissions implicitely makes some
features a hard requirement for the app.
By adding these features in the .pro file, androiddeployqt will mark
them as unrequired in the final package.

Change-Id: Ie9357d05626cb12272001d63b04e230737fbf1bc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-02-21 14:40:42 +01:00
Frank Osterfeld
01f8ff3834 QNX: Use window group of top-level window for mmr
Pass the top-level window's window group to mm-renderer,
as required by mmr.

Change-Id: I2a2e8b4aa48f5c2292b03593c6d528068f383b5c
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-02-19 16:26:35 +01:00
Oswald Buddenhagen
13882cd5da Merge remote-tracking branch 'origin/dev' into stable
Change-Id: I84b36fa41f3d5f8fea2dec2545f72ebe6a0c7908
2014-02-19 10:05:11 +01:00
Andy Shaw
391e8a7147 Fix linking problem when built with -no-opengl
When -no-opengl was used then it was not automatically pulling in the
needed Windows libraries as it was not loading opengl.prf to get them
from.

Change-Id: I9b73e5ee01da964a64c71b6261ff4ed98ce6f1a9
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-02-17 19:03:38 +01:00
Friedemann Kleint
01714ef0c5 Use QVERIFY2 for elapsed time in tst_QMediaPlayerBackend::seekPauseSeek().
The test has been observed to fail sometimes, try to obtain values.

Change-Id: Id0374b7ad3d593c099500e771bc4d8cc50f26651
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-02-17 18:13:00 +01:00
Yoann Lopes
54066d2c21 AVFoundation: mirror viewfinder frames of front-facing cameras.
Change-Id: I95920aa459ff0931819cb6f8278ab296db542601
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-02-14 15:05:13 +01:00
Frederik Gladhorn
c6ec402d25 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ie93615076177662e75d46f3d13beeb88d424b4a6
2014-02-12 14:11:35 +01:00
Thomas Senyk
db7f7cc565 adding zero-copy-QSGVideoNode for imx6
On imx6 there is a platform-specific API to implement
memory-mapping from gstreamer-buffer to opengl-texture.

This plugin uses this API to avoid CPU-based-memory-copy.

This allows fluid video-playback up to 1080p with very little CPU load.
Before even 720p used one cpu-core completely and wasn't fluid.

Change-Id: I0c33eb5d475393a65459291ce9290fa0753de4a5
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-02-11 15:18:17 +01:00
Andrew den Exter
72b995ad79 Add meta-data mappings for GPS and camera make and model to camerabin.
This enables writing gps positioning information to captured images.

Change-Id: I663f7b94b5e6040865358df1ae45d67b73c54f92
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-02-10 03:10:56 +01:00
Andrew den Exter
c949a98c42 Fix gstreamer crash when meta-data is of incorrect type.
GStreamer tags are typed and the correct type must be used when inserting
a value into a GstTagList or subsequent merges or data accesses can crash
because of invalid casts.

Found while adding additional mappings for GPS values.

Change-Id: I95ab40a480a4685bf4e69064315557faa9de288e
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-02-10 03:10:36 +01:00
Kai Koehne
7a02bcaad1 Replace win32-g++ with mingw scope
Commit 773dd01 in qtbase introduced a general mingw platform scope, which
is cleaner and more flexible than matching the spec name.

(see 278152fff for a similar commit in qtbase).

Change-Id: Ib46b9e83f690b0b26933b73764c7d7d4b031d792
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-02-07 14:22:26 +01:00
Robin Burchell
87b8b4489a QAudioOutput: Don't guess media role if one has not been provided in setCategory.
Trying to heuristically guess this kind of thing is almost always a bad idea.
Expect the creator of the output to explicitly tell us the category instead
of guessing.

This fixes QAudioOutput not respecting system volume on Sailfish.

Change-Id: If1d05192f513eb54fdfbd1df217286f329b2bfe8
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-02-07 13:23:27 +01:00
Robin Burchell
1e23440457 QSoundEffect: Don't try guess a media role if one has not been provided.
Trying to heuristically guess this kind of thing is almost always a bad idea.
Expect the creator of the output to explicitly tell us the category instead
of guessing.

Change-Id: I5f2988e2456685f3622e0ab136951b1742215f71
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-02-07 13:23:16 +01:00
Thiago Macieira
e4035bf6d0 Normalize signal & slot signatures in connection
Profiling shows Qt Creator spends 2% of its load time normalizing

Change-Id: I1a4bef16be79ced35c47da865153ebe1bee22f9c
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-02-03 20:12:35 +01:00
Roger Maclean
6f8ccc88e8 Ensure the backend has had its geometry updated.
When trying to play video in an overlay window, the video fails to
be displayed because everything that would cause updateGeometry to be
called on the backend has already occurred prior to the backend having
been created.

Change-Id: Ida3c8feea69b497a18e9f44d7143bed03380d6ae
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-02-03 18:43:41 +01:00
Andy Shaw
9a16423610 Don't mirror the image from the camera unless it has been flipped
The camera itself can have a mode set that causes the image to be flipped
so instead of always mirroring the image that is taken from the camera we
check for the supported modes first and then check the mode and only
mirror if it is set. Otherwise we assume that it does not need
horizontally flipping but that it needs vertically flipping which seems to
be the standard for cameras on Windows.

[ChangeLog][QtMultimedia][Windows] Fixed the incorrect mirroring of the
image from the camera
Task-number: QTBUG-30365

Change-Id: I166b1f354e8d91c9a6c64f64164d782b52df98d8
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-02-03 16:54:28 +01:00
Maurice Kalinowski
d3d898f3ed Exclude win32 plugins from WinRT build
Change-Id: Icd07ad6805341f763a7abcfc8a24104c5d672ad7
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-02-03 14:32:21 +01:00
Christian Strømme
2d54da2d39 Move win32 and Alsa audio backends into plugins.
Change-Id: I9835cf5ee97900569f26421a19543b485e933051
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-01-30 18:15:36 +01:00
Yoann Lopes
0ab81ef59f Alsa: fix crash when detecting devices.
Some old versions of Alsa crash when snd_device_name_hint(-1, ...) is
called. This patch works around the problem by iterating manually over all
the available sound cards.

Change-Id: Ic380a371acc15013d137553ff30d68bed5af664e
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-01-30 18:12:44 +01:00
Yoann Lopes
8fd3a5a198 Android: add missing information in frames retrieved with QVideoProbe.
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>
2014-01-30 14:34:00 +01:00
Yoann Lopes
67b86a9fbd Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2014-01-30 14:32:29 +01:00
Oswald Buddenhagen
5980bc41cf whitespace fixes
remove trailing spaces & expand tabs.

Change-Id: I05ef110abed90f13b47752760ffb4567a11a6a5e
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
2014-01-30 14:32:10 +01:00
Yoann Lopes
b690a4d902 Android: fix crash in QAndroidCaptureSession.
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>
2014-01-29 14:30:12 +01:00
Friedemann Kleint
deaeb676eb Fix MSVC-warning about truncation of constant in tst_qaudiobuffer.cpp.
Change-Id: If9e239be38f8d15542ab9bf3a74bccf0a43b4e69
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-01-29 10:18:42 +01:00
Friedemann Kleint
04b7e05375 Fix MSVC-warnings about unsafe bool operations in tst_qcamera.cpp.
qglobal.h(501) : warning C4804: '-' : unsafe use of type 'bool' in operation
global/qglobal.h(501) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
tst_qcamera.cpp(507) : see reference to function template instantiation 'T qAbs<bool>(const T &)' being compiled

Change-Id: Ifd467b5536a0d386f592ae339129b3ebfb7b8838
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-01-29 10:18:42 +01:00
Friedemann Kleint
8bfd49d40f Fix MSVC-warnings about unused variable meta in tst_qdeclarativevideooutput.cpp.
Change-Id: If324fd2e65acb7650b1d8dee4964a2c2bb17f876
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-01-29 08:32:38 +01:00
Frederik Gladhorn
bffb1cc117 Merge remote-tracking branch 'origin/release' into stable
Change-Id: If97b68b56071e241c659ddd231f28e433954d7be
2014-01-27 18:58:47 +01:00
Frederik Gladhorn
9459acf48e Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I83d589c55e8463cce23068dc81096aa66ec596a5
2014-01-27 18:54:20 +01:00
Daniel Nicoletti
7451906b71 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>
2014-01-27 15:22:12 +01:00
tom
d26fcf043d 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>
2014-01-24 13:33:01 +01:00
Thiago Macieira
d19bede8ad 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>
2014-01-23 10:18:53 +01:00
Frederik Gladhorn
819f30df33 Merge remote-tracking branch 'origin/release' into stable
Change-Id: Ifcb0e0bac29c11980ea2a9d67b12e1b79c4bd9f6
2014-01-22 11:36:50 +01:00
Yoann Lopes
a0746fe49c 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>
2014-01-20 17:26:21 +01:00
Andrew den Exter
60fb11d9a2 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>
2014-01-20 14:26:03 +01:00