Commit Graph

699 Commits

Author SHA1 Message Date
Dmytro Poplavskiy
b51e1bfa66 Replaced camera viewfinder resolution control with settings control
It allows to specify a number of camera fiewfinder parameters
including frame rate, resolution and pixel format.

It also allows to extend the list of parameters without breaking source
or binary compatibility.

Change-Id: Ibea85a968ab7ee7b8d1ae34c7fcbac8f5586f53f
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
2012-05-22 03:42:05 +02:00
Angus Cummings
f11c5c83a0 Reordering audio overview doc
Trying to put more common use cases earlier in the
list of implementation details.

Change-Id: I11195d5d2f7846dec3342d43fe3917fb13374daa
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-21 21:19:49 +02:00
Johannes Zellner
2564dbec68 Fix compilation when appsrc is not available.
Change-Id: I96c9aad94b5eb0734854bc7cf0126cad6841c0cd
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
2012-05-21 20:28:56 +02:00
Dmytro Poplavskiy
63db99a8ee Added custom parameters to Audio/Video/ImageEncodingSettings
This allows to specify more advanced and system/codec specific settings

Change-Id: Ia0a2e94eaf56df285a219018e0beab895a2e7c2a
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-18 05:28:35 +02:00
Dmytro Poplavskiy
f965f683d0 Added missing QDeclarativeCamera::CaptureViewfinder enum value
Change-Id: I75844e3a943a76649d1b51f0c845a4bf8b200a8e
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-18 05:28:32 +02:00
Dmytro Poplavskiy
9fb8bdd509 Fixed typo in QCamera::Status documentation
Change-Id: I8ee9db0e91eceaa20a46713370a9cbd03ead6444
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-18 05:28:29 +02:00
Dmytro Poplavskiy
3b88e105f8 QML VideoOutput: don't keep video frames for more than necessary
The frame can be released as soon as it pushed to video node.

Change-Id: Ib2621cc2a001629e722bf15b6e1ca09323170870
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-16 07:07:28 +02:00
Dmytro Poplavskiy
be6d80e57a Expose camera status to QML Camera element
It's exposed as Camera.cameraStatus property.

Change-Id: Id3b477266d3a666b7a2a61cd4579f0e3f873d3b8
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-16 07:07:28 +02:00
Angus Cummings
b96ca81108 Very minor C++ doc changes
Reordering some enum's so values are listed ascending
Replace 'The' with 'the' in some briefs

Change-Id: Ibc5042389687598ddaaf11e72acaa688b85fd4cf
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-16 06:14:30 +02:00
Angus Cummings
9e6d03584a Minor doc fixes for QML
renaming QML element to QML type
removing some \fn tags that were making the docs not build
some rewording
some new signal docs

Change-Id: I9b350dad1780276959aef4105e53b91082a6083e
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-16 05:21:25 +02:00
Dmytro Poplavskiy
fdb5c419c4 Gst backend: allow rendering other video buffers than allocated
Moved checking the buffer type to the buffer pool
instead of comparing the buffer type in QVideoSurfaceGstSink.

Some gstreamer elements may push other buffer instance than
provided by sink but with the same data pointer.

Change-Id: Iab3bf4da2d5eeb5d2a9375aa609a89515b067ce3
Reviewed-by: Lev Zelenskiy <lev.zelenskiy@nokia.com>
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-14 08:37:45 +02:00
Dmytro Poplavskiy
08d45baac2 Fixed QML Camera errors reporting
Added missing connection to QCamera::error() signal
Added Camera.errorCode property

Change-Id: Ie0dd71d760b4b5b79b2aefaba97bc383ef2a9750
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-14 08:37:41 +02:00
Dmytro Poplavskiy
112820ef46 Improved QDeclarativeCameraRecorder errors reporting
Added QDeclarativeCameraRecorder::Error enum to allow
specify error codes as CameraRecorder.FormatError.

Added QDeclarativeCameraRecorder::errorCode property.

Change-Id: Iac5522c3110591493b98e59db18dbfc2d3b7496f
Reviewed-by: Lev Zelenskiy <lev.zelenskiy@nokia.com>
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-14 08:37:30 +02:00
Dmytro Poplavskiy
25d95a0e63 Added QMediaRecorder::OutOfSpaceError error code
Change-Id: Ib09208a84f83f00992878f881ee2120932779a16
Reviewed-by: Lev Zelenskiy <lev.zelenskiy@nokia.com>
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-14 08:37:24 +02:00
Lev Zelenskiy
8ce488249e GStreamer player session: remove code for old playbin.
We only support 'playbin2'.

Change-Id: Ibe35f71377862cb83742c2f9b606c5e2fdd5199d
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-14 05:37:09 +02:00
Lev Zelenskiy
db9a6de400 QAudioOutput: low-latency related changes.
- Decrease timer period to 10ms;
- Set PulseAudio buffer size if specified by the user;
- Set PulseAudio buffer size to 40ms if not specified;
- Always request 1 chunk of data at a time in pull mode;

Change-Id: If95c097c67c3342f733bde9e699518741d7ef991
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-14 05:34:42 +02:00
Kent Hansen
68680fc661 Don't use QtDeclarative compat module
Use QtQml instead.

Change-Id: I7618ba89a2ed288f7043ae402ac091a924598f03
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-14 05:34:32 +02:00
Lev Zelenskiy
da12ea2e80 Update duration information after switching to PLAYING state.
For rtsp streams duration information might not be available
until playback starts.

Change-Id: Id8829408a4bd2c0fc6a89f2d059d23a5a95d940e
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-11 07:10:27 +02:00
Lev Zelenskiy
26e4c8cff7 When resource is lost pause the pipeline instead of stopping it.
Change-Id: Iccbf2f820ec6373d5853accc064dad659858514c
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-11 07:09:49 +02:00
Angus Cummings
3339324b0e Renaming audioengine overview to Positional Audio
Change-Id: I1688b5e76f7b3a8eecd5fcf060717b49f7a36f4e
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-11 07:09:34 +02:00
Lev Zelenskiy
3d0dc61b9f QGStreamerPlayerSession: unref pads after using them.
Change-Id: I3eec73eca5c2da3c449f362da8639a6dfb52a9e9
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-11 04:42:39 +02:00
Lev Zelenskiy
4bb755598b QGstreamerMetaDataProvider: fix keys not mapped properly.
Add a key which is mapped against the QGstreamerMetaDataKeyLookup,
not the original Gstreamer key.

Change-Id: I2e20b102e97b9a3a7909ff925f195cd0bdff1775
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-11 04:40:55 +02:00
Dmytro Poplavskiy
69c1ecbffd Gst played: removed GST_SEEK_FLAG_ACCURATE flag
Forcing accurate seeking may be very slow for some files,
it's not intended to be used with media players.

Change-Id: I9fe759f6effa447a800aeea321cc46617c64866f
Reviewed-by: Lev Zelenskiy <lev.zelenskiy@nokia.com>
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-05-10 05:44:46 +02:00
Mithra Pattison
48e4758a46 Change timeout on qcamera capture tests to QTRY_VERIFY
Previous timeout was causing sporadic test failures

Change-Id: I9b30c0245e16838fafce6a4977d75aaddb6f5fdd
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-05-09 08:37:02 +02:00
Oswald Buddenhagen
79ba57afb9 delete unused file
Change-Id: I15ad0f30859a3133993f0a75ed0d09bb5ef9cdf5
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
2012-05-09 01:27:47 +02:00
Oswald Buddenhagen
bd5afd94bb fix project file
"console" is CONFIG, not QT.
also, it doesn't look too convincing if an example uses private headers
...

Change-Id: I5bc128c6268901c9842f8b842d6344bd32fc7d1e
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
2012-05-09 01:27:44 +02:00
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