| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
The units are rather unsafe and a bit difficult to use reliably. So we
completely convert the APIs to use std::chrono types.
Pick-to: 6.5 6.7
Change-Id: Iab33af72baefadd97411dec35ad36641920afa8f
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
| |
We need to update audio resampler upon changing of input audio format
in order to have proper conversion to the format of the codec.
Task-number: QTBUG-121841
Change-Id: I060cef11a43e09808e5e72f8e8e96967a4c220e4
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With custom media inputs, we should be able to handle
changing of video format for user-specific frames.
Changing of size was already handled, the patch handles changing
of source pixel format.
Task-number: QTBUG-121841
Change-Id: I36c0cd65eb8d26d49f33e0abcd6039e855aa825f
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
| |
We can use `QGstPad` in the dictionary rather than duplicating the
names.
Pick-to: 6.5 6.7
Change-Id: Id964a6aa793af67b74ab7a8e0d552d6e193b2dc7
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It seems that changing the pipeline while the pipeline is "paused" is
not sufficient to guard against crashes: The GstV4l2Src element can have
active tasks, so we need to fully stop the camera before mutating the
pipeline.
Fixes: QTBUG-124228
Pick-to: 6.5 6.7
Change-Id: I9aaf678c2e4fb32027d11d7f5f3a17c0ae40e66c
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
| |
pads have a certain naming convention.
Pick-to: 6.5 6.7
Change-Id: I0740f471fb0372e9cdd279d1e389e7b0148750f4
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.5 6.7
Change-Id: I283c808c1c899c7d276ebb796aff6adbcfe6b759
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
We should handle the case when a user doesn't specify timestamps for
video frame. We calculate timestamps from the frame rate of
the video stream or encoding settings.
Change-Id: I617ef2517b6f5144cc43c881a859223c2711d7ce
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Tim Blechmann <tim@klingt.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Upon pausing of video encoding, we stop adding new frames and
finish processing already added ones. We should compensate a time gap
made by skipping frames, so we change the base time accordingly to
the last frame time stamp.
Change-Id: I3808fe1f26f0047bf99579179d5bbc74eb87ca8c
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The patch drops invalid audio and video frames before adding them to
the queue instead of filtering them in the encoding thread.
The functionality will be needed in the following patches.
Change-Id: I0b8ea260523578e4a166d3b71630edea7a4cd433
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* used QMediaInputEncoderInterface instead of a functor
* used functions connect***/disconnect*** to for consistency
* added comments to the code
Task-number: QTBUG-125401
Change-Id: I3e12bb4c0229fe9631b6608c66705703ce99aa1f
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The private classes will be used by public API in following CRs.
Implemented logic of handling and emitting 'readyToSendFrame', and
capture session changing, for
both classes, QVideoFrameInput and QAudioBufferInput.
Task-number: QTBUG-125401
Change-Id: Id86ec324017013fdd95454fe4adcabbc492e8bc5
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The patch just adds setters that will be used upon implementing
public functions.
Task-number: QTBUG-125401
Change-Id: I4c530d832ac4c1a6600a9e596270124c7b01c1c5
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The public API is likely to be QVideoFrameInput and QAudioBufferInput,
so the naming is expected to be consistent; otherwise, we'll rename it
later on.
The patch implements a part of private functionality for custom
media inputs, making the work with the media recorder.
Task-number: QTBUG-125401
Change-Id: If9143d10f337986093ff9272b57dd30b2fc8f3da
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a mention of QT_FFMPEG_PROTOCOL_WHITELIST in the
documentation of QMediaPlayer::setSource();
Pick-to: 6.7 6.5
Change-Id: Id0021c7fb0544f0053800ad87b0abc5dcd2ad7aa
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Sometimes it's good to be able to disable specific plugins for testing
purposes. Adding environment variables to rank down va and nvcodec
plugins.
Pick-to: 6.5 6.7
Change-Id: I46075a37ce1e5bddd02c6547c7a2ac4760d629a4
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
| |
The `QGstreamerMediaPlayer` ctor explicitly sets the state to NULL. This
doesn't seem to be necessary.
Pick-to: 6.5 6.7
Change-Id: Iaf30fe570dacdfdcc3230acce2db8e999649bd26
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- removed m_connections list that was used for disconnections,
used disconnection source -> encoder instead.
- remove dependency AudioEncoder -> FFmpegAudioInput in the
constructor.
Task-number: QTBUG-125401
Change-Id: I38b78613e10eb16500b43b9e78ffb04e6a72d8c5
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Tim Blechmann <tim@klingt.org>
|
|
|
|
|
|
|
|
|
|
|
| |
We already have a queue at the beginning of the video output. Having two
queues separates scale/convert from the actual app sink into separate
threads, but that probably doesn't give us much benefit here.
Pick-to: 6.5 6.7
Change-Id: Ie04f00d3ad324e7053c6f05434dc049fb6ec84e0
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
| |
Lots of unused headers were included here.
Pick-to: 6.5 6.7
Change-Id: Iced7999fab8414ad3969939ead564b449b1565bd
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
| |
`QGstreamerCameraBase` is a base class of `QGstreamerCameraBase`, its
inferface can be used from QGstreamerMediaCapture
Pick-to: 6.5 6.7
Change-Id: Ib9d27cb45e4771c7f532db519cb0c6432a4d0349
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
| |
* avoid moc
* remove unused gstPipeline element
Pick-to: 6.5 6.7
Change-Id: I0f5913664b9cb12f848b01e73d58ed0a6d2553f3
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
| |
Play should not reset the current loop index when the player is in
"paused" state.
Pick-to: 6.5 6.7
Change-Id: I9099dd5a585886c3ab93ca54926f64ce3f0475dc
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An application that uses a camera get stuck on an emulator, while
running properly on a real device. To make it work on emulator the
workaround was prepared. It will make a copy of each frame buffer,
so it is not recommended to by used by default.
Fixes: QTBUG-122118
Fixes: QTBUG-119472
Pick-to: 6.7 6.5
Change-Id: Ie03fd527146b3e5a47da3338a4fc5d0b5ae21bf5
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
|
|
|
|
|
|
|
|
|
| |
We use a single thread pool for all `QGstreamerImageCapture` instances
to make sure to use only one QRhi instance.
Pick-to: 6.5 6.7
Change-Id: I7ae99c7fa288fdfaadc3a59429fc930a764ce2d3
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Using the `QObjectPrivate` machinery for `QMediaCaptureSessionPrivate`
to make it consistent with the rest of the codebase.
Pick-to: 6.5 6.7
Change-Id: Ia725ac7fb8fbbed1f4e54baf060daa82a7d54094
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
| |
We can rely on `qUnlinkGstElements` to unlink elements. This makes the
codebase easier to reason about.
Pick-to: 6.5 6.7
Change-Id: I1f98baa1932b7fe739c3a12a36c461c8bf946da0
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when using a long frame rate of one frame per buffer, gstreamer will
deliver the same buffer multiple times. We therefore keep track of the
current state and only send a new frame, when it is actually required.
Fixes a unit test failure in
`play_waitsForLastFrameEnd_whenPlayingVideoWithLong`
Pick-to: 6.5 6.7
Change-Id: Id970b6659ed896e26fc1b854d7676467b6bd978e
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When emitting signals on QPlatformImageCapture, we need to make sure
they are invoked on the thread. So we defer the invocations when
emitting from a worker thread to the thread owning
`QGstreamerImageCapture`.
This also makes sure that we don't emit signals while holding a mutex.
Pick-to: 6.5 6.7
Change-Id: If53ae5622d2a3d62a146afa3f9b6585909967069
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We defer the access to QRhi to a worker thread to prevent
deinitialisation failures when joining gstreamer threads. This can
happen after the QApplication has been destroyed, leading to
use-after-free errors.
Fixes: QTBUG-124189
Pick-to: 6.5 6.7
Change-Id: Icfd060fdc695ff39f0a9cd67b28392a61145d6ad
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Defining buffering by a buffer count can lead to undesired behavior, as
the buffer length may vary. It's better to set the buffer time to
something more reasonable like 500ms.
Pick-to: 6.5 6.7
Change-Id: I83b1daca5b5a82b99fa791613a9f78178ddd5c48
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.5 6.7
Change-Id: Ie3a4f97faddb0f6a41f98443209c8f3c52191361
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
After adding custom audio input, more the 1 audio sources can be set,
so we should use an array of audio encoders like we do for video ones.
Also, the auxiliary function 'forEachEncoder' has been added for
applying the same action for all encoders.
Task-number: QTBUG-125401
Change-Id: Ia138112365a4afc09589392badab46da4ca19ed6
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
| |
The flag will be used for custom media inputs to detect that
frames can be pushed.
Change-Id: Id89acafd2392390b8eb453d7b8b701de6e97802d
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using MODE_IN_COMMUNICATION allows to properly control audio devices
(like changes between Bluetooth and speaker), but the consequences are
the issues with Volume Button. At begginig it changes the "Call volume".
After some time it starts to control the "Media volume".
If there are no bluetooth or wired headset, the MODE_NORMAL will be
used for speaker. That allows to avoid issue with Volume Button.
In case when there are bluetooth or wired headset we need to use
MODE_IN_COMMUNICATION anyway.
Fixes: QTBUG-123044
Pick-to: 6.7 6.5
Change-Id: I7bfea28a971bca1b596622bf604f65941c0afe42
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using BroadcastReceiver with different filters, use
AudioDeviceCallback[0] prepared for this purpose.
Since we are interested in changes in audio devices, we should use the
API prepared for this purpose. We shouldn't rely on BroadcastReceiver
- especially for a Bluetooth case. After receiving intent about the
connection of Bluetooth devices, AudioManager updates its list of
connected devices with a delay. Therefore, we cannot assume that the
device array will be updated immediately. That is why it is better to
use AudioDeviceCallback.
[0]https://developer.android.com/reference/android/media/AudioDeviceCallback
Task-number: QTBUG-123044
Pick-to: 6.7 6.5
Change-Id: Ic2087f536a045562386be6a5862c3ce7968210e7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The functionality will be used for screen/window capture,
and for custom video/audio inputs.
What's implemented:
- added method 'initialize' to RecordingEngine that creates
an initializer that can wait for sources that are not ready yet.
- If we don't have sources for pending, the RecordingEngine is
initialized and started immediatelly.
- if the user decides to stop the recorder before it's initialized,
the initializer will be cancelled.
Pick-to: 6.7 6.5
Change-Id: Ice820c0606e2b1f2ee87b6295cc535a593f6822e
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
| |
Added a compile time check, that the version detected by cmake and
the version from headers are the same.
Pick-to: 6.7 6.5
Change-Id: I7b169c005fab5d8cab1999d8f937ab561075b0d1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's possible to have several media players (imagine one player for
playing a background music in a game and the second providing an audio-feedback
for some user interaction). Setting a media source is documented
to stop the player's playback, but this does not mean _any_ media player
playing at the moment. AVAudioSession.sharedSession though acts as a
singleton and thus will stop all audio. To fix this, we only deactivate
audio session if we activated it previously (and since 'sharedInstance'
is a singleton anyway - alas not having 'active' property - we
add an activation count).
Pick-to: 6.7 6.5
Fixes: QTBUG-124298
Change-Id: Ia1dae7ad16d7affc64ab2b22517d5ad1d47ca379
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The pipeline in the player is called playerPipeline. Renaming the
pipeline for QGstreamerMediaCapture to capturePipeline for consistency.
Pick-to: 6.5 6.7
Change-Id: Ib2b6ed265db5882d607495e67e7e2b63c5197428
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
| |
The functionality is to be used in media recorder.
Pick-to: 6.7 6.5
Change-Id: Id4248c3495f044f1b1a90058dceacdea172a1870
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
GStreamer's scaling semantics is hardcoded in videoconvertscale.c, and
tries to keep the input height "because of interlacing".
For now let's document the behavior, our future selves may want to
align the backends, though.
Pick-to: 6.5 6.7
Change-Id: I37800713d1844c06c446f69fe5fa7bde00683996
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
* EOS should always send a position update
* stop() doesn't need to query the position from the pipeline, as we can
directly move to 0
Pick-to: 6.5 6.7
Change-Id: Ib5c68b01d6ca5d66ddebefbbd5acbad465b1b8db
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
| |
Let's slightly reduce the binary size and not do extra loadings.
Pick-to: 6.7 6.5
Change-Id: I52636fe985ca96d4495f905a82db4408d7b57193
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
`QGStreamerPlatformSpecificInterface` allows developers to access
gstreamer specific via a custom interface class.
Pick-to: 6.5 6.7
Change-Id: If364ff9f9465476a7d9e55eb846e2e6e94ea7e83
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When setting output elements of pipelines which have not yet been
started, we may end up in a READY->PAUSED transition forever, which can
cause getState timeouts.
Instead of setting the state of added elements to PAUSED, we sync the
state with the pipeline state. This fixes some getState timeouts when
the player gets an audio output set, but never actually plays.
Pick-to: 6.5 6.7
Change-Id: I502f3e2dc0bb67b780a37305918568e26d0a266f
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We provide factory functions to allow users to inject custom elements
as source/sinks
[ChangeLog] QAudioInput/QAudioOutput: GStreamer - add private API to
customize audio input/output via a pipeline string.
Pick-to: 6.5 6.7
Change-Id: I75304b66ea8ea01c551df89bc7861c76d571dc32
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
`tst_QMediaPlayerBackend::finiteLoops` validates that a correct end
position is sent on a loop boundary. We therefore simulate such a
message with the gstreamer backend.
Pick-to: 6.5 6.7
Change-Id: I632e5be7b01c144c5c689b3a6a8faa6183cd6da4
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The idea is to make users able run the FFmpeg plugin without
additional third-party installations, namely OpenSSL and VAAPI.
It has been working with static linkage, the current patch
implements it for shared linkage.
* In a nutshell, we compile libs libQt6FFmpegStub-somedep.so.x
and make FFmpeg dependent on the instead original libsomedep.so.x.
Users might trivially replace the shipped FFmpeg with thier one
without stubs just by deleting/changing the files.
* The solution is scalable on Android and other libs.
* Patching of the FFmpeg dependencies we do in the related
patch codereview.qt-project.org/c/qt/qt5/+/550318
* More information and discussions are in the ticket
and the discussion page intranet.qt.io/display/QTRD/Shipping+of+shared+FFmpeg+with+dependencies
Pick-to: 6.7 6.5
Change-Id: I322641abca4a1010e65f74a0a8265b824ceab031
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move the stub utils from the plugin to QtMM so that shared stubs
could reuse them.
* Make the stubs as singletons instead of a static object to address
initialization races and allow lazy loading (it's optional now).
* Decouple stubs definition: one file and singleton per stubbed lib.
It gives us an advantage to create shared stubs separately,
they are to be implemented in the next CR.
Task-number: QTBUG-120990
Pick-to: 6.7 6.5
Change-Id: I2158a49073b1e66d1bbfcb993b7746a4bd45048f
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|