Commit Graph

2000 Commits

Author SHA1 Message Date
Yoann Lopes
e3123185a5 DirectShow: fix metadata signals when changing media.
The metaDataChanged() and metaDataAvailableChanged() signals should
be emitted immediately when changing or clearing the current media.

Change-Id: I3152e2c32420ba6f11cf6780013e02208a9d6599
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2016-01-06 15:20:59 +00:00
Yoann Lopes
704ac34cc7 Favor more commonly supported formats in qmediaplayerbackend test.
Prefer mp4 and mp3 over ogv and mkv.

Change-Id: Id24d475207ccf76e113557f9ad14775477f414aa
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2016-01-06 15:20:57 +00:00
Yoann Lopes
e8a75e225b Make qmediaplayerbackend::processEOS test less flaky.
Change-Id: Ib961f3d4e238a156dc2e1ade1828ae8f1bf5b755
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2016-01-06 15:20:55 +00:00
Yoann Lopes
4fcf153d68 DirectShow: fix media player's positionChanged() signal.
The signal was not emitted at the right time or with incorrect values
under certain circumstances.

Change-Id: Ib8b1d38381d908399752856db7b0a987c4422bb1
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2016-01-06 15:20:50 +00:00
Kevin Funk
315a946e40 Add virtual dtor to QSGVideoNodeFactoryInterface
Makes it compile for me

Change-Id: Ib79f4c38bb165d3698a94c5d1aafee710423a907
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-12-22 10:22:24 +00:00
Yoann Lopes
2593f00411 Make qmediaplayerbackend::seekPauseSeek test less flaky.
Change-Id: I05e4b9d392359bd84f9e932864a2e14275ef625f
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-12-18 19:08:20 +00:00
Yoann Lopes
82e135167a Change the way a playlist is bound to a media object.
The previous behavior was to simply switch from the internal
control to the service's control, discarding anything that was
added to the playlist before binding.
We now carry over the changes made to the playlist when switching
controls. This means the switch is now transparent to the user.
When the service's control is read-only, we cannot transfer the
items, which means the user must be notified of the items that
might have been "lost" during the switch.

Auto-test modified to reflect this change.

Change-Id: Ibf80b650b06425ddbaeb320b72ac5d3082a25960
Reviewed-by: Jim Hodapp <jim.hodapp@canonical.com>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-12-11 14:53:16 +00:00
Tony Sarajärvi
94c33684fe Blacklist qmediaplayerbackend tests in OSX 10.11
These were found to also fail in OSX 10.11

Task-number: QTBUG-46368
Change-Id: Ifac6fd0540ff63f3eb5198b5ac76c65ee893f005
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-12-11 11:09:06 +00:00
Tony Sarajärvi
e796e3a55f Blacklist qaudiodecoderbackend tests in OSX 10.11
These were found to fail also in OSX 10.11

Task-number: QTBUG-46331
Change-Id: I619816655c614c08183ab700bca8bd7ec5384a91
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-12-11 11:09:00 +00:00
Yoann Lopes
604a5753fa AVFoundation: correctly set the activeFormat on the AVCaptureDevice.
According to the AVCaptureDevice documentation, the device must be
locked before starting the capture session to prevent the activeFormat
from being overridden. We now do that, but only if we explicitly set
an activeFormat. Otherwise the device is not locked, which allows
the session to find an appropriate format for the capture device.
The device is also locked when enabling video capture, as doing so
might also reset the activeFormat.

Task-number: QTBUG-49170
Change-Id: I75478fd4bbfec96cd2abd2c3ae2951088b38978e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2015-12-10 18:07:03 +00:00
Denis Shienkov
dd2b63498a GStreamer: Add color balance and sharpening adjustments using V4L2
GStreamer's backend does not implements this features, therefore now is
used the V4L2 interface for the contrast, saturation, brightness and the
sharpening adjustments. The V4l2 interface works together with the
GStreamer and covers the features which are not supported by the
GStreamer.

Change-Id: I995ed6cb096a29543fb80206384a92c13a1d1af2
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-12-10 16:07:26 +00:00
Denis Shienkov
fcb511b6d6 DirectShow: Get current image processing parameter from the cache
We can simplify a code, do not need to call pVideoProcAmp->Get()
each time when we want to get current parameter value. It is
better to do this once from updateImageProcessingParametersInfos().
In this case we will return desired parameter from the local cache.

Change-Id: If33c3882230c9ae817071ace5b792dfe31685a7f
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-12-10 13:12:55 +00:00
Denis Shienkov
5becd7c1a9 DirectShow: Add WhiteBalancePreset and ColorTemperature for the camera
Change-Id: I9a646418d6177338735e1eb38967fd092e21e0cf
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-12-10 13:12:38 +00:00
Denis Shienkov
ab403bc9ae GStreamer: Adjust the camera's manual color temperature through V4L2
GStreamer does not support setup of manual color temperature for the
camera. Now it is implemented through the V4L2 interface, where it is
works together with the GStreamer and covers the GStreamer's holes.

Change-Id: Icaeadeb4e21ec7865bcfa908bead318d4ead8ba5
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-12-10 11:26:00 +00:00
Venugopal Shivashankar
5916caae7a Doc: Move all doc artifacts under one project
Although the Qt Multimedia module has two submodules, a
single project is sufficient to document these submodules,
avoiding unnecessary maintenance overhead.

Change-Id: I8fab48241b5c9aba35890a8aaa28ce7154f78c45
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-07 15:44:49 +00:00
Yoann Lopes
2b7c617e09 WMF: correctly handle media with multiple streams.
Only use the default streams and make sure only one stream of each kind
(audio/video) is added to the topology.

Change-Id: Ied37174fa722068b4cd1b5f91b60e0cef5c1d7b3
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-12-04 11:41:52 +00:00
Yoann Lopes
8ed8f33c18 WMF: correctly handle samples in the video probe transform.
Set the right flags so the renderer doesn't allocate its samples.
We can then just forward the samples we get from the upstream element
and avoid a copy.

Change-Id: Iafc15b81531a7415823d063c47a326ea6239136f
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-12-04 11:41:46 +00:00
Yoann Lopes
a6164acd2f WMF: fix type negotiation in video probe transform.
- report supported types (same as the video sink)
- handle type changes coming from upstream

Change-Id: I922fc4869ecac3999e055c39adf1b847127a0012
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-12-04 11:41:42 +00:00
Yoann Lopes
43f3d14a99 Android: fix QMediaRecorder crashing the camera server on some devices.
Some devices require MediaRecorder.setPreviewDisplay() to always be
called, even though the Android doc says otherwise.

Task-number: QTBUG-37837
Change-Id: I1e9b56f06e7c41bdf684f93b5ec7635f8ae9f379
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-12-04 11:41:31 +00:00
Yoann Lopes
8debbfbc9b Android: support non OpenGL video surfaces for the camera.
QCamera can now pass raw frame data to its QAbstractVideoSurface.
The now deprecated Android camera API we're using doesn't allow to
get frame data without also displaying the frames in a SurfaceView
or a SurfaceTexture. To work around that, an invisible dummy
SurfaceView is used.
This allows to retrieve frames in the NV21, YV12, YUY2 or RGB565
formats, depending on the Android version and on the device.

Task-number: QTBUG-35416
Change-Id: I77b4f50505c3b91efb4b2288a57f50398922c0db
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-12-04 11:41:25 +00:00
Christian Strømme
ece9005efe Android: Camera updates
There's no need for callbacks to block any other threads from reading
from the camera pool, so use a read/write lock instead. There's also no
benefits gained from using a QMap, so use a QHash map instead.

Change-Id: Iaac74c0173d2dddc296f5d2c03116724ffdc588c
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-12-04 11:41:20 +00:00
Roger Maclean
8b00d8e542 QNX: Handling looping properly
On play, if we're at the end of media, set the position to
the beginning.  The code was previously setting the position
to the last known position, likely just prior to the end
which causes the last few frames of video to be played
endlessly.

Task-number: QTBUG-49668
Change-Id: I9613114294c22152dd66ae7111c38c8cdef5b907
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-12-03 11:57:51 +00:00
Yoann Lopes
5ed9b6d6d7 AVFoundation: fix setting up the video capture session.
Because of an incorrect 'if' condition, the video capture session was
set up twice when starting the camera.

Change-Id: I4211a8c77ab9b8086628fb0f12fb28842de830cf
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-12-03 09:40:28 +00:00
Yoann Lopes
8dc46cef05 AVFoundation: fix setting the camera viewfinder resolution.
Image capture resolution and viewfinder resolution must be the same,
with the image capture resolution taking precedence over the viewfinder
resolution when both are explicitly set.
The code was getting the active image capture resolution, instead of
the one explicitly requested, to adjust the viewfinder resolution.
That effectively made the viewfinder resolution always ignored since
the active capture resolution always has a default value.

Task-number: QTBUG-49170
Change-Id: I2f3d01366d83a3e28c0a1ea0109663cfdfa75963
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2015-12-03 09:40:21 +00:00
Yoann Lopes
b7880782b9 Android: check for exceptions in some camera operations.
Not all camera operations are documented to raise exceptions, but they
actually might do so depending on the hardware/drivers.
Check for exceptions in all functions that could porentially fail
and react appropriately.

Task-number: QTBUG-49134
Change-Id: I633ca7f2e3aeb6532e1c445735e62135f52cf25f
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-12-03 09:40:16 +00:00
Denis Shienkov
7f04598859 DirectShow: Implement basic QCameraImageProcessingControl interface
This commit implements the contrast, saturation, brightness and
sharpening adjustments, using DirectShow backend.

Change-Id: I438595550ff804f2a20028b4bc020c566d309127
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-12-01 13:00:26 +00:00
Raphael Kubo da Costa
3b322323d0 alsa: Relax ALSA version checks for 1.1.x to be detected.
Relax the check for SND_LIB_MINOR and SND_LIB_SUBMINOR so that ALSA
1.1.x is not considered older than 1.0.10. QtMultimedia builds fine with
ALSA 1.1.

Change-Id: If697c34cc7d9bbe2f2a3413d0c25ac4de4e93b34
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-11-27 22:41:13 +00:00
Samuel Nevala
1950765b65 winrt: Fix Lumia 930 black viewfinder.
Add Lumia 930 to the camera texture blacklist.

Task-number: QTBUG-49660
Change-Id: Icc4cdbb5e5e736b2273c46f0537a62aeaad0c605
Reviewed-by: Matti Malinen <matti.malinen@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-27 14:45:13 +00:00
Friedemann Kleint
4b2e4f5924 DirectShow: Remove unused static function decibelsToVolume().
Fix warning:
player\directshowplayercontrol.cpp:56:12: warning: 'int decibelsToVolume(int)' defined but not used [-Wunused-function]

Change-Id: Ic482be6b58f675da008a0e0600d73c127871f3d7
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-11-25 11:57:57 +00:00
Venugopal Shivashankar
ea2f5aa0b5 Doc: Exclude outdated content using \omit command
Change-Id: Ifb30e398b57550788dab6955e3eac80949d47248
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-11-25 11:39:35 +00:00
Yoann Lopes
8aa31a38cb Fix some private headers.
- Add missing "We mean it" comment
- Add missing '_p' suffix for QtMultimediaQuick_p headers

Task-number: QTBUG-49480
Change-Id: I1fd4f8b2fdffecebaebaedaf1b78e1da62c08156
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-11-24 16:07:23 +00:00
Yoann Lopes
9937c67dec Implement volume in audiocapture plugin.
This plugin uses QAudioInput as audio source for the recording, just
forward the volume to it.

Change-Id: Ice3ec5e48195b13d5f738b79a357dfc261ad8955
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-11-23 11:48:37 +00:00
Yoann Lopes
9b5a67d810 AVFoundation: improve viewfinder settings.
Retrieving the supported viewfinder settings don't actually require
a video surface, we just need a capture device. The supported settings
can now be retrieved without calling QCamera::setSurface().
More generally, all viewfinder settings that don't require a video
surface can now be gotten/set before calling setSurface().

Task-number: QTBUG-49170
Change-Id: I39b14eeb40517a9ba399748b5778be8bbc8cfcda
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2015-11-20 16:49:01 +00:00
Yoann Lopes
7221ed82d2 Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: I8e0f222f110cc23b426f2d68416f5cc3982e30f2
2015-11-20 16:21:38 +01:00
Samuel Nevala
4b25972f9b winrt: Wait for focus to finish when camera stopped
Change-Id: I53918a8f7c5f50331593ad09233cd737e040e650
Task-Id: QTBUG-49527
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Matti Malinen <matti.malinen@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-11-20 12:57:25 +00:00
John Brooks
5c09c4c3c7 Fix use-after-free in AVFCameraService during renderer destruction
Change-Id: I10a994b71e55565c0de31aa0c34f32964e2e3a1b
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2015-11-19 23:36:39 +00:00
Samuel Nevala
b80436a3e0 winrt: Early return from searchAndLock if camera not active.
Change-Id: If2279db9cffbc5d06f0d662b6f942b6985034675
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Reviewed-by: Matti Malinen <matti.malinen@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-11-19 12:12:03 +00:00
Yoann Lopes
5135ffaf2a Add qt_real_to_fraction() helper function.
Private API meant to be used by plugins whose backends expect frame
rate values represented by a ratio.
The function implementation was moved from the AVFoundation plugin
to the QtMultimedia library.

Change-Id: I555b9d5da5ca3bae88992ed03501869fb731e45f
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-11-19 11:59:25 +00:00
Yoann Lopes
7c4574a698 Support compiling with GStreamer < 0.10.32 in the camerabin plugin.
The documented minimum GStreamer version for Qt Multimedia is 0.10.24,
however, the camerabin plugin actually required 0.10.32 to compile
successfully. The reason is mainly due to the GstEncodingProfiles
API, which is used to implement the audio and video encoding settings
controls. There's no hard requirement for that API anymore and the
aforementioned controls simply don't do anything when the GStreamer
version used to compile is older than 0.10.32.
A few other GStreamer calls had to be ifdef'd or replaced in order
to compile with 0.10.24.
Note that this patch only makes sure it compiles with older versions,
running the camerabin plugin with GStreamer < 0.10.32 is currently
untested and it might not work as expected.

Task-number: QTBUG-48914
Change-Id: I4ce8e932f24a33e919e29326729e12bbae561faf
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-11-19 11:59:20 +00:00
Morten Minde Neergaard
4a2c597a06 Don't initialize volume on pulse audio input by default.
Task-number: QTBUG-49461
Change-Id: I32b707e19091ab8344175b2dc0cdd1747f1186b3
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-11-19 11:56:04 +00:00
Liang Qi
bcdfb1e6b9 Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6 2015-11-18 15:27:54 +00:00
Samuel Nevala
88c3398e0e winrt: Fix toggling camera position.
Change scanline direction every time camera position changes.

Change-Id: I8673eabe361c951f97f4422a682d11e862f8b27a
Task-Id: QTBUG-47809
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-11-17 14:59:39 +00:00
Liang Qi
04e36a02f2 Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: I72dc669a746c7685874afced3ee0f2f899aaf1cc
2015-11-17 07:22:52 +01:00
Samuel Nevala
da0b7aea9a winrt: Fix crash when camera unloaded while searching focus.
Return early from focus related methods when async operation reports
that it is write protected.

Change-Id: I41bf9121e7ae431e5158b5e4c43cde582c30dfd7
Task-Id: QTBUG-49347
Reviewed-by: Peng Wu <peng.wu@intopalo.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-11 22:12:55 +00:00
Denis Shienkov
b05fac61e0 QtMultimedia: Fix build with CONFIG+=use_gstreamer_camera option
Change-Id: If2d996545cc61c019f44c3c4f311b659513ff754
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-11-11 13:35:47 +00:00
Nodir Temirkhodjaev
b611490074 DirectShow: Avoid warning about unresolved error when file is missing.
AddSourceFilter() can return E_FAIL.

Change-Id: Idbd8ec5a4a3c9b9d8fef9ff690cc0169f4027666
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-11-11 09:05:26 +00:00
Frederik Gladhorn
dfa57af6de Remove RHEL blacklisting for tests that pass
After installing the gstreamer plugins, these tests that used to be
blacklisted pass now.

Change-Id: I9be38ceb45f007930257d72d6b22a44ae661ad07
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-11-07 13:21:04 +00:00
Frederik Gladhorn
05bede94c9 Blacklist a few test functions for RHEL
After installing the gstreamer-plugins, these tests still fail.
Blacklist them until they get fixed.

Change-Id: I5acbd5a4911253e96e40e30a2faf161bfa387989
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-11-07 13:21:03 +00:00
Yoann Lopes
12fba3bfb1 DirectShow: fix custom renderer reference counting.
Change-Id: Iadefd4d72bdafb982a79b99ee5880dba32f3e920
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-11-06 16:47:08 +00:00
Paolo Angelelli
1c7543a640 Fix for disallowed property bindings in qml effect files
According to the documentation of ListModel.get, "The returned object
is not guaranteed to remain valid. It should not be used in property
bindings." So the property bindings have been removed, and a js function
has been introduced to update the properties upon list change.

Task-number: QTBUG-49221
Change-Id: Idaed746ca237198b52a3aff0234076331e1512c1
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-11-06 09:32:41 +00:00