| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 80d46e3a5f64ff2456c40bdba63b6d5c69a32cdd.
Revert of commercial license headers is required for Qt 5.15.3
opensource release.
Task-number: QTBUG-91108
Change-Id: I5c64ffa120f916711e5cf01c828774f8456dec06
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updated header.COMM to files in tqtc-qtmultimedia. Examples,
tests or documentation files are not updated.
The commercial license header may contain some
additional lines so that its line count equals
with the earlier license header. Reaso for this
is that some autotests use hard coded line numbers
and a change in the line count causes failures in
tests.
Task-number: QTQAINFRA-4171
Change-Id: I86ebf7c3653b55983cefff246c0cb019cbcda8c4
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
|
|\
| |
| |
| | |
Change-Id: Ib250ceecd02291f752b7775f329f0f494c4aed38
|
| |
| |
| |
| |
| |
| |
| | |
Use specific function instead, e.g. qt_androidRequestCameraPermission.
Change-Id: I925e4d8ac4f1993c073930a79453894dd516d769
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If camera permission is granted and recording is requested
it also requires recording audio permission.
If it was not granted before the popup will be shown
to ask the user to grant the permission
and the app goes to inactive state,
which destroys the camera handlers.
When the camera is loaded but the app requires additional permissions,
it should not destroy the camera.
Change-Id: Iee3662a7ac3381b0eb29190779b0116f9f64304f
Fixes: QTBUG-79909
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Since QVideoFrame::pixelFormat's do not 100% match QImage::Format's,
introducing converstion function.
Returns an image based on current frame.
Converts data if needed to supported QImage format.
Change-Id: I3331578c01cf9c999a380efc4a83bf9eddb07901
(cherry picked from commit 93f966335e1ed8ed47b7e8b32452d43c2f8a7bb1)
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently it is not able to start camera without viewfinder.
For this purpose there is QAndroidCameraDataVideoOutput with SurfaceView
in order to be able to start the camera preview.
Implemented dummy QAbstractVideoSurface to render to it when no video
output is provided before starting the preview.
Task-number: QTBUG-73582
Fixes: QTBUG-73237
Change-Id: Ic76d247b5d5352e8539ba61271484e56d3a40fbd
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently if the application is inactive,
the state is postponed to be set and processed when the app becomes active.
This also postpones stateChanged() signal and saving the state value,
while it should be set (but not processed) immediately as done in another backends.
Added a fix to store the state and emit stateChanged regardless of
activity of the application.
When the application becames available, the state will be processed.
In case of an error while opening the camera:
- UnloadedState is emitted
- CameraError
- UnloadedStatus
Change-Id: Ie376d29366168a6b15eccea884f385070f94fe35
Task-number: QTBUG-73582
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
| |
Fixes tst_QCameraBackend::testCaptureMode.
Change-Id: I2f6486102ebcbf7e1ab0feea8c13658772d5b90f
Fixes: QTBUG-73582
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Since the native notify* methods for QtCameraListener.java are executed
on different thread, there is a potential for a race condition when the
applicationStateChanged is received before the notify* signals,
which leads to the camera being release before the slots are executed.
Task-number: QTBUG-52366
Change-Id: Ifc82f3a75a7e88e4e76fac3edbf16bb9f138fde7
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The camera should ask for permission before being used. Normally this
should be handle by the user, which can provide proper reasons for why
the camera is used. To verify that we are allowed to open the camera,
and as a good default, we'll check the permission and request access
if needed.
[ChangeLog][Android] Added run-time permission checks for accessing
the camera.
Task-number: QTBUG-55992
Change-Id: Ifb4e176728aab3076fdba292e17e17d33b1260a2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before API level 24 the display orientation (the preview) was always
set to 0. On newer versions of Android the clockwise rotation is set
to be either 0 or 180, depending on the hardware. Since we don't
want Android to apply transformation on our surface, we'll just
enforce that the display orientation is always set to 0.
Task-number: QTBUG-56536
Change-Id: Ie1aacda97540d5c97e6cbd8edb2afc53e7041e1e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|\
| |
| |
| | |
Change-Id: I3204cdf695f4b47730a88a7c41fc7a6de967b161
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add class QAndroidViewfinderSettingsControl2 which implements
QCameraViewfinderSettingsControl2 interface. This make next QCamera methods
working on Android:
* QCamera::setViewfinderSettings
* QCamera::supportedViewfinderFrameRateRanges
* QCamera::supportedViewfinderPixelFormats
* QCamera::supportedViewfinderResolutions
* QCamera::supportedViewfinderSettings
* QCamera::viewfinderSettings
Originally from:
* https://github.com/headupinclouds/gatherer/issues/109
Change-Id: Ic43e434289a626691f01ed9832654fa9b0105c7d
Reviewed-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: I324f65c61171f36641472964d095d72e452afb3a
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/android/src/mediacapture/qandroidcamerasession.cpp
src/plugins/wmf/mftvideo.cpp
Change-Id: I78868b416ea4baec89ca3e2dc9eb4712db16d5fc
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/plugins/android/src/wrappers/jni/androidcamera.cpp
Change-Id: Ibb34f710b1dfb9a23b378462f31432581c6c26f4
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Not all camera operations are documented to raise exceptions, but they
actually might do so depending on the hardware/drivers.
Check for exceptions in all functions that could porentially fail
and react appropriately.
Task-number: QTBUG-49134
Change-Id: I633ca7f2e3aeb6532e1c445735e62135f52cf25f
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QCamera can now pass raw frame data to its QAbstractVideoSurface.
The now deprecated Android camera API we're using doesn't allow to
get frame data without also displaying the frames in a SurfaceView
or a SurfaceTexture. To work around that, an invisible dummy
SurfaceView is used.
This allows to retrieve frames in the NV21, YV12, YUY2 or RGB565
formats, depending on the Android version and on the device.
Task-number: QTBUG-35416
Change-Id: I77b4f50505c3b91efb4b2288a57f50398922c0db
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
|
|/ /
| |
| |
| |
| |
| |
| | |
... in Android, AudioCapture and m3u plugins.
Change-Id: If06a97e49cfa4d32a41da2f043710cfdbd8a7b20
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
| |
The Android plugin had a function to convert from NV21 to RGB32.
It's now moved to the Qt Multimedia library and it supports additional
source formats. It could be further improved with more SIMD code, it
could then become a public API.
Change-Id: Ibee349027048a263a1a7ea74dc51237f7747912c
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I6b281c9b2d02cf223e66e04e31fdd0268aa277fc
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- When the video capture resolution or the image capture resolution
changes, we now always set the viewfinder resolution to the highest
available one with the same aspect ratio as the capture resolution.
We were previously not doing anything if the new capture resolution
had the same aspect ratio as the current viewfinder resolution.
- Some devices don't support using a viewfinder resolution different
from the video capture resolution. Make sure we handle this case.
Change-Id: I8d3ab7b01c56ed78d1ca838a522ba459692fc332
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
|
|\
| |
| |
| | |
Change-Id: I5575a4ba13212c9bfe73a3de3ef17c6528beafc3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The viewfinder resolution must be in the same aspect ratio as the
image capture resolution. When adjusting the viewfinder resolution to
comply with that restriction, we assumed that the ratios had to be
exactly equal. Though, in practice, there can be a small difference.
For example for resolutions 2592x1952 (ratio=1.3278) and resolution
640x480 (ratio=1.3333).
Task-number: QTBUG-37525
Change-Id: Ia5a6dd3a4a6d901b24bf74f8aa4e34bffe61f89b
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
| |
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I1c6faa4f59f8eca54f01ef20941fa60161dd7872
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL
Change-Id: Ied06887225df341064c12bcc14c259ae74116f2e
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
In several places we where ignoring the fact that we might get an
exception from the camera code on Android. Failing to clear them will
cause the application to to terminate.
Task-number: QTBUG-39425
Change-Id: Idfe40e1749f54d551d37dae25912d9ddbc3da01e
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Makes the abstraction more clear.
Change-Id: Ia9a7b0b157e1182158cd26b62775d13f6c5e1727
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
|
|
|
|
|
| |
Change-Id: I2ce15c8475da3186f128ba59b7c58f9b5b0a67e1
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
|
|
|
|
|
|
|
|
| |
It's now a private API in the QtMultimedia library in order to be
accessible in other plugins.
Change-Id: I63541de1e8c540cebc210f9037646ce74d866c6f
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
With some Android versions the preview texture is released when the
application is suspended. If we don't release the texture in our
code, the preview will be empty when the application resumes.
Task-number: QTBUG-38165
Change-Id: I72244727081d8f94ee5f6cb0ab660ca59f4bb2de
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
|
|
|
|
|
|
|
|
|
| |
VideoOutput will now take into account the camera sensor orientation to
adjust the viewport orientation, we don't need to apply a rotation on
the Android Camera anymore.
Change-Id: Ia7639f0a5711ab6cc6f80b9716bc1a6f389499b4
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
|
|
|
|
|
|
|
|
| |
The number of bytes per line was missing.
Change-Id: I0afbdcfd6d7195b7beb3fd09f4ed262f756be848
Reviewed-by: Denis Kormalev <dkormalev@ics.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
QMediaVideoProbeControl sublclass added to capture service to make
QVideoProbe work with Android camera.
[ChangeLog][QtMultimedia][Android] QVideoProbe support for camera
Task-number: QTBUG-35416
Change-Id: I14d0a0e8abd14ee8f577e2901b976b8ed46eb320
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Actual camera work moved to JCameraWorker which lives in dedicated
thread. JCamera now acts as proxy calling JCameraWorker methods with
invokeMethod (when it is needed).
[ChangeLog][QtMultimedia][Android] camera operations moved to a
dedicated thread
Task-number: QTBUG-35564
Change-Id: Ie4edcbf0869d56b0fef4ad0c820450cc77657fdd
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At some(?) devices we can't rely on one shot preview callback because
it receives data only after we start new previewing session. And this
cause situation when imageCaptured signal is never emitted.
This fix applies preview callback with already allocated buffers and
collects all preview images in these buffers. When we capture image -
we can simply fetch last preview image (if there was any) from c++ part.
Task-number: QTBUG-34993
Change-Id: I608750c344ca3c089f4673df4907e0f47e57e2ba
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The camera sensor on Android devices might be in a different orientation
than the device natural orientation. There is no API in Qt to know about
the camera orientation, so correcting the viewfinder orientation is not
possible without making guesses. This patch makes sure the viewfinder
orientation always matches the device natural orientation. For example,
if the camera is mounted in landscape, and the device natural
orientation is portrait, the viewfinder will automatically be rotated 90
degrees counter-clockwise.
Task-number: QTBUG-35086
Change-Id: Ia890872971d72657debe709f61edba27d09dec65
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
|
|
|
|
|
|
|
|
| |
Don't decode the JPEG data to raw RGB using QImage. QCameraImageCapture
reports anyway that JPEG is the only supported buffer format.
Change-Id: Ib17760e4361b004775c002b686ef7529b3768aab
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
|
|
|
|
|
|
|
|
|
| |
Clear the camera preview size when stopping the preview in order to
force it to be reset when starting it again.
Task-number: QTBUG-34346
Change-Id: I0edf8d996348745b9aa7cf0790c16b6cd813b33b
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
|
|
|
|
|
|
|
|
|
| |
Translators not familiar with cameras might mistake it for
something related to driving a car.
Change-Id: If54a563a32af537d291b79253056b7b57e108f5b
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
We used to generate the capture preview from the video output, grabbing
the pixels of the last frame (in a FBO). This is not possible anymore,
we instead query the camera for a preview frame, which is in the NV21
format and needs to be converted to RGB.
Change-Id: I1c728b3a708a6f052a83aebf9f15f511eab7a02f
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed the overhead of having to create a shared OpenGL context in the GUI
thread and pre-render the frame into a FBO.
We now directly render the GL_TEXTURE_EXTERNAL_OES in the QtQuick render
thread, using an Android-specific QSGVideoNode.
We also use a callback from the render thread to create the texture from
there and not have to create a separate shared OpenGL context.
Change-Id: I6c8eb94b47d0a03329c912701b8af3fb5ebd1876
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
|
|
This patch includes all camera features: viewport, settings, image
capture, and video recording.
It also adds support for QAudioRecorder.
Change-Id: Ib962177cc8de4bac03f42a2bc0f534e03464bbfc
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
|