Commit Graph

236 Commits

Author SHA1 Message Date
Michael Goddard
f7bfcdfa28 Remove widgets config test.
Since it's not guaranteed that other Qt modules will be built by the
time qmake is run (and config.tests are created) we can't rely on
compilation.  Just check the module.pri variable for widgets instead.

Change-Id: I352cf6427b748b89b69ec17588ce0dd83065090f
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-01-11 01:00:42 +01:00
Rohan McGovern
23470c2035 sync.profile: introduce dependency on qtjsbackend
sync.profile needs to enumerate indirect dependencies too.
qtdeclarative now depends on qtjsbackend; update sync.profile
accordingly.

Change-Id: I45cd8d2ca7e35abbb58b83f133e33a052aa4598e
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
2012-01-10 23:32:39 +01:00
Mithra Pattison
13d75ce063 Fix for QSoundEffect crash bug
When multiple QSoundEffect instances play the same wav source file
simultaneously, the system would crash due to some instances not
waiting for the underlying pulse audio stream to complete its
setup logic. QSoundEffect now waits for the stream to attain the
correct state before playing the sound.

Change-Id: Ib5a1e6bc3f1cc314054f9cdc89c10100ad546721
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-06 08:42:54 +01:00
Michael Goddard
6b67a11032 Add the spot for spot metering mode.
Not yet fully documented in QML - needs a bit of an overhaul first.

Change-Id: Ic11684858fb872d0b4dcedf60b390571371db252
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-01-06 07:26:59 +01:00
Michael Goddard
c97f5f8c2e Properly handle the case where QtWidgets is not available.
It does use a config test for now, just to make it clearer.  The Mac
backend currently requires widgets, but most of the others should work
without it (just not supporting QVideoWidget/WindowControl).

The QVideoDeviceControl interface was modified to remove the QIcon
usage - it was never implemented.

Unfortunately even the QML examples need widgets for the wrapper
application, and will need to be ported to QtGui based wrapper.

Change-Id: I8a55ad5cf09ab51749510bf16f49de0bd3f0bcdb
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-01-06 05:26:01 +01:00
Jason McDonald
bc7d964a05 Update copyright year in license headers.
Change-Id: Ib82c1be5548443ef1f5e97b3d5641a2f55d212af
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-06 01:43:40 +01:00
Friedemann Kleint
3910efbda6 QtMultimedia: Fix compiler warnings.
- Fix deprecated QDeclarative includes.
- Comment out unused parameter.
- Remove trailing comma from enumeration value (Clang)

Reviewed-by: Michael Goddard <michael.goddard@nokia.com>

Change-Id: I31d54a12505f4e3a48eb4b7736a48d5dacc2c0d9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-05 08:18:37 +01:00
Friedemann Kleint
55c0505a00 QSound/QSoundEffect: Use QFINDTESTDATA to locate test data.
Replace SRCDIR define by QFINDTESTDATA, which is the standard
method of locating test data. Remove apparently unused code path
within QT_QSOUNDEFFECT_USEAPPLICATIONPATH.

Change-Id: Id7120e75af727839ad2d1d2b3ef25c7ef2122fa5
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-05 04:01:51 +01:00
Michael Goddard
502d3c8eb3 Restructure the source code a little.
Change-Id: I995b0fb33bdda7f01bf6266c1c50a1b17eba6760
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-01-05 01:13:44 +01:00
Ling Hu
6ee1977d60 add Q_OBJECT to QMediaGaplessPlaybackControl
Change-Id: I010b14f7900bd168012bb876f708397eec4dfa4b
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-04 06:46:10 +01:00
Friedemann Kleint
5dfb698016 QAudioIn/Output-tests: Remove SRCDIR-macro/stabilize.
- Introduce QTemporaryDir to create a temporary directory
  to write the files, preventing file open failures caused
  by left-overs of failed tests.
- Use smart pointers for files and QTemporaryDir to ensure
  that files and the directory are always cleaned up
  at destruction time.

Change-Id: Icfbb331dbdd586012b5787f91c36e164033c4120
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-04 03:43:36 +01:00
Ling Hu
093a3efbf3 Add new gapless playback control interface
Change-Id: If14c20af6da81dd65177102c9b955e3ebd40c722
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-04 03:43:32 +01:00
Michael Goddard
45a3823631 Initialize the mock player state variables.
So valgrind is less grumpy.

Change-Id: I3219fd1eaa2296bc6e158876137e0b79c4d8b714
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-01-04 03:43:22 +01:00
Michael Goddard
f7fdfbe7de Remove a random instantiation of a backend.
Not appropriate for a unit test.

Change-Id: I7b05bb8aa067382b34e30d0602809c9fe56b27ef
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-01-04 03:43:20 +01:00
Michael Goddard
d9dc920393 Remove some test functions that are actually integration tests.
And they're already in the qcamerabackend test.

Change-Id: If3edba9035380372a2e8d46efe1cf41e91ce5f09
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-01-04 03:43:17 +01:00
Mithra Pattison
f9ec11a25e Add new implementation of QSound class
Added a re-implementation of QSound, using functionality derived from
QSoundEffect. QSound API remains the same as the original 4.x version.

It offers both a static interface (with auto resource cleanup on sound
completion), as well as an object instance interface for more detailed
control.

Change-Id: I85c00dd88547f8dea9b1e1ef2da31d2f2e28a172
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-12-30 05:03:45 +01:00
Mithra Pattison
c13a13c486 Adding hasAudio and hasVideo properties to QML MediaPlayer
Adding hasAudio and hasVideo to MediaPlayer QML object to allow users
to determine whether the current media has audio and/or video
streams. Also adding notifies for when these properties change.

Change-Id: Ife7606e148f0c0ad558b4019c68c70973c199c08
Reviewed-by: Sergey Dubitskiy
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-12-29 04:54:38 +01:00
Angus Cummings
b094a91c9d Added Video.qml to QtMultimedia, Video component
Change-Id: I0f5707a7cae931988aaddced23ad157105d0643b
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-12-23 08:10:51 +01:00
Michael Goddard
973fb0680d Fix namespace compilation.
By removing unnamespaced forward decls.

Change-Id: Icccb34092ef7451d29f52db08811a2152c50e4b8
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2011-12-22 07:23:35 +01:00
Michael Goddard
2307825461 Fix some of the effects in qmlvideofx
* TiltShift was sometimes applying the effect in the wrong place.
* Blur had some QML properties duplicated
* Blur kernel wasn't quite summing to 1, and was applying opacity twice
* The target width for the second pass was incorrect, so it was blending
darkness, resulting in a dreary image.

Change-Id: Ib8ba93d979c597cf4d225b3d24d26a22d0cdffc2
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2011-12-22 07:23:32 +01:00
Michael Goddard
8af2548473 Disable some build time messages.
Change-Id: I5a46b36c72f4307471cfe77f055706539a77049c
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2011-12-22 07:23:29 +01:00
Michael Goddard
21389bb39e Enable the new examples.
Change-Id: I6078090d706c633cf0e85c74495d092f2d653127
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2011-12-22 07:23:27 +01:00
Gareth Stockwell
9092b1ae46 Express qmlvideofx effect parameters declaratively
Each effect item now exposes a ListModel property which describes the
set of user-controllable parameters.  This model is used by the
ParameterPanel component to generate a ListView whose delegate displays
the parameter name and a slider.

Change-Id: Ib26877fe434d8b746ef621e0b4adbcbe1ed9aaa8
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-12-22 02:29:18 +01:00
Gareth Stockwell
febe398400 Add qmlvideo and qmlvideofx examples
Based on code imported from master branch of QtMobility repo,
ported to Qt Quick 2.

Task-number: QTBUG-23118
Change-Id: Ifd297de0e595c675ff1a8e3218d91b03629295b9
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-12-22 02:29:16 +01:00
Mithra Pattison
f33731fe5a Fix readyChanged signal emit in gstreamervideorenderer
Modified handling of source update in gstreamervideorenderer as
the existing logic meant that it would never emit the readyChanged
signal.

Change-Id: I0a1488cfc151388fe0145d231001e502e9f45f0e
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
2011-12-21 07:36:27 +01:00
Michael Goddard
3d7dff4f61 Fix a compiler warning.
Change-Id: Ie53ebaecc14a5bd2baa609b7cae6f0ee59aa0fd2
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2011-12-21 03:56:55 +01:00
Jonas Rabbe
4f3294930a Fix X11 and QPA compilation problems
The X11 buffer pool was using outdated APIs, and as the 'qpa'
configuration value is being removed, it caused the X11 code
to be pulled in, and therefore cause compilation failures.

Change-Id: I5fdaed854c6525716fccca44b5fbd0b850880cb9
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-12-13 01:22:28 +01:00
Michael Goddard
9d526fca67 Remove the module prefix from a number of includes.
Since I get build failures due to other changes in lower modules.

Change-Id: Iac6a814071c019de25db52daf941185337fad14a
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-12-09 07:06:19 +01:00
Dmytro Poplavskiy
47ef58967b Registered CameraFlash qml type
Change-Id: I0d05006dcfd690b2246bc0ccfea468168b207333
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-12-08 21:27:06 +01:00
dakovaci
5c099a7e40 SoundEffects System Tests added
Added some soundeffects systems test to the audio systems test

Change-Id: I9f9392a9bee50c11d0ec9d32490b79241e49014a
Reviewed-by: Natalia Shubina <natalia.shubina@nokia.com>
2011-12-07 05:03:14 +01:00
dakovaci
b470714d19 Edited the Camera systemtest
Just some small editing

Change-Id: I918a259570ef105047015dccfbf27c1be6e5a513
Reviewed-by: Natalia Shubina <natalia.shubina@nokia.com>
2011-12-07 02:22:27 +01:00
Jason McDonald
3effd6bc12 Remove unused QTRY_WAIT macros.
Change-Id: I8484c19d0458d9ec9a3a621fa0b866258e8212c3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-06 08:40:31 +01:00
Jason McDonald
0811215f40 Remove duplicates of QTRY_VERIFY and QTRY_COMPARE.
These macros are now provided by testlib via the QtTest/QtTest header.

Change-Id: I6b499395888268aab315d63404e2b0eed8688615
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-06 08:40:25 +01:00
Friedemann Kleint
090e3efaeb QtMultiMedia: Fix warnings about missing return values.
In QDebug operator<< for enumerations.

Change-Id: I52309356f05a9520b7472a673450a224d7fa71d3
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-12-06 01:04:50 +01:00
Friedemann Kleint
a5d2b2ed60 QtMultimedia: Fix warnings about declarative/quick.
Change-Id: Ic9323b222641e41dae05cb4b0dccb6531e845676
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-12-05 14:44:19 +01:00
Jason McDonald
3171081d43 Cleanup multimedia unit tests.
Use QTEST_MAIN or QTEST_GUILESS_MAIN instead of equivalent custom main()
functions.  Also collapse each test into a single source file, in line
with most other autotests.

Change-Id: I38c7b6a9eb0ff1c9b8ac44de7d5f40d6ac6c46ea
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-12-05 02:32:37 +01:00
dakovaci
4c834365c6 Add playlist test
Added some playlist tests and edit some audio

Change-Id: I936ef4772be9aebe5baf8f755cedadc93107f9e4
Reviewed-by: Natalia Shubina <natalia.shubina@nokia.com>
2011-12-02 04:46:13 +01:00
Dmytro Poplavskiy
0034b177e2 Implemented QDeclarativeCameraCapture::setMetadata
QMetaDataWriterControl is used if it's available.

Change-Id: I18fd36c411b6d3c397ff22ebfea9b2c0e878cdeb
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2011-12-01 05:41:29 +01:00
Dmytro Poplavskiy
3319639a6f Allow nested read only maps of QVideoFrame.
It's useful when video frame is accessed from multiple places
like display and encoding.

Change-Id: I8af175c780783216d8b7717cdf0744ad9bc95348
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-11-28 11:56:42 +01:00
Michael Goddard
be7cc17cbf Add orientation support to VideoOutput.
Just uses an integer to represent the degrees rotation from standard.
Only supports multiples of 90 - other rotation can be done with
standard QML.

Change-Id: Id4013169c5d9da473b6e5be94ba341da21c2f2a3
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2011-11-25 08:30:55 +01:00
Toby Tomkins
581564c990 Fixed QtMultimedia core namespace compilation.
Change-Id: Ie276a7766bd26f3e49b2bc9c1a28ec96f1e3e4b0
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-11-25 06:52:21 +01:00
Dmytro Poplavskiy
b05819f939 Updated I420 video node to be consistent with RGB node implementation.
Don't keep the frame after it was uploaded to texture;
Upload frame data during rendering (in material shader updateState)
instead of updatePaintNode().

Change-Id: Ia6a4063bfa02d4d20f75735649fe4f777cf50494
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2011-11-24 06:41:47 +01:00
Michael Goddard
9bb50446e3 QAudioDeviceInfo is actually an integration test.
It should be separated at some point.

Change-Id: I03adde303eed558d52e06f0afa673252e54c2182
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2011-11-24 05:06:44 +01:00
Michael Goddard
0c7a747663 If we fail to connect to pulse, don't enumerate sinks or sources.
Otherwise the pulse client library dislikes having methods called
with a null context.

Change-Id: I96629065b7a0e36e0d10402526cb167e65458e27
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2011-11-24 05:06:42 +01:00
Ling Hu
d2a4f632cd Add testDestroyWhileRestartPlaying for qsoundeffect
This covers the potential crash reported by qfeedbackmmk test.

Change-Id: Ib533e80b25c4c7fb291527d62445aaa40960baa0
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-11-23 12:49:52 +01:00
Dmytro Poplavskiy
290523bc4c VideoOutput: release video frames when the video surface is stopped.
It's necessary to release video frames during media pipeline shutdown
or reconfiguration.

Change-Id: I386ad4d173b8731f257ec9272ef8c46a27769bd0
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-11-22 05:27:48 +01:00
Ling Hu
0e021ea4d1 Fix SoundEffect(pulseaudio) crash in qfeedbackmmk auto test
Task-Number: QTBUG-22779

Some pulseaudio callback may happen after SoundEffect was deleted,
thus the userdata(SoundEffect point) we passed previously may
result in potential crash with QMetaObject::invokeMethod to queue some event.

To solve this problem, the release mehtod is added to SoundEffectPrivate,
and instead of calling d->deleteLater in SoundEffect::dtor,
 d->release is called. So SoundEffectPrivate will no when it is going to
be deleted soon rather than handle everything in SoundEffectPrivate::dtor
which may be too late.

class RefObject is also added to be able to track the SoundEffectPrivate
status by pulseaduio callbacks. I thought this could be avoided by checking
the connection state of pulse stream. However, that doesn't work as expected,
stream state remains Ready when checked in callbacks even after disconnect
stream has been called. So RefObject is used instead and its lifecycle is
managed by an internal reference count.

When release is invoked,
m_ref->onDeleted is called first, this will mark SoundEffectPrivate as dead.
and then unloadPulseStream is called.
After those two invocations, we can be asured that:
1. if some pulse callbacks has been called without knowing
 SoundEffectPrivate dead, the queued invocation on SoundEffectPrivate
would be safe, since SoundEffectPrivate::deleteLater would
 be called after them.

2. Since on pulse callbacks would be executed when unloadPulseStream is called,
then at this moment if some pulse callbacks is called again, it would certainly
knows that SoundEffectPrivate is marked as dead and would not queue and
event on SoundEffectPrivate.

Now, the deleteLater can be safely called.

Change-Id: I807f29cddb677d1f4bc078fd306ed0d83d6f7dc4
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2011-11-21 10:01:11 +01:00
Toby Tomkins
cc61a0a8c7 Fixed qtmultimedia imports -qtnamespace issues.
Change-Id: Ie7896faf92b3cc5fdf2b6dbe885913c2669e6e36
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-21 08:52:42 +01:00
Michael Goddard
f2237b2e66 If the sample hasn't been loaded, don't try and delete things.
Causes entirely reasonable warnings from QCoreApplication::postEvents,
when calling deleteLater on a null pointer.

Change-Id: I5f1fa526b2d57844b9c0d2e634d434e2f7867bdf
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2011-11-18 07:04:35 +01:00
Michael Goddard
b279b5e280 If the sample hasn't been loaded, don't try and delete things.
Causes entirely reasonable warnings from QCoreApplication::postEvents,
when calling deleteLater on a null pointer.

Change-Id: I5f1fa526b2d57844b9c0d2e634d434e2f7867bdf
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2011-11-18 05:54:06 +01:00