Commit Graph

673 Commits

Author SHA1 Message Date
Girish Ramakrishnan
dd6e0833c5 Adapt to _qpa file rename in qtbase.
qtbase change 36547f4eff44361f7a6acd0cff107c0e47561f93
renamed qpa headers.

Change-Id: I3d2f08fb969bf1b448b0105032d6111c6643a7a7
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-09 00:42:42 +02:00
Dmytro Poplavskiy
5a2de6d2fa Declare and register metatypes for media encoder settings classes
Change-Id: Ib3a42409045fe55c7a410b5ec52bd284f3475417
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
2012-05-04 15:19:12 +02:00
Thiago Macieira
b2b92dad82 Change uses of {to,from}Ascii to {to,from}Latin1
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: Ic591779a3431999c007fb0ff362c7e25ce54097e
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
2012-05-04 13:36:08 +02:00
Thomas McGuire
025f4d2ee1 Support QVideoWindowControl in the QtQuick Video element.
Change-Id: I953899a3ec92856955d36528057b0d45f9c26394
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-03 10:34:10 +02:00
Thomas McGuire
926049cb15 Improve .gitignore
Change-Id: I4e9fd33f199b90a4b7c8cf8b9fcc6d18c532842d
Reviewed-by: Debao Zhang <dbzhang800@gmail.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
2012-05-03 09:28:53 +02:00
Lev Zelenskiy
c45a5a0b42 Implement QGstreamerVideoRenderer::stopRenderer()
Surface has to be stopped when
QGstreamerVideoRendererInterface::stopRenderer() is called.
This fixes a media player issue when video output is not cleared
when media is set to 0.

Change-Id: Ifdc851797519dcdf95db86e8dcec93b3866c388e
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-03 04:10:33 +02:00
Dmytro Poplavskiy
f62213fee8 Fixed typo in QMediaRecorder::Status metatype registration
Change-Id: Id370b272b6c6c992762b1aefecb6cfbc7c916f2a
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-02 07:03:07 +02:00
Dmytro Poplavskiy
b36e2f5209 Replaced QMediaRecorderControl::play/stop/pause with setState
This allows to introduce new states without breaking BC.

Change-Id: I03c064cec92d6745b251a51cfb301e7f01f4b765
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-02 04:59:17 +02:00
Dmytro Poplavskiy
b7935a84d7 Added QMediaRecorder::status property
QMediaRecorder::state property represents the user request and
changed synchronously during record(), pause() or stop() calls.

Recorder status is changed asynchronously
and represents the actual status of media recorder.

This also makes API more consistent with QMediaPlayer and QCamera.

Change-Id: I80b4aaa70bb88e555c492908da8c29d0fc5ed5ea
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-02 03:15:01 +02:00
Dmytro Poplavskiy
af932e8653 Added QCamera::UnloadingStatus and StoppingStatus values.
These statuses are useful when the camera is stopped and/or unloaded
asynchronously. Previously the status was changed to
LoadedStatus or UnloadedStatus immediately,
even while camera was still active.

Change-Id: Id11021a150b0d34791ea631d7a62086cc0727220
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-01 02:29:34 +02:00
Friedemann Kleint
4be845d092 QtMultimedia: Fix deprecation warnings.
Use QVariant::canConvert instead qVariantCanConvert.

Change-Id: I3c924a0bb508a451623da250fb9d410cf70a91f0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-30 16:37:07 +02:00
Jonathan Liu
641474ab10 Fix MinGW-w64 compilation
Change-Id: I812b53e822947a9f85d6523722c6a4f9e57e0426
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-30 11:04:05 +02:00
Jonas Rabbe
a3b6eabd45 Split gstreamer plugin into smaller plugins providing fewer services
The gstreamer blob has been split into four plugins: audiodecoder,
camerabin, mediacapture, and mediaplayer.
Note: camerabin is still disabled because it is untested camerabin2
implementation.
A new qmake configuration use_gstreamer_camera has been introduced
and is needed for the mediacapture plugin to expose the camera
service. This configuration has been disabled by default.
Shared functionality has been moved to the internal gsttools library.

Change-Id: Ifb2604f440cfa97513d39f5d7978766c88eaec45
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-27 09:22:09 +02:00
Lev Zelenskiy
e44bcf0a38 QSampleCache unit test: correctly check whether sample is cached.
Use QSample::isCached instead of relying on pointers.
Also added a test for loading an invalid file.

Change-Id: I9f4f1e8c3dc3cdb4a88a756cc6cad85e68c3a1b6
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-27 05:05:42 +02:00
Lev Zelenskiy
4d1579d37b QSampleCache: Add a method to check whether a sample is cached.
At the moment there is no way to tell whether a sample
returned by QSampleCache comes from cache.
This functionality is required for a unit test.

Change-Id: Ice23bb39b8e4f0a58b9297b46bb19b9a8c34b53c
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-27 05:05:38 +02:00
Michael Goddard
d6cba78516 Fix a compiler warning.
Change-Id: If82ec145b9076c1418460fa4d59595e0a60e5a0f
Reviewed-by: Jun Zhu <jun.5.zhu@nokia.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-04-27 05:05:35 +02:00
Michael Goddard
b2d581b42e Fix a possible stale pointer access if we can't connect to PulseAudio.
We free the mainloop but didn't check validity before calling lock or
unlock.  Also we might need to unlock the main loop before freeing
it in some other error cases.

Change-Id: Iadf1049324cdf37ca9841b82e53e33afdcba8cb2
Reviewed-by: Jun Zhu <jun.5.zhu@nokia.com>
Reviewed-by: Lev Zelenskiy <lev.zelenskiy@nokia.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-04-27 05:05:32 +02:00
Michael Goddard
2a7c2e695b Make sure the audio/video availability information changes atomically.
So there's a consistent picture of the stream availability.

Change-Id: Id7ea166353c0151fcc11105a1e233e9fe8df9cc6
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-04-27 05:05:30 +02:00
bigbearzhu
24ced13a25 Added tests for unsupported and corrupted file.
Change-Id: Ifab4aed1e389afff9a567897829381b91b9bcddb
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-27 00:51:22 +02:00
Lev Zelenskiy
b2ca5e8a0d Added unit test for QSampleCache.
Change-Id: I4dbd54822f246ba9a69ab85897a4c983b7c17561
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-25 04:55:20 +02:00
Lev Zelenskiy
81e3c112e2 Extended integration test for QSoundEffect
- setting the source while loading, and while playing;
- supported mimetypes;
- loading corrupt wave files;

Change-Id: Iff27921aaf3a67bcf88807b2a5656deb8cf2d77e
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-25 04:55:20 +02:00
Lev Zelenskiy
cd5e90f00a Still need to count usage even when capacity is zero.
When the sample is removed we need to decrease sample cache usage,
even when capacity is set to zero.
Otherwise we're getting wrong usage after capacity is changed.

Change-Id: I38820c0f9441abec3086189698ec5a904e1e9b6f
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-25 04:04:59 +02:00
Lev Zelenskiy
c718043588 Do not try to complete flush operation if stream has changed.
There is a problem when sound effect already has a sound loaded and
we try to load new sound with setSource().
When sampleReady() is called between emptyStream() and emptyComplete()
it unloads the current stream and creates a new stream.
As a result pulse audio crashed in emptyComplete() while calling
pa_operation_unref(pa_stream_cork(
m_pulseStream, 1, stream_cork_callback, m_ref->getRef()))
with the new m_pulseStream.

Change-Id: Idff4fe6037d3f3f116734dc0facabaafa3db14a2
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-04-25 04:03:02 +02:00
Thomas McGuire
7c84225cc8 Move QVideoWindowControl out of widgets.
There is no widget dependency in it, and this enables the QML
Video element to support video overlays later.

Change-Id: I7ebcde350f9595a9f7c319663ff745930535a8a7
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-25 04:02:15 +02:00
Jason McDonald
a775af111b Remove insignificant_test marker for maemo platform.
Continuous Integration is no longer performed for this platform.

Change-Id: I5bd33a3984108fea4e2072b49aed06c57b32d1f4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-24 14:43:12 +02:00
Friedemann Kleint
c177d8d69e QtMultimedia: Fix compiler warnings.
Change-Id: Ic0edfa95c03103550d22bfdf88c33fdbd6f41e3c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-24 11:48:04 +02:00
Friedemann Kleint
5ae3adcfa9 Fix compilation after qtbase:8f85b84f4eaa85ff5c02ec5e65fd6706a10690b9.
Remove QDeclarative compatibility module code.

Change-Id: Ib24c0c027c899e7eb30b3c8550a483d0d8b2b77f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-24 11:47:54 +02:00
Dmytro Poplavskiy
e2f5779d2a gst player: clear the buffer pool when the video sink is stopped
Buffers were kept allocated until the player is destroyed or
next media played.

Change-Id: I8a0c85da3a82ac6883075a1d0674143783c7f010
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-20 08:47:32 +02:00
Angus Cummings
c4cd9e711d Link to QtAudioEngine on multimedia landing page
Change-Id: I858644e16f668d0ee4ca820b3cc65f60fd3208dc
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-20 08:47:24 +02:00
Lev Zelenskiy
41cf8853da QVideoProbe unit test.
Change-Id: If8d391734b08eee2edbc2250fbcbe7f45cf94b3e
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-20 08:47:19 +02:00
Lev Zelenskiy
46f67a8b69 QAudioProbe unit test.
Change-Id: I4dde8a46883cfc793fdccbfd24ffde0c818fa1aa
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-20 08:47:14 +02:00
Lev Zelenskiy
f1c4093f37 Disconnect probe control in case source was destroyed.
Change-Id: Ibc4583af8acf7d28ee2504f246840a26e3a527be
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-20 08:47:10 +02:00
Angus Cummings
c9749cf7ac Adding QtAudioEngine to the landing page
Change-Id: Ie24ff0d4b949ccb5cd21624e33ef2b42b6857743
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-20 08:47:06 +02:00
Lev Zelenskiy
1a71385d6a Emit connection-failed signal if gst_pad_alloc_buffer fails.
Buffer allocation might fail for requested format.
We need to emit connection-failed signal
and allow backend to insert colorspace transformation element.

Change-Id: I9a101bb3c027f150c68bbeaba8ab932deded47ea
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-20 08:47:03 +02:00
Dmytro Poplavskiy
3998106d93 qvideosurfacegstsink: fixed calculation of supported formats.
If the custom buffer pool is used, it's also necessary
to query the list of video surface formats with this handle type.

Change-Id: I8a38f4c75f37ed05fbfdcf0933023a6abef1b3e1
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
2012-04-20 08:46:59 +02:00
Lev Zelenskiy
20315eec05 Added integration test for video surface backend.
Make sure pipeline doesn't stall in RGB and YUV modes.

Change-Id: I9fa253ecb6952e3e0138180c52fa945a13f7cf50
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-20 08:46:56 +02:00
Michael Goddard
e657397f66 Adjust to changed QUrl::isRelative() semantics.
Paths with a leading slash were previously considered relative (with
no scheme) but now they aren't.  So take the opportunity to tweak the
path resolution code

Change-Id: I7b02cb85403ebb151dba274db0c05459ef536f18
Reviewed-by: Lev Zelenskiy <lev.zelenskiy@nokia.com>
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-04-20 07:52:09 +02:00
Jason McDonald
ebe568f2b1 Add bug numbers to insignificant tests.
Change-Id: I4600e4919f9b2bbfcf0ac580054748d14f31b0c9
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-16 17:11:33 +02:00
Angus Cummings
c7b02bad92 Change Video and VideoOutput docs to mention ScreenSaver
Change-Id: If7a03e9eafd351eec484a568802c75d955b68ecf
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-16 10:56:34 +02:00
Michael Goddard
5f7b64346d Expose the audio category information for streams.
QAudioOutput and QSoundEffect now have a category property so that
system volume mixing or processing can be applied.

Initially just pulseaudio supports this but Windows Vista etc should also
work.

Change-Id: I6855b08367e5a055ac7dfcffd644c98bfd7c5a4e
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-04-16 10:56:34 +02:00
bigbearzhu
8441d2e32e buffer should only be available when m_buffersAvailable > 0.
Change-Id: I730fcbf6aa4fc446d12c64fcb7cfd410be96a20d
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-16 09:44:47 +02:00
Lev Zelenskiy
3d89cae052 QDeclarativeVideoOutput: correctly disconnect _q_updateMediaObject
Fixed a bug where _q_updateMediaObject() slot wasn't disconnected
correctly.

Change-Id: I45696fc850dc59ff6f1cc45da15b87c280c29088
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-16 09:44:40 +02:00
Lev Zelenskiy
1b94f984c9 GstVideoConnector: make sure downstream filter is in correct state.
When requesting a buffer from downstream filter,
check if downstream element is in NULL state,
and wait for up to 1 second for it to switch.
Otherwise gst_pad_alloc_buffer returns GST_FLOW_WRONG_STATE and
pipeline stalls.

Change-Id: Ic0539c41638ab3bfb548a30043ebe925675b0b6f
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-04-16 03:29:40 +02:00
Angus Cummings
e24f4fed53 expanding unit test for QAudioDecoder
Looking for feedback concerning:
implementation of the change
desired functionality of QAudioDecoder

Changed the behaviour of QAudioDecoder for
more sane error output

Change-Id: I82193a94b6fe1ef4202a4ac7bd95c607e0bee9c6
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-14 06:57:33 +02:00
Thomas Senyk
02efdccae9 add #include <unistd.h> to classes which use ::getpid
I got  "error: ‘::getpid’ has not been declared" and solved it with
adding #include <unistd.h>

Updated version of change 23032.
Now including <sys/types.h> as well.

Change-Id: I969845e1c4d5b72a223f6f4e0050b2fb342b8f17
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-13 03:28:29 +02:00
Thomas McGuire
72316a4ea8 Use QtMultimedia 5.0 in the QML Video element doc.
Change-Id: I5e549b321a549d2b4abc058cf08d81329df3562e
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-13 03:28:26 +02:00
Thomas McGuire
4753484be0 Ignore QtCreator user settings.
Change-Id: I0aed0177733e3804801ec2aba5c974d740118f42
Reviewed-by: Yuchen Deng <loaden@gmail.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-13 03:28:23 +02:00
bigbearzhu
e91e63435f Translated corresponding Gstreamer errors to QAudioDecoder::FormatError
Change-Id: I34834075ea98c163251e7a9aca1fb7bc486ad7e9
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-04-13 03:28:21 +02:00
Michael Goddard
e057fd9e8a Move QAudioDecoder to public.
To get better feedback between alpha & beta.

Change-Id: I3620825fb9c2bb9de69951cf1d583b191d62cb0d
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-04-11 03:32:00 +02:00
Michael Goddard
8484b0ff9c Fix a number of doc errors and warnings.
* Document a few missing classes/functions/methods
* Fix a number of QML snippets that wouldn't work as standalone snippets
* Add files to .pro so they show up in Creator..

Still the mysterious lack of controls dir documentation persists :/

Change-Id: I57162371a4d966e4db5bdb1b71d1baf9c0ca57c3
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-04-11 03:31:52 +02:00