Commit Graph

1341 Commits

Author SHA1 Message Date
Frederik Gladhorn
074bd6ab37 Merge remote-tracking branch 'origin/5.3' into dev
Change-Id: I38ebcb3da0e4d2acc9e7108c9579ea98323864e0
2014-07-10 10:14:36 +02:00
Andrew den Exter
4ba4f1a51d Implement customFocusPoint in camerabin backend.
Send a regions-of-interest event containing a rectangle surrounding the
focus point to the camera source when the camera's focusPointMode
is QCameraFocus::CustomFocusPoint.  Reset the regions-of-interest if the
focusPointMode changes to any other value.

[ChangeLog][GStreamer] Implement customFocusPoint in camerabin backend.

Change-Id: If75405733b18d476dff5467abae3f08271caf06a
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-10 01:39:22 +02:00
Andrew den Exter
6347605341 Add QML accessors for camera viewfinder properties.
[ChangeLog] Added QML accessors for camera viewfinder properties.

Change-Id: I05a2a6c552aa8606e8dc31a11d1cfdedf66c554f
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-09 01:31:04 +02:00
Yoann Lopes
8da61153c9 Fix documentation for QML Camera's cameraStateChanged signal.
The signal name is 'cameraStateChanged' but was documented as
'stateChanged'.

Change-Id: I80279613b55105a925acafc21f67c4a0917906af
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-07-08 17:40:08 +02:00
Yoann Lopes
382d4c873a Fix AudioOutput example when no audio devices are available.
Don't try to generate audio data with an invalid QAudioFormat, which
can happen when no audio devices are available.

Change-Id: I4de82dbf64def55fee21cf63ef99888a8084bd95
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-07-08 13:49:56 +02:00
Andrew den Exter
1a3ae99441 Support per-plane strides and data offsets in QVideoFrame.
Since just adding a new virtual isn't binary compatible add a new derivative
type with a virtual member and connect it up through a virtual in the private
class.

[ChangeLog] Support for per-plane strides and data offsets in QVideoFrame.

Task-number: QTBUG-38345
Change-Id: I1974c2b0b454d130e17971ce549031259d61f9cd
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-08 13:20:54 +02:00
Andrew den Exter
ab379c3da2 Add meta-data accessors to the QML Camera type.
Add write accessors to the properties of QDeclarativeMediaMetaData as
well as additional properties for previously unmapped image keys and
add a metaData property exposing this to QDeclarativeCamera.

[ChangeLog] New metaData property for the QML Camera type.

Change-Id: I4456b7b6120842f7ad9a1b175e42b9fb332adf13
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-07 13:49:09 +02:00
Thiago Macieira
4d35f66acf Fix change-of-sign warning
qgstappsrc.cpp(54): warning #68: integer conversion resulted in a change of sign

Change-Id: I0bf8c93cb5e27114a8857dc650ac506152607491
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-07 13:46:35 +02:00
Jerome Pasion
6048450ed7 Doc: Removing url variable from qdocconf file.
-url inherited from the url variable set in qtbase/doc/global

Change-Id: I5761a583cc1242f31f1beece7da2236c47e3a9bd
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-07 11:46:41 +02:00
Dyami Caliri
a63da4b593 QAlsaAudioOutput remove async callback.
The async callback mechanism in ALSA is prone to deadlock.
There was already a timer fallback mechanism that appears to be
sufficient.

Task-number: QTBUG-39677
Change-Id: I44b59e6b16eea1c9c4eeb6967335ce4f468cf3c4
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-04 16:14:48 +02:00
Dyami Caliri
a391ad4763 QAlsaAudioInput remove unused async_handler member.
The member 'ahandler' was not used and will not be used. Removing to
avoid confusion.

Change-Id: I35f3659a650f109c564c6308573a211f324e5411
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-04 16:14:20 +02:00
Yoann Lopes
fbd57c983d GStreamer: correctly handle URLs from QMediaRecorder::setOutputLocation
Task-number: QTBUG-39949
Change-Id: Idf575b126bd3531655c8abda55c9e04149a4fb85
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-07-03 15:49:53 +02:00
Yoann Lopes
a7f924186c GStreamer: fix looping a media when it's loaded from qrc.
When playing a media for the second time, the backend resets the
the media by calling setMedia() with the same value.
The problem is that setMedia() clears the previous media, which is
a QFile in this case and is the one we are trying to set again...
The QFile was deleted, causing the current media to be a dangling
pointer.

Change-Id: I6854b40212fd084d1e31e756a040a02ad103b7ba
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-07-03 15:45:46 +02:00
Nico Vertriest
c9b4793350 Doc: link errors
Task-number: QTBUG-34749
Change-Id: I1d107a8700e03ac550fd6611d80a985a36558b22
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-01 13:10:14 +02:00
Kai Koehne
124b6a4ee6 Fix compilation with -no-opengl
Change-Id: Ib8f39dcea58018f076d6a3fa733303958c707f1a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-01 10:25:51 +02:00
Yoann Lopes
c8b88cd027 Android: fix crash when stopping the camera while a recording is active
When unloading the camera, any active recording is automatically
stopped, which in turn triggers the viewfinder to be restarted...
We don't try anymore to restart the viewfinder after stopping recording
unless the camera is still active.

Change-Id: I77e4e3fc8d7116ac660d8bb23f6c400ebed4ffed
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-30 16:03:26 +02:00
Yoann Lopes
23d7bf7ac8 Android: fix registering recorded videos with the Android media scanner
Change-Id: I6dfc4e13b8a0bccb1bcfead728f7e1ddb7b58bb4
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-30 16:02:22 +02:00
Yoann Lopes
99ce312731 Android: correctly update camera focus zones.
When setting a null custom focus point, we were correctly resetting
the focus zones but we were not emitting the focusZonesChanged signal,
causing the QML Camera to not update its focus zones.

Change-Id: I59940c4cd2979fa08dc26566dc0f6d19e503f64f
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-30 14:48:08 +02:00
Frederik Gladhorn
dfd00bca7e Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
	.qmake.conf

Change-Id: Ic2b4c2bf7b985c97d75d70980413da4f569f207a
2014-06-26 17:25:12 +02:00
Andrew den Exter
310402c6c1 Fix stuttering with RTSP streams.
Set the rtspsrc buffer-mode to 'slave' which is the default in
gstreamer 1.0 and doesn't cause the stuttering apparent with
the default buffer mode.

Change-Id: I4241fbe638c176ad93f441a3f76a1041ef1cb6bb
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-06-26 01:45:52 +02:00
Frederik Gladhorn
c46aa62c65 Merge remote-tracking branch 'origin/5.3.1' into 5.3
Change-Id: I6abb3fad4e03323919a9ee4dad62082784ac6160
2014-06-25 10:26:32 +02:00
Yoann Lopes
eb75bf8e3b Enable both PulseAudio and Alsa plugins on Linux.
It was previously only one or the other, and all Qt packages for linux
were only including the PulseAudio backend.
Now, both will be included; if PulseAudio is available it will be used
by default, otherwise it will fall back to Alsa.

Change-Id: I393c7728ec9741b1b58681608c184cd1b92126b1
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-06-19 15:34:06 +02:00
Yoann Lopes
140c4a9eed Add changelog for 5.3.1.
Change-Id: I197a9c6a0fc623bdb3eafaa5fe970cb6a44546b4
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-18 19:03:30 +02:00
Oswald Buddenhagen
1d73904b25 Bump version
Change-Id: I8af8aab3257d70270318a152a73380aebdd41a41
2014-06-18 00:36:14 +02:00
Yoann Lopes
34ab2b5369 Improved audiooutput and audioinput examples.
Always show the default audio device first in the drop-down box.

Change-Id: Icbafa9e316fd330fe7a9801a8e2efef6f20ff054
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-16 13:43:05 +02:00
Sergio Ahumada
d691f5ca2b Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
	.qmake.conf

Change-Id: Iecd8d7b94e52a8981526b12cffa40e99870ba62f
2014-06-14 21:59:24 +02:00
Topi Reinio
d415d3256d Doc: Fix qmlclass selector used in documentation config
A recent change (46959875) in qdoc raised QML types from
subnodes to top-level nodes. This change modifies the
documentation configuration file(s) accordingly.

Change-Id: Ie7d09a6d076a044133a8324fa5a5e28c32e7b7a6
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-06-11 19:57:44 +02:00
Sergio Ahumada
150ff6662d Merge remote-tracking branch 'origin/stable' into 5.3
Change-Id: I689554fb6e47b8183013de271a776909a05398dc
2014-06-11 10:05:00 +02:00
Yoann Lopes
b99a4b3025 Make multimedia QML types available for the 5.3 import version.
At least one type needs to be registered with the 5.3 version number to
make it known to the QML engine.

Change-Id: Iacfe62650b4194fbb89135fef7cb148309227ce2
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
2014-06-10 15:02:24 +02:00
Yoann Lopes
eadf1c8c41 Fix static initialization order fiasco in some plugins.
Some static variables were initialized using QMediaMetaData
values, which are also statically initialized.

Task-number: QTBUG-39202
Change-Id: Ibedc0a77d96cdfa575aad122c4ec654e6830e1f7
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-06-06 11:12:21 +02:00
Christian Strømme
8a66559e0b Android: Use a file descriptor for all local media files.
Using a fd is more consistent across different Android versions and
also works with files that are in the applications private storage.

Task-number: QTBUG-39346
Change-Id: I462822459d12d7842d15f1cb7caafc75c18fe32c
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-06-05 23:25:23 +02:00
Yoann Lopes
d71aaca893 Improve default audio plugin selection.
When no audio plugin is marked as default, use the first plugin
available.

Change-Id: Ide8db0fe55f43c4881c24505c1e2821b0fc176f6
Reviewed-by: Dyami Caliri <dyami@dragonframe.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-05 11:42:16 +02:00
Yoann Lopes
a3a6670172 Android: don't start camera preview until the viewfinder is ready.
If no video output is set for a camera, don't try to start the camera
and report an error.
If the video output is not ready, delay starting until it is.

Change-Id: Id08e31a4e795b71ac036a6532e9499ca5670d790
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-05 11:42:16 +02:00
Yoann Lopes
cf4aba93e4 Android: fix media player's volume.
- Preserve the volume when changing the current media.
- Don't actually set a new volume when the media player is muted.
  Intead, save the value to apply it when setMuted(false) is called.

Change-Id: I829eb280406ea35ff82a0c2638b2d19cf1d90643
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-05 11:42:16 +02:00
Topi Reinio
cb6b4e2079 Doc: Remove comment about preliminary API for Qt 5.0
Task-number: QTBUG-39195
Change-Id: I193321a29d06760e4ad5aa2eaca99d98b2e1f65a
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-06-05 09:48:33 +02:00
Robin Burchell
ae567c3f35 Handle resource requests through singleton.
Many applications have multiple objects dealing with audio, and each
needs to request audio resources from resource policy manager. Resource
policy manager handles audio resources per-manager. Each ResourceSet
instance creates new manager, which causes applications having multiple
audio objects to fight for the audio resources internally, even though
the streams are played from the same process id.

To overcome this in QtMultimedia applications, handle all ResourceSet
operations through singleton. This way one client has only one manager
id registered, and resource acquiring and releasing can be limited to
only when no resources are acquired or all resources are freed. To
reduce unnecessary noise from resource policy plugin to the clients,
keep track of client states and only notify clients which themselves
request for resources etc.

Change-Id: Ifa4488a9f6298a3f601399e9d339f7bd819be757
Done-with: Juho Hämäläinen <juho.hamalainen@tieto.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-06-04 13:58:08 +02:00
Christian Strømme
b9b06defc7 Android: Don't expose java calls in the control classes.
Makes the abstraction more clear.

Change-Id: Ia9a7b0b157e1182158cd26b62775d13f6c5e1727
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-06-04 13:19:40 +02:00
Christian Strømme
1ef3ef6a30 Make it possible to build multimedia for embedded Android
Change-Id: I3400b18379242ea4d1b4f94f5da6b60c64d551e4
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-06-04 13:19:28 +02:00
Christian Strømme
9214742012 Android: Rename the wrapper classes
Change-Id: I2ce15c8475da3186f128ba59b7c58f9b5b0a67e1
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-06-04 13:19:21 +02:00
Yoann Lopes
efa4628e74 Use Q_CONSTRUCTOR_FUNCTION macro to register multimedia meta types.
Task-number: QTBUG-39131
Change-Id: I2493c9e3e6f0065d0441a74ff240d7d91fbe059c
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-05-30 14:47:54 +02:00
Yoann Lopes
5a0e49369d OpenSL: don't try to enqueue new buffers when the buffer queue is full.
It could lead to corrupted sound since we were overwritting buffers
that weren't played yet.

Task-number: QTBUG-39015
Change-Id: I4c015c5383b813955998145d6316acc8c22f19a3
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-05-30 14:47:20 +02:00
Yoann Lopes
69598e22f3 Remove C++11 code in iMX6 video node plugin.
Use Q_FOREACH instead of C++11 range-based For loops.

Task-number: QTBUG-38900
Change-Id: I2b9f8444f2ac3ae71811112244c687cab79753c9
Reviewed-by: Thomas Senyk <thomas.senyk@pelagicore.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-05-30 14:46:42 +02:00
Yoann Lopes
92096afdb4 Android: fix calling start() and stop() on the video surface.
We restart the surface when the frame size changes, though we were
not using the correct function to get the surface's current frame size.
This was causing start() and stop() to be called for every frame.

Change-Id: I8ff4b4852cb7fcc92ac3b1b3ad7bf991d7bddc6b
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-05-30 14:46:13 +02:00
Christian Strømme
7e668fe58f Android: Fix loading from qrc
On Android < 4.1 our temporary file is discarded without checking the
content. With this change we just open the file and pass the fd to the
mediaplayer instead.

Change-Id: I9233822725d8987c572b2d0b598721cee886de80
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-05-21 00:14:15 +02:00
Yoann Lopes
93e73fd8ee DirectShow: remove debug output.
Task-number: QTBUG-38924
Change-Id: Ibc08fd99f6eb10035e4d7da963d4d384012bbdbf
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2014-05-19 14:57:23 +02:00
Yoann Lopes
e9e10b2b1f WMF: fix video frames' viewport.
It was not taken into account at all.

Change-Id: I4ce85aba214cb4d89dcd018b1616a2a38094b5a6
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-05-15 15:12:18 +02:00
Yoann Lopes
235c863db9 Android: fix QMediaPlayer::bufferStatus value.
It was returning the buffering progress for the whole media, which is
not what is expected according to the documentation.
It should return instead how much the playback buffer is filled. This
information is not available on Android so we simply return 100% when
the status is BufferedMedia or BufferingMedia, 0% otherwise.

Change-Id: I9fb55a9317948ba9375291a57bbf100f186382a2
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-05-15 15:12:18 +02:00
Andrew den Exter
c376e13abd Fix QSGVideoNode rendering of frames with stride != width.
Adjust texture coordinates to not render padding at the end of lines,
and better calculate the stride of UV planes.

Task-number: QTBUG-38218
Task-number: QTBUG-30447
Change-Id: I7b7577979719c48460b838f7dcc89b9d17741f79
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-05-15 12:45:06 +02:00
Yoann Lopes
9cf77e3bb5 Improve documentation for the QMediaPlayer::bufferStatus property.
The corresponding properties in the Audio and MediaPlayer QML elements
are also updated.

Change-Id: I7104d274d431e7712db2f045c375756e8c2ac03a
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-05-15 12:41:44 +02:00
Sze Howe Koh
64726bfd15 Doc: Copy snippets from the Qt Multimedia module
Extract a compilable subsection of...
- src/multimedia/doc/snippets/multimedia-snippets/camera.cpp
- src/multimedia/doc/snippets/multimedia-snippets/video.cpp

...into the snippet folder searched by:
- src/multimediawidgets/qcameraviewfinder.cpp
- src/multimediawidgets/qgraphicsvideoitem.cpp
- src/multimediawidgets/qvideowidget.cpp
- src/multimediawidgets/qvideowidgetcontrol.cpp

Change-Id: Ica3c21b65bc57d5686a594afca09e771cc376cc0
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-05-14 06:22:45 +02:00