Commit Graph

369 Commits

Author SHA1 Message Date
Gareth Stockwell
c1ec175b24 Tidy up frame rate display in video examples
* Use a Column element to position QML and video frame rate counters.
* When using small-screen layouts, hide frame rate counters when dialogs
  or menus are displayed.
* Do not display instantaneous frame rate.  If changes in this rate
  trigger a repaint, then the rate itself is changed.  If the repaint
  occurs in less time than the QElapsedTimer resolution, the displayed
  instantaneous rate is always zero.
* Add a label, so it is clear which is the QML repaint rate, and which
  is the video frame rate.

Change-Id: Ie58ab162ab44bd7f1c4b297eed929b9baa73552c
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-02-08 22:30:49 +01:00
Gareth Stockwell
b6f54c8833 Tidy up file browsing in video examples
* Use QStandardPaths to determine the initial folder displayed when
  the file browser is launched
* Persist folder between file browser invocations

Change-Id: I5b86dd3d304c3f33802f3189716e1d360774198d
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-02-08 22:30:34 +01:00
Michael Goddard
87ec3461c1 Add the audio decoder variant of QMediaPlayer.
Rather than the probe based way of doing it.  Initially private.

Change-Id: I30005f8da22f6451cb9de8eb3f0e193838d48c93
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-02-08 11:36:08 +01:00
Jonas Rabbe
272be4554f Fixed possible dependency problem in the qmake structure
If gstreamer is present, then the gstreamer plugin (and
hence the plugins sub directory) should depend on the
gst tools library.

Change-Id: I6012df02d14731107fc0656089aa27ae61f0ef71
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-02-08 05:59:34 +01:00
Michael Goddard
e241932c97 Remove some more QTest::qWait(10) calls.
Since it seems to have changed slightly recently.  Just use
QTRY_COMPARE instead.

Change-Id: I802c2e26acf5418bb5904fadd2a978a44fd9eb01
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-02-08 04:38:16 +01:00
Jonas Rabbe
6de7c31040 Added loading of video node factories from plugins
This change will allow us to add new video node factories that
can be loaded dynamically at runtime.

The previous video node factories, I420 and RGB have been kept
as static parts of the Qt Multimedia imports, but can be moved
to plugins at a later date.

For plugins to be able to find and use QSGVideoNode, the class
has to be exported.

Change-Id: Idbead9a8ad33619cebe90fcec92eb29cf52ae9bd
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-08 04:38:16 +01:00
Angus Cummings
a94c8a1ac2 API changes to QML element MediaPlayer aka Audio
Changed Video.qml for new API
Removed lowercase enum copies, replaced with calling
	parent (VideoOutput, MediaPlayer) enums
Removed properties playing, paused
Removed signals started, resumed
Added readonly property playbackState
Added signal playing
Added autoPlay property
Fixed unit tests for new API

Added backwards compatibility for QtMultimedia 4

Change-Id: I27c91cd46d91402b8c4c42bb7d4961ad67909aeb
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-02-08 03:48:51 +01:00
Michael Goddard
66b86ba581 Add exports for probe classes.
Oops.

Change-Id: I2273ac6789d2eb1042aa1d4b6ec64dac1904ce55
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-07 13:22:20 +01:00
Dmytro Poplavskiy
d0595cbca4 Updated declarative camera image processing with C++ API changes
Changed ranges and meaning of image adjustments parameters.

Change-Id: I1710bfabc4f216c83df7983a871bffb474cfbcc2
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-07 09:04:23 +01:00
Dmytro Poplavskiy
96aa2e9af7 Updated declarative camera recorder with C++ API changes.
Added key,value parameters to metadataChanged() signal;
Added a separate actualLocation property to desribe the path of
recorded file. It may be different from outputLocation when default
location is used.

Change-Id: I5a4b77833b6458a19ed7e1dcf7e53fc7400cdf21
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-07 06:48:32 +01:00
Dmytro Poplavskiy
00d1e2f65e Expose capture request id in the declarative camera.
It's useful to associate imageCaptured/Saved signals data with
capture requests.

Change-Id: I3e98c4a194403bd338a1b5313d8736b4baf79961
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-02-07 05:01:24 +01:00
Michael Goddard
8b1f11b370 Add some media probing API.
Change-Id: Ib83918f99b699ac3fbc7ede82a392d00d4c18005
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-02-07 05:01:24 +01:00
Dmytro Poplavskiy
6c51d2aadf tst_qmediaplayerbackend: try to load test file from the current dir.
This makes testing easier on other system than test was build.

Change-Id: I75c4d620c8132a7fd298fe735dfdc1bf6f775e08
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-02-07 04:12:55 +01:00
Michael Goddard
3c4dcf00bb Add a QAudioBuffer class.
Prereq for probing or decoding.  The abstract API probably needs
to change.

Change-Id: Ie0bf796c1f581f34bbc0a8af2dffc387c513a330
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-02-06 23:18:56 +01:00
Dmytro Poplavskiy
ee39683e27 Moved QMediaServiceProvider to private header.
It's not intended to be used by applications.

Change-Id: I2acc26180ebb5c2419438169827f39aaf4578389
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-06 13:57:42 +01:00
Lev Zelenskiy
39c96db2b3 Changes to QMediaPlayer GStreamer backend to allow setPosition before pause
Do not display prerolled frames in stopped state.
Instead store prerolled frame and display it only after switching to
pause or playback state.
Added new unit test with a sample video file to check this functionality.

Change-Id: I3fd159a199b65ca10fdf9843af5675c5ae9dad05
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-06 08:56:34 +01:00
Lev Zelenskiy
7415e4c879 Gst player backend: fixed prerolled frames rendering
Don't use queued render request if it's called from
the object own thread.

Change-Id: I61ac11f5cf68edf82d0681c95123e804869d0647
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-02-06 08:56:29 +01:00
Michael Goddard
c0fd63d143 Documentation tweaks.
Mostly move widgets classes into the QtMultimediaWidgets module, but
also mark a few mostly internal playlist classes as \internal.  A few other
tweaks.

Change-Id: If0e376410bf2187cafb24f583108c6beb7b910a9
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-02-06 07:45:05 +01:00
Lev Zelenskiy
51ca5582c2 QMediaPlayer::setPosition: do not check isSeekable and do not bound by duration
To allow setPosition to be called in stopped state we no longer check
if the player is in seekable state and allow position to be greater than
duration.
Unit test has been updated accordingly.

Change-Id: I29447ffe797a7cc3dcc80d20b2527e9eda493ab6
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-02-06 06:33:47 +01:00
Michael Goddard
0d9a5cc5b3 Fix some warnings.
Change-Id: I2ea7f6f016d34490a41e4c9449cbc92bd040de49
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-02-06 06:32:03 +01:00
Ling Hu
809bbc35c6 Add AudioEngine with new implementation
Change-Id: I5eebe662ecbce9814ed3e763db56df9be737d11f
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-06 05:35:28 +01:00
Jonas Rabbe
262f397e3e Changed plugin loader to try unloading plugin if unused
Deleting the root component can delete plugins already
used elsewhere in the application or library.

Change-Id: Ibd0afb61cf0e118eb13f9782252c1fec554ea901
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-06 05:35:22 +01:00
Dmytro Poplavskiy
0924cff7b3 Removed QFlags from declarative camera properties.
It doesn't work, while even without QFlags
camera.captureMode = Camera.CaptureVideo + Camera.CaptureStillImage
works correctly.

Change-Id: I00727ad37cbf33e0c6d557a9da08160d6ea4bdc9
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-06 05:35:15 +01:00
Dmytro Poplavskiy
fd3a3a7292 Added metaDataChanged(key,value) signal to metadata controls.
It may be more efficient and convenient for application to use this
signal instead of metaDataChanged().

metaDataChanged() signal is emitted for compatibility,
backends should emit both signals.

Signal added QMetadataReader/WritterControl,
QMediaObject and QMediaRecorder.

Change-Id: I5ca34a40e64b22034e6fde8cd7f9735cc3f72c68
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-06 05:35:11 +01:00
Dmytro Poplavskiy
fb73a56574 Made camera unit tests more stable
Replaced qWait() with QTRY_COMPARE()

Change-Id: I951bd8ca1eaaf8d0fd7308a90f82afcdb0475819
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-06 05:35:06 +01:00
Michael Goddard
78ffd1bc18 Remove QMediaImageViewer (SC break).
This class has turned out to be not very useful at this point in time.

Change-Id: Ic07132bdcd01a912a6dd1160c867979fd1307b6a
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-02-03 03:21:43 +01:00
Peter Yard
4bbe267f30 Fix up various doc issues.
Change-Id: I43a8b1b982c4af093bd0bb14573f2299ae28ae94
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-02 14:28:55 +01:00
Dmytro Poplavskiy
d292f4a7d3 Changed QCameraFocus::focusMode type to QFlags based FocusModes
It was intended to be QFlags based from the start.

Change-Id: I0919b3440eb18e84fc596fb894f18a53e5ff1da0
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-02 03:34:13 +01:00
Dmytro Poplavskiy
6a88794db4 QCameraImageProcessingControl API fixes
Moved white balance preset from the separate methods to
QCameraImageProcessingControl::ProcessingParameter;

Separated absolute contrast/saturation/sharpening/denoising
settings with adjustments to backend decided values,
with QCameraImageProcessing using adjustments versions.

Changed type of parameters from int to qreal
with [0..1] range for absolute values and [-1..1] for adjustments.

Change-Id: I85c8781c046be6dd45bcf626c25908e1ce5f6bcb
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-02 02:37:33 +01:00
Michael Goddard
80eaaa2152 Add a file documenting what has changed from previous versions of MM.
Change-Id: Ia178ba9f159de29f358ad0a62789d8d73a55c0d1
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-02-01 09:03:54 +01:00
Michael Goddard
74de2aa4ef Rename multimediaoverview.qdoc to multimedia.qdoc.
For more consistency across projects.

Change-Id: I686c8af01b0b7c574d3c680167ee6a98a0a4efad
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-01 08:10:50 +01:00
Dmytro Poplavskiy
ba37f73d44 Added QMediaRecorder::actualLocation property
To report the actual location file was written.

Change-Id: Ibb56a720a258a1e5cedceaf0f9bcea73fb93bc96
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-01 08:10:33 +01:00
Dmytro Poplavskiy
a26bf6c8b6 Added more encoding settings to declarative camera recorder.
Change-Id: If2ec0297a2db5fedaf27c009fb8d55ccf4254c21
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-01 08:10:28 +01:00
Dmytro Poplavskiy
a22a0195f1 Split QMediaRecorder::setEncodingSettings to separate setters.
It's easier to change only the necessary part of encoding settings.
The settings are applied during the next event loop or before recording
starts.

Change-Id: Ia2b5c93826a302212aa7f79a0c75e4cbaaf1dd7a
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-02-01 08:10:20 +01:00
Jonas Rabbe
9d3102efe2 Added antennaConnected property to QRadioTuner and radio qml element
Change-Id: I5af8487277e0444629c710c6a0a4e890a8d35c6f
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-30 21:32:18 +01:00
Jason McDonald
5e801e2793 Remove "All rights reserved" line from license headers.
As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.

Change-Id: I20e5215108c6ebd5f8474fed5c3665118e4791e6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-30 07:08:05 +01:00
Dmytro Poplavskiy
155c48b97e Moved zoom related properties out of QCameraFocusControl
Change-Id: I16f9b80ebbacc0b325530e81c291dc030763b65e
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-27 08:26:47 +01:00
Michael Goddard
817fb006c7 Add a viewfinder resolution control for camera.
For attempting to set the resolution.

Change-Id: I9f3b189b90fee95bf6430e9a74a6599ebcc38697
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-01-27 07:35:12 +01:00
Michael Goddard
88431b2841 Fix some surface assignment errors.
On destruction and changing sources, make sure we don't clobber the
surface property if it's been changed.

Change-Id: I3080b98a547911543a391c8bc040792d260782fd
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-01-27 07:35:09 +01:00
Michael Goddard
bad94a5329 Add a rendered and content rectangle properties to VideoOutput QML.
So you can align controls with an edge of the rendered area.  There's
also some convenience functions for mapping source to and from
destination coordinates. Also tweaked the updateGeometry function to
bail out if no input parameters have changed, rather than doing some
more boring maths.

Added a unit test for a lot of the class, too.

Change-Id: I943bb45e4e56356247d5d6deb5d446222edcb7ca
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-01-27 07:35:06 +01:00
Michael Goddard
3b00730eca Add a volume (gain) property to QAudioInput.
Only implemented for PulseAudio so far, but the API does explain that
it's optional.

Change-Id: I4543a1c81d810fe92bb08f1ed13f3a3534a371e4
Reviewed-by: Ling Hu <ling.hu@nokia.com>
2012-01-25 07:18:48 +01:00
Alan Alpert
8aef60c1cf Update in line with recent QWindow API change
Change-Id: Id495215c7861f05849ffbfd1a0e66af9990a1365
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-25 06:15:06 +01:00
Dmytro Poplavskiy
2db9b4b1c8 QCameraExposure API refactoring
QCameraExposureControl:
 Separated requested from actual exposure values.
 Removed ParameterFlags, it's confusing and seldom used.
 Moved ExposureMode and MeteringMode to parameters.

QCameraExposure:
 Added requestedAperture/ShutterSpeed/Iso getters

Change-Id: I408586d85e6c9de0c8a711c32b3c90ea46052270
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-25 06:14:59 +01:00
Michael Goddard
a9d78fbec9 Fix some static analysis defects.
A few silly errors, a few unlikely errors, a few changes that should
not have resulted in a problem but makes the code clearer.

Change-Id: Id2c82e9317d53822e4da13c94dec9595ea33b07a
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-01-25 06:14:56 +01:00
Michael Goddard
45659bd903 Add a feedback control for Camera.
To control capture sounds etc.

Change-Id: I4db63587be9c74f78c93081d9d46477e34f4a042
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-01-25 06:14:54 +01:00
Ling Hu
ebeea66e82 Fix header changes for wmf
Change-Id: I9d06dd9a39f26851589b1c1f259db8de2ee992a0
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-24 09:13:11 +01:00
Dmytro Poplavskiy
a78a95ccd4 Removed QMediaServiceProvider parameter from media objects constructors.
QMediaServiceProvider should be removed from the public API,
to provide media objects with a custom media service.

A protected QMediaPlayer/QCamera/QRadioTuner/etc constructor
with QMediaService* parameter is a cleaner and more
flexible solution.

Change-Id: I335cce4bbebe0e548c3df338f206e7be7c93c3dd
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2012-01-24 09:11:07 +01:00
Ling Hu
adb2bd2cd4 Disable wmf for now
Change-Id: I4d28741a6546dfafc5c60c7ccdc34d814276b518
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-24 08:22:13 +01:00
Dmytro Poplavskiy
08dc13ce90 Disabled CameraBin2 based camera backend.
It's not currently tested enough to be enabled.

Change-Id: I3c8eb7a81af982b6c98b733755d19c78f2f1c5ed
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-23 08:15:28 +01:00
Michael Goddard
01e7cb9950 Implement QAudioDeviceInfo operator==/!=
Compares some of the useful parts, but perhaps should be made more
tolerant.

Also refactored the auto test to properly skip if there are no
(output) devices, rather than manually skip.

Task-number: QTBUG-13723
Change-Id: I3b83f87a440a83f4237fa119a23009bc99e7626a
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
2012-01-23 07:30:16 +01:00