| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Change-Id: I3204cdf695f4b47730a88a7c41fc7a6de967b161
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes sure all mediaStatus changes are emitted, even when some
action is done on the media player as a result of a state change.
Also, when both mediaStatus and state are changed at the same time,
make sure both variables are updated before sending the
corresponding signals.
Task-number: QTBUG-49578
Change-Id: I8eed6692503bba1540070f6435b7ea1f5e25c023
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When both state and mediaStatus are updated at the same time, make sure
both variables are updated before emitting the corresponding signals.
Also, always emit mediaStatusChanged() signals before stateChanged() to
make sure mediaStatus changes are not cancelled by some action
resulting from a state change.
Task-number: QTBUG-49578
Change-Id: I0caea8261120595227834dbac7fed286d125bcab
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a playlist contains an invalid media, QMediaPlayer normally
continues to the next media. If an invalid media was first in the list,
the backend would never go into PlayingState, which would then cause
the media player to never start the next item in the list (thinking
it's stopped).
We now always transition to PlayingState when starting playback of a
playlist, regardless of the backend going into that state or not.
Change-Id: I4227f937e7a619afbd8adbe2fccedfa5d43ad89a
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Simplify the ownership of the OpenGL resources and make it simpler
to release individual resources as needed. Previously we would
reset the texture handle without releasing it back to the system, making
us leak texture each time the video output was reset.
Also, be consistent with the type used for the texture handle.
Task-number: QTBUG-54340
Change-Id: Ic3b3c7322677a909e51aa5983fa99ccf8b290302
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On some devices and on the emulator, the preview callback must be
cleared before taking a picture to avoid a camera server freeze.
Task-number: QTBUG-54709
Change-Id: I9e4ad417fa08cddea7edfd232f5b5df40ada59ee
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The preview must be restarted after taking a picture but were doing
that only when the capture succeeded. We now also do it when it fails.
Change-Id: I8bfff06a811d9333220050e5e81561438f5a3786
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ia068b0fcc30412755639412ec03e49c740b66bed
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The size in the data chunk was missing 8 bytes.
Task-number: QTBUG-54710
Change-Id: I0530ea9d2420dd90d196993e1678003697c0ebaa
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When capturing two pictures in a row, the second capture would not
trigger the imageCaptured() signal. The reason is that capturing a
picture restarts the preview when done, which in turns clears the
cached last preview frame. The second fetchLastPreviewFrame() would
therefore not do anything.
In this situation, we now retry fetching the frame as soon as a new
one arrives (rather than bailing out).
Task-number: QTBUG-48975
Change-Id: Id5476f37641c04b0edd92bddd40711d5125887f0
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't emit signals while mutexes are locked.
Task-number: QTBUG-41573
Change-Id: I287b031a579cbec1cd178501df4426ceff9e9142
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Reviewed-by: Ruslan Vorobei <zvorobei@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Check the state of the media player when trying to play or pause
without a loaded media.
Change-Id: I6685f196457630eb9f4e834426c8e1b9a9eaf8dc
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replaced
- header.LGPL3 with header.LGPL
- header.LGPL21 with header.LGPL
Change-Id: If11396da6ff12e9122281c17fc4354b05a554ee5
Reviewed-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rather than expecting a certain amount of signals to be fired within
a fixed period, check that all the required signals are emitted and
that it doesn't take longer than expected. Use a margin of error to
take into account timers firing later because of high system load.
Change-Id: I7f77d32a9db3d09881eadbd0dfc6b70f62757d09
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
|\|
| |
| |
| | |
Change-Id: If640a9831fc4faf43a445bd0379fee1d53661f47
|
| |
| |
| |
| |
| | |
Change-Id: If2336e9c550ef8264d0853be83972a6170a9746b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QUrl::resolved can be used to resolve relative paths, but not by
passing them via QUrl::fromLocalFile (8a33077 in qtbase made QUrl
more strict). To resolve both relative and absolute local paths
against a local directory, QUrl::fromUserInput(3 args) does the job.
Change-Id: Ifc01bbd590978f939f9538e70d12f2f3704d7b5d
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
|\|
| |
| |
| | |
Change-Id: Ic29cb09048003f18ff86d4546cd547be715eaec8
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For some cameras difference between preview aspect rate and capture
aspect rate is more than 0.01. Therefore it is better to use preview size
with closest aspect rate.
Task-number: QTBUG-50813
Change-Id: I1284c8ec2be1aa160a656e396a52960fa06aaa56
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Apple recommends starting/setting up a session (AVCaptureSession) on a
special queue and in the past we did this on the writer's queue.
Unfortunately, we also can access the same session from a different thread
and this results in race conditions and different weird crashes, for example,
we're calling start/stopRunning from the writer's queue, while the session
is being configured (in between beginConfiguration/commitConfiguration
on the recorder control's thread). So we have to limit access to the session
by the control's thread.
Apple docs say we have to ensure all appendSampleBuffer calls done
_before_ finishWriting. We ensure this by dispatching_sync an
empty block on the writer's queue after store-release of m_state.
We also do the same with video queue to ensure it does not try to
access viewfinder's data after stop/abort executed.
All these changes also make lock/mutex unneeded.
Task-number: QTBUG-54890
Change-Id: I38e86c879b6b62306bdfbeade65405d6ac3be9f3
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
CameraBinV4LImageProcessing::setParameter was leaking the resource fd
in some cases in the switch using return instead of break.
Change-Id: Ie56eaf4cf1d1b7531094c321f49a818632985628
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since Android 5.0 Google introduce a nasty bug[1] which calls
JNI_OnLoad more than once.
Basically every time when a library is loaded JNI_OnLoad is
called if found, but it calls *again* JNI_OnLoad of its .so
dependencies!
[1] Workaround https://code.google.com/p/android/issues/detail?id=215069
Change-Id: I81b4a94beedaad299267ac6deab2f9c3a1693a62
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1. No need in two different atomics (m_stopped/m_aborted) - the single
one 'm_state' with states (Idle/Active/Aborted) should be enough.
2. QAtomicInt::load/store actually have relaxed memory ordering semantics,
(not like std::atomic with sequential ordering as the default one)
which is not always appropriate - replace with loadAquire/storeRelease instead.
Change-Id: I4ce8c9ca7556de3d2c7e369b8a05276b2870460c
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes texture name leak when changing media player's source. Texture name
shold be deleted by OpenGLResourcesDeleter class, but when player's source is
changed OpenGLResourcesDeleter's texture name is reassigned with new one
without old name deletion.
This change deletes OpenGLResourcesDeleter's current texture name when new name
is assigned.
Task-number: QTBUG-54340
Change-Id: I22bbd60b4462b0034fd115f0582ea43b9bcaee4b
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The surface was never cleared in the EVR presenter. It could lead to
situations where the presenter would use a destroyed surface.
Change-Id: If2223f09f6f8c20c06345bed40803da10dcf4ae3
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes a regression caused by ba8127639857232d8a. The change
assumed that the AndroidSurfaceTexture class could cope with changing
textures, but since the callback from the SurfaceTextureListener was
tied to the initial, invalid, texture handle, it would only work as
long as there were only one texture; all textures would register
the callback to the same invalid handle.
This change maps the callback directly to the android texture object,
instead of the texture handle.
Task-number: QTBUG-54340
Change-Id: I39568d0f97fa6b9cb1182efaca568b16a26f0d09
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the DirectShow graph is done being built, there's no need to wake
up any blocking calls on the main thread since setting a source is done
asynchronously anyway.
This could cause synchronous operations (like stopping or changing the
video output) to end prematurely if called while a source was still
being loaded, in turn causing the deadlock.
Task-number: QTBUG-54504
Change-Id: I4f534e637bfca6d3020a3bc28725c8c7042941d5
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change ensures that the next media file to be played back will start
playing at position 0. Without this change, it would start playback at the
last position of the previous media file.
In the play() function, when attempting to play a video, we first go into
the loading state which just defers playing until later. Since we set the
state to “Playing”, we now accept events from mm-renderer. It sends us a
position update which ends up being from the previous video. Since we’re
in “Playing” state, we trust this event is right and set our internal
m_position variable to that value. Once the media has loaded, play() is
called again and then we hit the call setPositionInternal() which seeks
the media to our internal m_position (the position we got from mm-renderer).
To resolve this, we now will call setPosition in the stop function that
will cause mm-renderer to seek to 0 just before it stops playback
(as recommended in documentation) so that any events we get from mm-renderer
when we move to the “Playing” state will be related to the current media.
Change-Id: I8ae35e57dd690bbae1fb996c1feb15ee4addab55
Reviewed-by: James McDonnell <jmcdonnell@qnx.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Be more permissive while checking loops remaining.
Remove file BLACKLIST
Task-number: QTBUG-46689
Change-Id: I15b5fb55ee770a190b2c21dd8cf1fad45665a73c
Reviewed-by: Milla Pohjanheimo <milla.pohjanheimo@qt.io>
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Asserting is too heavy and can cause false positive on devices like the
Lumia 535, where focus is supported, but not setting a focus point.
Later on we check for existence of the control during the
initialization, so it is safe to continue here.
Task-number: QTBUG-54278
Change-Id: Ie68ff754d742888bdd6f4047e07d207707c90c91
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| | |
Change-Id: I49cadba64f29bf7c841c9a34fae4cb4df2596470
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-54506
Change-Id: I81ad9b90fdc55aaaa828ef8256edb7bccca45e64
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The final volume conversion API has changed. In any case, we don't need
to convert the volume here; the Qt volume is linear and so is the
volume expected by IAudioStreamVolume.
Change-Id: I6065505735a6140843dcfefd8b2e0447fc83102d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Blacklisted a few functions in tst_QAudioInput.
Conflicts:
.qmake.conf
src/plugins/avfoundation/camera/avfcameracontrol.mm
src/plugins/avfoundation/camera/avfcameraservice.h
src/plugins/avfoundation/camera/avfcameraservice.mm
src/plugins/avfoundation/camera/avfcamerasession.h
src/plugins/avfoundation/camera/avfcamerasession.mm
src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.h
src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm
src/plugins/avfoundation/camera/avfimagecapturecontrol.mm
src/plugins/avfoundation/camera/avfimageencodercontrol.mm
src/plugins/avfoundation/camera/avfmediarecordercontrol.h
src/plugins/avfoundation/camera/avfmediarecordercontrol.mm
tests/auto/integration/qaudioinput/BLACKLIST
Task-number: QTBUG-54459
Task-number: QTBUG-49736
Change-Id: I3a1fe8cef50b44d5c2785aaf4cf69fe3f16728e6
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
NetBSD does not have -ESTRPIPE, so use it only when defined.
http://netbsd.gw.com/cgi-bin/man-cgi?errno+2+NetBSD-6.0
and https://mail-index.netbsd.org/pkgsrc-wip-discuss/2013/10/27/msg002529.html
Change-Id: I92921a16fcae95f58a870aea98ca66f5a5d30a12
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The list of devices was cached on startup and was never updated
when a device was plugged, unplugged or if the default device changed.
We now use the event subscription mechanism in PulseAudio to get
notified of these changes and update the list accordingly.
Change-Id: I5fe1c81494702aa9d38b91009621629dc9606323
Reviewed-by: Karim Pinter <karim.pinter@theqtcompany.com>
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
See http://comments.gmane.org/gmane.comp.lib.qt.devel/25771
Change-Id: I9fc15721bf7a26d5da82739a6c83e76e33bb2827
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure the device format is always set in the same way.
We don't actually set the format anymore when it's the same as
the current one. We also make sure the frame rate is preserved.
Change-Id: I1c68239bc99d9c3cef920effcf47fc253220c26f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since the active viewfinder resolution can be overridden by the image
and video capture resolutions, we need to re-evaluate the viewfinder
settings whenever the capture mode changes.
Change-Id: Ibdb7a070585cf67ebb2fcfb95ccbdd105f5f41cf
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure the video is recorded in the same orientation as the device.
That means the top of the video matches the physical side of the device
which is on top when starting recording.
This patch makes sure the behavior is the same as on Android. In a
future version, we should have an API to pick the desired orientation
of the recorded video.
Change-Id: Ia8bbfe621a0e54de3cb6bfe0a520f37e8a932539
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I24d3da1417142bc80bc6b6c1c8124c246afe03db
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I5097a0450f5836e48a697249619a1822775f3ad8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
| |\
| | |
| | |
| | | |
Change-Id: I0b4fde2a47b428fd04012a8dbec16fd14797b8dd
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QWinRTAbstractVideoRendererControl::setActive was using
QThread::requestInterrupt previously to indicate to the render thread
that it is supposed to quit.
However, when switching cameras you cannot tell the render thread to
continue rendering. Instead start() is called and then the render thread
recognized the previous interrupt request, resulting in a quit and no
further rendering happening.
Instead we wait for the render thread to complete by using shutdown().
Task-number: QTBUG-53722
Change-Id: Ibee2ed4f64400ca14c788984a73df4be0653ed2b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I44620b8513fdf20ebc0e093368044133eabdd6b3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We would attempt to delete the AndroidCameraPrivate object twice if the
native call to open failed. On recent version of Android (~6.0), this
problem is harder to reproduce, as the camera is properly released when
the application goes into the background.
Task-number: QTBUG-53536
Change-Id: I064d276f9025924dfdb071aa52311d2b553c6953
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
c.f. the constructor already doing the same for provider and the
various fields populated by initControls(), which init() calls.
Should be redundant (all QCamera constructors do invoke d->init() as
soon as they've constructed d), but better safe than sorry. Calms
Coverity (CID 22319).
Change-Id: Ibf5d13bb1ef17be8e66fa14ed5617b700051c495
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- "default" is a valid argument for snd_pcm_open(), let ALSA handle that
case rather than using the first device in the list.
- Don't add "default" in the list of available devices if there is
already one.
Change-Id: Icd41aa6677923a79faf6c90d0627eedd8700b91b
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The texture renderer could end up in a situation where a frame could be
scheduled to be rendered after the renderer was reset.
Change-Id: Ie6b6c9d0b5f5851f14aa6eb5f8421196aff8c691
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On OSX, it's not possible to reset the frame rate to the default value
by passing kCMTimeInvalid, so just set the first value from the
supported frame rates.
Change-Id: I984101c2a95e13053228e56f19b353e716eb2b67
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|