summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer/camerabin
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-04-201-4/+1
|\ | | | | | | Change-Id: I160b25219c806d9d3a30644fa1a5e589c5aca039
| * GStreamer: Remove file when CaptureToBuffer is usedVaL Doroshchuk2020-04-201-4/+1
| | | | | | | | | | | | | | | | | | | | Capturing the image is handled by camerabin and it saves the image to a file. And we wanted to remove the file if capturing to buffer is requested, but the file is kept and not removed. Change-Id: I21404fc160bf275325deebf0f00b588de3493ee1 Fixes: QTBUG-82572 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-101-4/+6
|\| | | | | | | Change-Id: I4ea49723c74c6dccf141b65f834b5d539d2ab9d7
| * GStreamer: Allow using different resolution for capture and viewfinderVaL Doroshchuk2020-03-031-4/+6
| | | | | | | | | | | | | | | | | | | | Currently viewfinder resolution is overridden by image resolution. Fixed to keep it separate. Note, it might be not fully supported by gst camera implementation. Change-Id: Ia04c7819da1410f41aee458d347408f94053170b Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-211-1/+5
|\| | | | | | | Change-Id: I0bc0e3caceaca0def467237983d9c611c46c5d7a
| * GStreamer: Don't create encoding profile if container is not supportedVaL Doroshchuk2020-01-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It does not make sense to create a GstEncodingContainerProfile with a non-supported media container. The correct way to use it is to provide supported values for mediaContainer together with videoCodec. mediaContainer: "video/quicktime, variant=(string)iso" videoCodec: "video/x-h264" Task-number: QTBUG-81075 Change-Id: Ia25fff32a39dc9dd512c353d1ced7d7d7e4f6370 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | GstCamera: Watch for zoom and max-zoom property changes in Gstreamer CameraBinMohammed Hassan2019-11-202-1/+35
|/ | | | | | | | Camerabin can signal a change in those properties and we need to communicate those back to the application. Change-Id: Iaa3ce57769c10460821126a467202a6a4139d040 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Raine Mäkeläinen <raine.makelainen@jolla.com>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-081-0/+6
|\ | | | | | | | | | | | | Conflicts: src/multimedia/configure.json Change-Id: Ie887a5f4d718cb3e082b0e2ee996c6687af330cb
| * Gstreamer: also remove features when simplifying capsRatchanan Srirattanamet2019-10-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some element can return caps with same resolution/framerate but different features. gst_simplify_caps() won't de-duplicate this, resulting in duplicated entries for the same resolution/framerate. This commit add calls to also remove features from the caps in addition to setting name to video/x-raw. The GST_CHECK_VERSION macro is added to maintain compatibility with earlier version of Gstreamer without GstCapsFeatures. [ChangeLog][CameraBin] Fixed duplicated entries in supported resolution/ framerate if the underlying element uses caps' features. Change-Id: I15101899eb0369925013ccc1d925afb890a01205 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-011-1/+1
|\| | | | | | | | | | | | | Conflicts: src/multimedia/video/qvideoframe.h Change-Id: I8458c4138be05f661d6528116cbc6b18298f0a91
| * CameraBin: do fetch viewfinder settings even after LoadedStatusRatchanan Srirattanamet2019-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 84d0d87699a2a92b3207beae30a52f25e23acb65 (CameraBin: Postpone fetching supported viewfinder settings) checks if the camera is in LoadedStatus before fetching supported viewfinder settings. However, if viewfinder settings is never requested or not (yet) available during LoadedStatus, it won't try to fetch it at e.g. ActiveStatus. In that case, requesting supported viewfinder settings never works. [ChangeLog][CameraBin] CameraBin plugin now fetches supported viewfinder settings at status higher or equal to LoadedStatus if it has not been fetched. Change-Id: Ibd32c25feac9b1a133945e754d26181937190a24 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-121-3/+4
|\| | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstvideorenderersink.cpp src/gsttools/qgstvideorenderersink_p.h Change-Id: I7fe29161d568fa3f7688abfd2f993d1b16ac3fb9
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-281-3/+4
| |\ | | | | | | | | | Change-Id: I896f59dcbad36c6cebf328a2799b9fe94e72f3d2
| | * CameraBinV4LImageProcessing: Show additional info in case of errorsVaL Doroshchuk2019-08-201-3/+4
| | | | | | | | | | | | | | | Change-Id: I1ed22d646c2ff230217e1ecefaf37a0a45fa4b54 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-171-2/+4
|\| | | | | | | | | | | Change-Id: I09f511d894db5e9987ac2b9e42266bb87ef0161d
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-131-2/+4
| |\| | | | | | | | | | Change-Id: I428528333e89214d96acef5c2ba8ea832b2b145f
| | * CameraBinV4LImageProcessing: Show warning only if the camera is loadedVaL Doroshchuk2019-08-091-2/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ie1c77fa373d37979e69c08ab4a959c18efc9599e Fixes: QTBUG-76135 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Eradicate Java-style iterators and mark the module free of themMarc Mutz2019-07-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Java-style iterators are scheduled to be deprecated, or at the very least banned from use in Qt's own implementation. Ditto for QLinkedList. Change-Id: I5471c293a7a050b92db47f7aeac15dd05bd46650 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | | Prevent immediate-stop of currently-unloading gst recording pipelineMohammed Hassan2019-04-151-1/+1
|/ / | | | | | | | | | | | | | | | | | | Don't blindly stop the recording pipeline if it is unloading. Ensure that we check to see if the pipeline is busy, even if it is in Unloaded state. Task-number: QTBUG-65398 Change-Id: Ieac72967311bdd3bafae60bc1d0da9d227a6c237 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Gstreamer: Add support of avfvideosrc for camerabinVaL Doroshchuk2019-02-081-0/+6
| | | | | | | | | | | | | | | | | | Gst Device Provider now can be used for macOS also. Added support of avfvidesrc element to be used within camerabin. Task-number: QTBUG-72125 Change-Id: I69205649c6e75432534e240656d8cb4748ee10cc Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | GStreamer: support video orientationAlexander Volkov2019-02-011-36/+5
| | | | | | | | | | Change-Id: I233c45824f517c185cb245d8a7d77cab8551fc51 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-221-2/+2
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Icf8b9f73c50b16d6f5765040eb7bd918231df94a
| * Gstreamer: Negotiate default settings before encoding container profileVaL Doroshchuk2019-01-111-2/+2
| | | | | | | | | | | | | | | | In case if container format, video and audio codec are not provided, need to fetch default ones. Change-Id: I616fabc7bf9ec7c7a08a4c5dacad87a1748209f3 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Gstreamer: add support for ksvideosrc within camerabinVal Doroshchuk2019-01-171-2/+9
| | | | | | | | | | | | Task-number: QTBUG-72125 Change-Id: I12bc684a796c6abb6af3a51edca52011495f4ac9 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-044-4/+4
|\| | | | | | | Change-Id: I5394a9d75850771068d43d2509b14a3ac4efcf83
| * GStreamer camera bin service plugin: remove bogus export macrosJ-P Nurmi2018-12-264-4/+4
| | | | | | | | | | | | | | Results to inconsistent DLL linkage errors on Windows. Change-Id: I0aebe05e40dbb4fac130c536849c68dd61aa12fe Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Don't append suggested extension if filename includes extensionChris Adams2019-01-021-3/+8
|/ | | | | | | | | | | | | | | | Commit 6b19a24b581c9c changed the way that the file name is composed for a video recording, so that a suggested extension for the given media format is appended to the file name. That introduced a bug in the case where the correct extension was already part of the output location (filename) set for the sink, by causing a second (and possibly incorrect) extension to be appended to the filename. This commit ensures that if the filename already has a suffix, no suggested extension is appended. Task-number: QTBUG-65402 Change-Id: I0bedf178b7a2aeec89aeb47002e2bae563ed44cd Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Gstreamer: Do not create video profile if no codec providedVaL Doroshchuk2018-11-051-7/+4
| | | | | | | Since camerabin2 requires not empty caps (format) in gst_encoding_video_profile. Change-Id: Iba073138321635a51c9364d54ec95707ccbc7445 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Gstreamer: Fix compiling issue with < 1.1.3 verVaL Doroshchuk2018-11-051-0/+4
| | | | | | | | GST_VIDEO_REGION_OF_INTEREST_META_INFO is available from 1.1.3 Task-number: QTBUG-64178 Change-Id: I70e99775bfa51679df387738924b7b8fabedaae0 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Gstreamer: Set video-profile to CameraBin before GST_STATE_READYVaL Doroshchuk2018-08-221-9/+11
| | | | | | | | | | | | | | | | | | | | CameraBin creates default (application/ogg, video/x-theora) video profile or sets custom defined one, but ONLY on GST_STATE_CHANGE_NULL_TO_READY. If the camera is already loaded then it is not possible to change the video profile. Since a video profile was never defined, video/x-theora was always used to record video. Moved setting video profile before it gets to READY. It fixes an issue with ignoring CameraBinRecorder::applySettings(). This also changes previous behavior when video/x-theora was always used. To apply custom video settings it requires to use QMediaRecorder::setVideoSettings before the camera enters the READY state. Task-number: QTBUG-69895 Change-Id: I3afbf1f8e7c953e2e49e9cad7e96ea0b18a29d1a Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Gstreamer: Fix gst_mini_object_unref: assertion refcount > 0 failedVaL Doroshchuk2018-08-221-1/+0
| | | | | | | | gst_value_get_sample does not return a reference to the sample. Should not call gst_sample_unref. Change-Id: Ibf71e6844b5756d85aac541a68e4e4ae4eefe498 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Gstreamer: Fix crash when resolution or frame rates are requestedVaL Doroshchuk2018-08-221-0/+11
| | | | | | | | When either resolution or frame rates have been requested when the camera is in unloaded state, caps might not have some values. Change-Id: Ie935c62d02e10f762957ecd9f89255ad0e8fbd0b Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Gstreamer: Use gst_parse_launch in QT_GSTREAMER_CAMERABIN_VIDEOSRCVaL Doroshchuk2018-06-201-5/+13
| | | | | | | | | | | QT_GSTREAMER_CAMERABIN_VIDEOSRC can contain pipeline description and not just one video source element. QT_GSTREAMER_CAMERABIN_VIDEOSRC="nvcamerasrc ! nvvidconv" ./app Task-number: QTBUG-60884 Change-Id: Iebf052a6669fd17139b78949ed0bb314f1faef65 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* CameraBin: Postpone fetching supported viewfinder settingsVaL Doroshchuk2018-05-082-40/+43
| | | | | | | | | | | Fetching caps from video source might take sometime and hang ui thread. Currently the caps are fetched when the camera gets ready which produces a hang. Proposed a fix to postpone fetching caps when requested and not when camera loaded. Task-number: QTBUG-67920 Change-Id: I7734ef96c98b2c425714eacc1fd1222fd7ee5c44 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Gstreamer: Emit an error if QCamera::start() failsVaL Doroshchuk2018-03-211-3/+11
| | | | | | | | | | | | | If a camera is not started successfully error() signal has to be emitted. Added emitting an error from video source. Emitted only first error to prevent multiple subsequent errors. Added debug message. Task-number: QTBUG-51825 Change-Id: I6ac936d2728213a4a64f3e4eb25ae2e2f109acca Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Remove unreachable codeJesus Fernandez2018-03-201-2/+0
| | | | | | | | | | | Actions intended to be performed by the unreachable code will never occur. In CameraBinLocks::lockStatus(QCamera::LockType): Code block is unreachable because of the syntactic structure of the code (CWE-561) Coverity-Id: 188406 Change-Id: I55a7ef8e87673519ff4f1ad5677054b34bf66d17 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Replace deprecated qSort() by std::sort()Friedemann Kleint2018-02-281-2/+4
| | | | | Change-Id: I74ffd5bafaef9ebbe7f12600ad831c8deb58ae64 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.10.1' into 5.11v5.11.0-alpha1Liang Qi2018-02-141-5/+2
|\ | | | | | | Change-Id: If65f60670bbfb011363a1b5230253805b3e63553
| * Revert "GStreamer: Prevent calling CameraBinSession::setStateHelper twice"v5.10.1VaL Doroshchuk2018-02-051-5/+2
| | | | | | | | | | | | | | | | | | | | This reverts commit 9caee039533168fbb546b563859770414e54fc94. Reverted due to GST_STATE_PLAYING is never set. Task-number: QTBUG-66196 Change-Id: I85cf47c747b1e153265f2eee6477124f4683a574 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-061-3/+9
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I5acdc7e0bd3729b80522dfff0f388cf2507fb111
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-061-2/+5
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I3d6e69f3f99b2f0a0e2c29ffdd02176e1f22304e
| | * GStreamer: Prevent calling CameraBinSession::setStateHelper twiceVaL Doroshchuk2017-12-141-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since CameraBinSession::setStateHelper() is supposed to handle only pending states, added a fix to prevent calling it twice. Otherwise CameraBinSession::load() can be called few times which might lead an error from gstreamer. Possible call stack: CameraBinSession::setState() CameraBinSession::setStateHelper() CameraBinSession::load() CameraBinSession::setStatus() CameraBinSession::setStateHelper() CameraBinSession::load() << gst_element_set_state is called also twice Task-number: QTBUG-53204 Change-Id: I00c66f91cd3b885c70848245da725ff68943fad2 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * | GStreamer: Emit an error if no input device provided for QCameraVaL Doroshchuk2017-12-051-1/+4
| |/ | | | | | | | | | | | | | | | | Prevents building a camera source if no input device name is provided. And emit an error immediately. Task-number: QTBUG-64155 Change-Id: I509bee1df0acb372d26f45fd27057f8b7e141c2a Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-201-4/+11
|\| | | | | | | Change-Id: Icaf645e271b21320c4cb6269178d9e722092a263
| * Gstreamer: Fix memory leak in CameraBinSessionVaL Doroshchuk2017-11-081-4/+11
| | | | | | | | | | | | | | | | Created GstElement objects m_cameraSrc and m_videoSrc should be unrefed. Task-number: QTBUG-53204 Change-Id: Ibbfd37d928fe87ea899549da7c12fa2386e214cc Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-271-1/+3
|\| | | | | | | Change-Id: Ib509a8c90dd6c7229510a400612cc27a4957d015
| * Fix memory leak in CameraBinImageCaptureChristian Strømme2017-09-291-1/+3
| | | | | | | | | | | | | | | | The element name needs to be released when we're done with it. Change-Id: I650671288bd143551188094b0d934e7da2028a2d Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Replace Q_NULLPTR with nullptrKevin Funk2017-09-272-2/+2
|/ | | | | Change-Id: I3b7601b4a97f8a2b1d2da6ef134f1577846ba713 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-181-3/+32
|\ | | | | | | Change-Id: I7cd203eec77f3b5689c14b81b0862c5b70bab1a6
| * GStreamer: improve the list of default recording formatsYoann Lopes2017-03-301-3/+32
| | | | | | | | | | | | | | | | Add some common codec combinations such as MP4/H.264/AAC or with alternative audio codecs such as MP3 or AC-3. Change-Id: If67c68112d0f170a1391bef750e2bc8fc0d246de Reviewed-by: Christian Stromme <christian.stromme@qt.io>