summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer
Commit message (Collapse)AuthorAgeFilesLines
* Add QT_GSTREAMER_CAMERABIN_VIDEOSRC environment variable.Yoann Lopes2014-10-301-2/+34
| | | | | | | | | It can be used to set which video source element should be used by the camerabin. Change-Id: I8d1cd8c4ba6fe5a89817699f645b0997e713aaca Reviewed-by: Samuli Piippo <samuli.piippo@digia.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* GStreamer: fix QMediaRecorder::duration() when recording with a camerav5.4.0-beta1Yoann Lopes2014-10-031-6/+14
| | | | | | | | | | To get the recording duration, we were using the camerabin's position, which represents the time since it was started, not the time it's been recording to a file. We now retrieve the camerabin's filesink position. Change-Id: I68eeb25d1718666288655d22deea23e25de73b90 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* GStreamer: fix artist-related metadata keys.Yoann Lopes2014-09-261-2/+4
| | | | | | | | QMediaMetaData::AlbumArtist now maps to GST_TAG_ALBUM_ARTIST and QMediaMetaData::ContributingArtist to GST_TAG_ARTIST. Change-Id: Ifa2cb90ee8ae09beaee572ad113c05776e699432 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* GStreamer: fix QMediaPlayer metadata signals.Yoann Lopes2014-09-261-0/+5
| | | | | | | | - metaDataAvailableChanged was never emitted - metaDataChanged was not emitted when clearing the current media Change-Id: Ide05056450171a87aeb018be7e0bdea136341946 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Ensure pre-roll frames are displayed when gstreamer backend is paused.Andrew den Exter2014-09-122-56/+46
| | | | | | | | | | | | Perform a seek before transitioning from the stopped state to paused or playing to force the pipeline to resupply the video sink with any pre-roll buffer it may have previously ignored during loading. And don't assume showPrerollFrames to be true if the current state is not stopped as the policy handling may have prevented an effectual state change. Change-Id: I288a70bc4da32f3534eab4b14702ca8f8fdb4222 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Implement encoder settings in camerabin backend.Andrew den Exter2014-09-116-0/+111
| | | | | | | | | | This is not comprehensive since different encoders have different names and representations for many settings, but it should cover bit rate for most encoders, and quality and encodingMode for a number of common encoders. Change-Id: I0ba4e70c2f234e0deaaa02bdecc0f5198122c1e9 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Fix V4L usage.Yoann Lopes2014-09-092-9/+0
| | | | | | | | | ff527de0 was submitted to 5.3 while cddbe873 was submitted to 5.4. The former's behavior was not preserved when 5.3 got merged into 5.4. Change-Id: I7435ea30634001ae6e87c316eb8a8ab6f5e988e3 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-015-10/+27
|\ | | | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstreamervideoinputdevicecontrol.cpp src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp Change-Id: Ic854589562d2deeaa0ebf75840cb8a2ee32e99de
| * Detect V4L availabilityLisandro Damián Nicanor Pérez Meyer2014-08-186-10/+32
| | | | | | | | | | | | | | | | | | | | Do not build related stuff if not found. Makes GStreamer support available on Hurd. Task-number: QTBUG-39762 Change-Id: I1f70b6975e5bef99ab2441aac4d90508bc8b64bd Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-2492-1744/+1008
| | | | | | | | | | | | | | | | | | - 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>
* | Provide face and orientation info from gstreamer camera backend.Andrew den Exter2014-07-1211-205/+247
| | | | | | | | | | | | | | | | | | | | Cleans up duplicate device enumeration code so the devices listed by the QMediaServiceProviderPlugin are the same as those in the QVideoInputDeviceControl and includes face and orientation information if available. Change-Id: Iaa4c303c973bcf3e0f7c8c2fd7a7de629bccec86 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-103-4/+17
|\| | | | | | | Change-Id: I38ebcb3da0e4d2acc9e7108c9579ea98323864e0
| * GStreamer: correctly handle URLs from QMediaRecorder::setOutputLocationYoann Lopes2014-07-032-3/+16
| | | | | | | | | | | | Task-number: QTBUG-39949 Change-Id: Idf575b126bd3531655c8abda55c9e04149a4fb85 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
| * GStreamer: fix looping a media when it's loaded from qrc.Yoann Lopes2014-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When playing a media for the second time, the backend resets the the media by calling setMedia() with the same value. The problem is that setMedia() clears the previous media, which is a QFile in this case and is the one we are trying to set again... The QFile was deleted, causing the current media to be a dangling pointer. Change-Id: I6854b40212fd084d1e31e756a040a02ad103b7ba Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | Implement customFocusPoint in camerabin backend.Andrew den Exter2014-07-104-7/+141
| | | | | | | | | | | | | | | | | | | | | | | | Send a regions-of-interest event containing a rectangle surrounding the focus point to the camera source when the camera's focusPointMode is QCameraFocus::CustomFocusPoint. Reset the regions-of-interest if the focusPointMode changes to any other value. [ChangeLog][GStreamer] Implement customFocusPoint in camerabin backend. Change-Id: If75405733b18d476dff5467abae3f08271caf06a Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Fix stuttering with RTSP streams.Andrew den Exter2014-06-261-0/+1
|/ | | | | | | | | Set the rtspsrc buffer-mode to 'slave' which is the default in gstreamer 1.0 and doesn't cause the stuttering apparent with the default buffer mode. Change-Id: I4241fbe638c176ad93f441a3f76a1041ef1cb6bb Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix static initialization order fiasco in some plugins.Yoann Lopes2014-06-064-274/+257
| | | | | | | | | Some static variables were initialized using QMediaMetaData values, which are also statically initialized. Task-number: QTBUG-39202 Change-Id: Ibedc0a77d96cdfa575aad122c4ec654e6830e1f7 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* GStreamer: disable clock syncing in video sink for live sources.Yoann Lopes2014-05-091-0/+1
| | | | | | Task-number: QTBUG-38465 Change-Id: Icdf2df36b9b3c09dd047e60ac24e221a3d233c6f Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* GStreamer: correctly get metadata from live sources.Yoann Lopes2014-04-092-23/+11
| | | | | | | | | | For some unknown reason, "iradio-mode" was set to false on the source element, which was preventing new metadata to be received when playing live streams. Task-number: QTBUG-37640 Change-Id: Ib90297e81e26a99c3dfc753bdcd5cbd1ee2f6764 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* GStreamer: cleanup system includes.Yoann Lopes2014-04-077-76/+8
| | | | | | | | | | | | Replaced some linux includes with <private/qcore_unix_p.h> to be more portable. Use qt_safe_open() and qt_safe_close() instead of ::open() and ::close(). Task-number: QTBUG-38061 Change-Id: Idb3f50d070ec1701cafba98e79e2e85824653a3a Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* GStreamer: each QMediaPlayer now has its own volume by default.Yoann Lopes2014-04-032-13/+49
| | | | | | | | | | | | | | | | | | | | | | | | We were using the volume property of GStreamer's playbin element to set the volume. This could behave differently depending on the system configuration; it could affect the system volume or the media player own audio stream. We now use a 'volume' element to do software attenuation on the audio data sent to the audio sink, it allows each QMediaPlayer to always have its own volume. To preserve the previous behavior, developers can set the QT_GSTREAMER_USE_PLAYBIN_VOLUME environment variable to true. [ChangeLog][QtMultimedia][GStreamer] QMediaPlayer::setVolume() doesn't change the system volume anymore (it could be the case before depending on the system configuration). Set the QT_GSTREAMER_USE_PLAYBIN_VOLUME environment variable to true to restore that behavior. Task-number: QTBUG-30317 Task-number: QTBUG-36511 Change-Id: Ia0249962a74ac21fb110fcb634c08706f8d5767a Reviewed-by: Wouter Huysentruit <wouter_huysentruit@hotmail.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* fix: 'm_state' was not declared in this scopeZhang Xingtao2014-03-281-1/+1
| | | | | | | | | Error occurred when building with DEBUG_PLAYBIN defined. It should be m_currentState from context. Change-Id: Iad59966ca19c9d1b589fc8641599494436a0a5f3 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Jing Bai <doris.bai@gmail.com>
* GStreamer: fix memory leaks.Yoann Lopes2014-03-2112-34/+96
| | | | | | | Many GStreamer objects were not properly managed or never released. Change-Id: I38b3854e8b9e2264b5b647f331d3bb16b886e2d6 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* GStreamer: don't try to seek when it's not supported.Yoann Lopes2014-03-211-2/+2
| | | | | | | This eliminates warnings on the console. Change-Id: I6a0509dba4a0f7ec6fad33f8803be746f425a616 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* GStreamer: Remove tags when an invalid QVariant is assigned.Andrew den Exter2014-03-062-8/+15
| | | | | | | | | | Clear the tag list before syncing with reference set so old values are removed and explicitly remove invalid QVariants from the reference set so that the type correction doesn't result in invalid values being written instead. Change-Id: I7d1bdc95cd2a2d601720db84c9b3ef629477bc99 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* New QCameraInfo class.Yoann Lopes2014-02-284-0/+40
| | | | | | | | | | | | | | | | | | | | The class allows to get the list of available cameras on the system as well as getting some static information about them such as their unique ID, display name, physical position and sensor orientation. This makes QCamera::availableDevices() and QCamera::deviceDescription() obsolete. This patch contains the API, documentation and auto-tests but not the actual implementation by each backend (except for retrieving the default camera device). [ChangeLog][QtMultimedia] Added new QCameraInfo class [ChangeLog][QtMultimedia] QCamera: availableDevices() and deviceDescription() are deprecated, use QCameraInfo instead Change-Id: I64fd65729ab26a789468979ed5444ee90bb82cd0 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-121-57/+74
|\ | | | | | | Change-Id: Ie93615076177662e75d46f3d13beeb88d424b4a6
| * Add meta-data mappings for GPS and camera make and model to camerabin.Andrew den Exter2014-02-101-2/+9
| | | | | | | | | | | | | | This enables writing gps positioning information to captured images. Change-Id: I663f7b94b5e6040865358df1ae45d67b73c54f92 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
| * Fix gstreamer crash when meta-data is of incorrect type.Andrew den Exter2014-02-101-56/+66
| | | | | | | | | | | | | | | | | | | | | | GStreamer tags are typed and the correct type must be used when inserting a value into a GstTagList or subsequent merges or data accesses can crash because of invalid casts. Found while adding additional mappings for GPS values. Change-Id: I95ab40a480a4685bf4e69064315557faa9de288e Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Normalize signal & slot signatures in connectionThiago Macieira2014-02-033-4/+4
| | | | | | | | | | | | | | Profiling shows Qt Creator spends 2% of its load time normalizing Change-Id: I1a4bef16be79ced35c47da865153ebe1bee22f9c Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Yoann Lopes2014-01-3011-93/+367
|\| | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-01-2211-93/+367
| |\ | | | | | | | | | Change-Id: Ifcb0e0bac29c11980ea2a9d67b12e1b79c4bd9f6
| | * Fix incorrect/missing application of recording settings in camerabin.Andrew den Exter2014-01-175-17/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't set profiles if no settings are specified. Apply all settings before starting a pipeline as the mode can switch without being restarted and incompatible video recording settings can prevent the pipeline starting even in image capture mode. Set audio encoding settings and encoder profiles if they are supplied. Change-Id: I06febf977c2cae306383f9dbaae0f81f531b4757 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
| | * Fix writing orientation and date exif tags in camerabin.Andrew den Exter2014-01-172-4/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Orientation tags need to be transformed from the string tag returned by gstreamer to the orientation in degrees. Date tags need to be inserted with gst_date_time_new_local_time. Finally setting a tag value shouldn't clear all other tags. Change-Id: I28922148251084c12cf6c93d9b097fa5df41da9d Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
| | * Remove workaround for resolved gstreamer bug.Andrew den Exter2014-01-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reloading the capture pipeline before recording is unnecessary and introduces a big pause. Don't do it. https://bugzilla.gnome.org/show_bug.cgi?id=649832 was resolved in gstreamer 0.10.23 Change-Id: I0de02af52dcc193bce7a4e3e61407ae1c2d3818c Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
| | * Allow the user to specify the viewfinder resolution instead of guessingAndrew den Exter2014-01-176-71/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Guessing badly prevents the camerabin pipeline from loading at all and the fallbacks used are not representive of the capabilities of most cameras. So either stay out of the process and let gstreamer negotiate a resolution if it can, or use a resolution supplied through the viewfinder settings control by someone hopefully better informed. Task-number: QTBUG-30842 Change-Id: Iec2dcc2476f38822f9e0d02301e46a1f49b7c6da Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | | whitespace fixesOswald Buddenhagen2014-01-304-5/+5
|/ / | | | | | | | | | | | | | | remove trailing spaces & expand tabs. Change-Id: I05ef110abed90f13b47752760ffb4567a11a6a5e Reviewed-by: Yoann Lopes <yoann.lopes@digia.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* / Use QStringRef instead of QString whenever possible.Jędrzej Nowacki2014-01-153-3/+3
|/ | | | | | | That way we reduce count of temporary QString instances. Change-Id: Id806c68ea616828c2355c07b8576616fa6a8da17 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Only acquire resources as required in gstreamer backend.Andrew den Exter2014-01-1311-24/+105
| | | | | | | | | | | Make resources required for capture optional and disable just the capture features if they are not available, so the camera viewfinder can be displayed and images captured without blocking the music playback and the other way around. Change-Id: Ic9692195156d994ccd4a911ae41d2242a00d575b Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Fix playback with exotic gstreamer pipelines.Andrew den Exter2014-01-131-1/+7
| | | | | | | | | | Extend the list of raw video formats, and allow the playbin flags to be overridden by an environment variable when the default isn't suitable for whatever reason. Change-Id: I4c7d821b0ce29f5ad2dc0341e378ffd17c489e98 Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Fix configuration of camera settings in camerabin backend.Andrew den Exter2014-01-133-5/+44
| | | | | | | | | Enable gstphotography interfaces if the compile check passes, and implement missing pieces of whitebalance and focus configuration. Change-Id: Icd24dfd148204f8d8218176593c3120427a13e1e Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Allow the camerabin source selection to be overridden.Andrew den Exter2014-01-133-44/+54
| | | | | | | | | | | Prefer the default camera-source element if there is one or an element identified by an environment variable to a static list of possible elements which may not be appropriate for the target environment. Change-Id: I53816c949307953780f9046eb11e09effe059be0 Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Andy Nichols <andy.nichols@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* GStreamer: add missing breaks in QGstreamerRecorderControl.Yoann Lopes2014-01-061-0/+3
| | | | | | Task-number: QTBUG-34914 Change-Id: I8237201cb656a3cde23e3d750939fe11e35519cd Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Some cleanup in the GStreamer plugin.Yoann Lopes2013-09-207-38/+29
| | | | | | | | | | | | Removed QGstreamerVideoOverlay and related classes. It was used as 'Window' control but performs worse than QGstreamerVideoWindow which does basically the same thing using GStreamer ready-made components instead. Removed X11 dependencies and related configuration tests. It was only needed for QGstreamerVideoOverlay. Change-Id: I2ad2636ccf0060e56cd64f3d9e5b3c24dc75f5a3 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Change libresourceqt's .pc file.Robin Burchell2013-08-051-1/+1
| | | | | | | | The one public port of this library to Qt 5 changed the .pc to libresourceqt5, to avoid clashing with the Qt 4 version. Change-Id: I6a248606e20c4e7a8f432612ca00aded846264d9 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Multimedia plugins now have a unique JSON metadata 'Keys' property.Yoann Lopes2013-06-216-6/+12
| | | | | | | | | | | | | | | | | | | | | They previously had the multimedia services they provided as keys. This was a problem when several plugins were available on the same platform, providing the same multimedia service, but with different features or capabilities. Since they had the same key, only the first plugin in the directory was loaded. Nevertheless, it was actually working until commit 732dcfe7 in qtbase, as all plugins were loaded even when sharing the same key. The services a multimedia plugin provides are now declared in the 'Services' property. To preserve compatibility with third-party plugins, if that new property doesn't exist it falls back to the 'Keys' property. Task-number: QTBUG-31868 Task-number: QTBUG-31476 Change-Id: Ic3ba32eeef21b69b922bd3d4feb111101559d132 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Decouple qmediametadata.h from qmultimedia.hSze Howe Koh2013-05-145-0/+7
| | | | | | | | qmultimedia.h is included in more places, but qmediametadata.h is larger. This patch should reduce unnecessary #include-ing. Change-Id: I4a3d174bafc555d794bb75087c1f6b79745ae903 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Fix crash on idle status change with 64 bit architectures.Andrew den Exter2013-04-171-1/+1
| | | | | | | | | | bool and gboolean are not necessarily the same size on all architectures, and if gboolean is larger than bool then passing it as an argument to g_object_get can trash the stack. In this case overwriting some of the session pointer. Change-Id: Iaa7be6a327e9f69212bd7d5bb372d33f2026db0f Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Fix warnings in qtmultimediaThiago Macieira2013-04-032-1/+3
| | | | | | | | | /camerabinresourcepolicy.cpp:100:42: error: unused variable 'oldSet' [-Werror=unused-variable] camerabincontrol.cpp:167:54: error: 'resourceSet' may be used uninitialized in this function [-Werror=maybe-uninitialized] qaudiooutput_pulse.cpp:416:20: error: unused variable 'bytesWritten' [-Werror=unused-variable] Change-Id: Idafd85b7985673f1f22d868b5f1b1e46a60ada4a Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* GStreamer: fixed build when using GST_PHOTOGRAPHY.Yoann Lopes2013-02-2812-185/+328
| | | | | | | | | | | | CameraBinExposure was reimplementing the Qt4 version of QCameraExposureControl instead of the refactored version of Qt5. Zoom features were still handled in CameraBinFocus but these have been moved to their own control in Qt5. Task-number: QTBUG-29300 Change-Id: I0c71cac6011137bc5457f0d362da44c72039004a Reviewed-by: Christian Stromme <christian.stromme@digia.com>