summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-05-291-4/+1
|\
| * 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>
* | | GStreamer: Add missing include for QStandardPathsVaL Doroshchuk2020-05-281-0/+1
|/ / | | | | | | | | Change-Id: If458b16be7a7a8b3f6e8e3bb74391774b41bc884 Reviewed-by: Liang Qi <liang.qi@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>
* | Small performance improvements suggested by clang-tidyAlbert Astals Cid2019-10-072-4/+4
| | | | | | | | | | | | | | | | * Add const & to function parameters * Add const & to variables assigned from functions returning const & Change-Id: Idc141bd48f37eae92a4d1775caade3c977a42391 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-126-29/+21
|\| | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstvideorenderersink.cpp src/gsttools/qgstvideorenderersink_p.h Change-Id: I7fe29161d568fa3f7688abfd2f993d1b16ac3fb9
| * GStreamer: Use member initializationVaL Doroshchuk2019-09-105-26/+17
| | | | | | | | | | | | Change-Id: I96026828c357677c84e880ea85e6e82b8c0495c7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * 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>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-306-64/+3
|\| | | | | | | | | | | Change-Id: I329eeefafed87ff7467d21d5d099cf9897660167
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-07-236-64/+3
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/directshow/player/directshowplayerservice.cpp Change-Id: I482098bb3c3b5b291175ca798b0d6ba61ad87d86
| | * GStreamer: Implement fetching audio/video codecs by containerVaL Doroshchuk2019-07-176-64/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved stream types to QGstCodecsInfo and added possibility to fetch audio or video codecs by a container. Or fetch containers by audio or video codec. It would allow to debug supported codecs and containers: QGstCodecsInfo containers(QGstCodecsInfo::Muxer); QGstCodecsInfo audioCodecs(QGstCodecsInfo::AudioEncoder); for (auto &container: containers.supportedCodecs()) qDebug() << audioCodecs.supportedCodecs(containers.supportedStreamTypes(container)); Change-Id: I26bf5579db6974a166d408c4865a9ffe314e3e15 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Eradicate Java-style iterators and mark the module free of themMarc Mutz2019-07-044-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Remove the mirclient code as this is no longer availableAndy Shaw2019-02-191-10/+0
|/ / | | | | | | | | | | | | | | Fixes: QTBUG-73878 Change-Id: Ia178d41a3e152174865264c71a75e84cfc31462a Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Gerry Boland <gerry.boland@canonical.com> 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-012-36/+13
| | | | | | | | | | 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-045-5/+4
|\| | | | | | | Change-Id: I5394a9d75850771068d43d2509b14a3ac4efcf83
| * GStreamer: remove unnecessary <unistd.h> includesJ-P Nurmi2018-12-261-1/+0
| | | | | | | | | | | | | | This makes it possible to build the GStreamer backend on Windows. Change-Id: I5b705524072d8bd89a7c9b834201b97e0d01d6cc Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
| * 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: Emit stateChanged(StoppedState) when recording is finishedv5.12.0-beta1VaL Doroshchuk2018-09-282-3/+3
| | | | | | | | | | | | | | | | | | | When stop is requested, the state becomes QMediaRecorder::StoppedState and stateChanged() is sent immediately, also the status is changed from QMediaRecorder::RecordingStatus to QMediaRecorder::FinalizingStatus. But since stopping is asynchronous QMediaRecorder::StoppedState is sent before recording has been fully finished. When EOS is received from gstreamer and recording has been fully stopped, the status will be changed from QMediaRecorder::FinalizingStatus to QMediaRecorder::LoadedStatus and only in this case. So fixed to send stateChanged(QMediaRecorder::StoppedState) right after LoadedStatus. Task-number: QTBUG-69402 Change-Id: Ic7429a4bfea6b1f443a105a0540737072ad42de2 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-08-301-10/+22
|\ | | | | | | Change-Id: I3a41fab753e5a06fc9f30464edf7d6626e7ae92a
| * 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: Allow to use gst specific featuresVaL Doroshchuk2018-08-298-2915/+4
|/ | | | | | | | | | | | | | Gstreamer implementation is located in a plugin. In case if there is a need to use some internal features QGstreamerPlayerControl and QGstreamerPlayerSession have been moved from plugin to QtMultimediaGstTools library. It allows to request media player control from QMediaService and use it as QGstreamerPlayerControl. Change-Id: I8e45480c4cd718b90b90d14a42bc56f6f924eae5 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>
* Gstreamer: Show warning on error from QGstreamerRecorderControlVaL Doroshchuk2018-05-081-0/+3
| | | | | | | | | | | Need to show errors returned from QGstreamerRecorderControl. Also if QGstreamerCaptureSession emits an error this error will be proxied to QGstreamerRecorderControl and back to QGstreamerCaptureSession to show it. Task-number: QTBUG-67706 Change-Id: I285a968b15a4cc8ab1e8e99e83f8dd7e2659a1d1 Reviewed-by: Christian Stromme <christian.stromme@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-282-4/+8
| | | | | Change-Id: I74ffd5bafaef9ebbe7f12600ad831c8deb58ae64 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>