summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* AVF: Introduce adoption of AVAssetResourceLoaderDelegate protocolVal Doroshchuk2020-02-202-12/+106
| | | | | | | | | | | | | | | | | | | | AVAssetResourceLoaderDelegate allows to load custom resources. Implemented resourceLoader:shouldWaitForLoadingOfRequestedResource to read data from QIODevice. The device should be seekable, and already should have all data available. Since there is a need to know total size of the stream. So the media player will wait for QIODevice::readyRead before loading the resource. Also it requires to have url together with the stream: QMediaPlayer->setMedia(QUrl("does_not_matter.mp3"), buffer); Since the backend uses extension to determine type of the stream. Fixes: QTBUG-69101 Change-Id: I8ab0b69f668ccd67c42a8e5d5c1ad518d3306cce Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-151-2/+3
|\ | | | | | | Change-Id: Ia0c325dc50b9a5a1cdd205609ba688ad9874f297
| * AVF: Only resume playback after a stalled buffer if really neededDominik Holland2020-02-061-1/+2
| | | | | | | | | | | | | | | | | | | | When AVFoundation reports that the media is now buffered, we only should resume the playback if the QMediaPlayer is in the according state. Fixes: QTBUG-81912 Change-Id: Idba30ecf6c9c7b87a1c67896d89faa9a1bceae10 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
| * AVF: Don't use deprecated AVPlayerItem::seekToTime::CMTimeVal Doroshchuk2020-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | AVPlayerItem::seekToTime::CMTime is deprecated since 10.13 Also fixed to use accurate seeking by passing a time value of kCMTimeZero for both toleranceBefore and toleranceAfter. Fixes: QTBUG-81804 Change-Id: Ifafeb1fb5ca66ecba14d77abf315ebe6ffd45eab Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-282-1/+3
|\| | | | | | | Change-Id: Ic6618a0d2e40f7008d766d861f4d2cb0190a94dd
| * AVF: Always lock the capture device when start the cameraVal Doroshchuk2020-01-242-1/+3
| | | | | | | | | | | | | | | | | | | | | | If the viewfinder settings are valid, need to lock the capture device to avoid reseting settings to default values. See also a8123e737140719549252806e0e6a1c121359f79 Fixes: QTBUG-81048 Change-Id: I834815ef6c5ef28d8017d04bdb9d5256c02d1de7 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-212-3/+7
|\| | | | | | | 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>
| * Android: JNI_OnLoad return JNI_VERSION_1_6 instead of JNI_VERSION_1_4Assam Boudjelthia2020-01-201-2/+2
| | | | | | | | | | | | | | | | Update instance of old code using JNI_VERSION_1_4 to make the code consistent. Change-Id: I21a3f7eb43614896536838f83bd5eb6027af64c1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | AVF: Check supported surface's pixel formats to enable glVal Doroshchuk2020-01-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | Supported formats might be changed, thus need to inform the renderer control about this. If gl textures are supported by the surface, the video frames will be rendered to FBO instead of QImage, next time when the update request will be received. Change-Id: I7750def3e943ea2680bb8b83853cb987ab554f00 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-142-3/+1
|\| | | | | | | Change-Id: Ie511ad4ccac1b5bde6686bbe2c391dd175dd3274
| * AVF: Set the stopped state before emitting the status after EOSVal Doroshchuk2020-01-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixed a bug when the media status was changed and emitted, but the state was kept old, this prevented to start playing again in a loop if the loops were requested. This is a regression since 9dbdd5d. Fixes: QTBUG-81122 Change-Id: Id2c7d03a25cc22f7f45c6017d2da0af9bb52e528 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * AVF: Don't apply settings if the camera is not active yetVal Doroshchuk2020-01-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In macOS, a capture session can still automatically configure the capture format after you make changes. If frame rates are applied to the capture device and the camera is still not active, these rates will be overridden by old values when the capture session will be started. For this purpose lockForConfiguration is currently used within startRunning method of capture session. But in case if the settings are already applied to the capture device, we don't call lockForConfiguration within starting of the capture session (since it is needed to be called only when the settings have been changed). Suggesting to postpone setting of the format (to the capture device) until the camera is started. This will lead to apply settings before startRunning method with proper configuration lock. Fixes: QTBUG-81048 Change-Id: I04664e7b63474ce28571e888e524170b995a38d6 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Fix Qt 6 buildSimon Hausmann2019-12-201-1/+1
| | | | | | | | | | | | | | Change-Id: I83986a47f3ba47b978eaea485aa0085124df8fbd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 0e6171203731521fae5459e67420d965e46b7ed6) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-142-1/+6
|\| | | | | | | Change-Id: Ie912379a82447106f7708d09992425da3734e825
| * Merge remote-tracking branch 'origin/5.14.0' into 5.14Qt Forward Merge Bot2019-12-131-0/+3
| |\ | | | | | | | | | Change-Id: I29d8f54569c08b66576ce65737753dc9c3d84ebf
| | * Fix build: don't let X11/Xlib.h's None interferev5.14.0-rc2v5.14.0Thiago Macieira2019-12-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mesa's EGL headers #include <X11/Xlib.h> In file included from /usr/include/X11/Xlib.h:44, from /usr/include/EGL/eglplatform.h:130, from /usr/include/EGL/egl.h:39, from qsgvideonode_egl.h:48, from .moc/moc_qsgvideonode_egl.cpp:10: qurl.h:135:9: error: expected identifier before numeric constant 135 | None = 0x0, | ^~~~ Similar to e16ac8b55c36586aa67b1d4ec5e1b4edf03cd06b (5.4). Change-Id: Ic96c456e54524e25b03ffffd15dcc08f16385cbb Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | Don't load the specialist videonode plugins when using webglAndy Shaw2019-12-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the webgl platform is being used then we do not want to load the videonode plugins because this will cause it to potentially use a backend that is not going to be supported by WebGL. This is due to the fact that it will potentially use extensions to OpenGL (such as the imx6 ones). But since the rendering is not happening on the device, but in the browser then the standard backends will work fine in this case. Fixes: QTBUG-79181 Change-Id: I03021d4ec01d9447dd1ca3815d32a167392ac781 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-072-0/+12
|\| | | | | | | | | | | Change-Id: Ic9ca37f9f5d047cb3addeece5bab7b71ae78ce19
| * | Make the code compatible with future versions of QNX libasoundJames McDonnell2019-12-022-0/+12
| |/ | | | | | | | | | | | | | | Some changes are being made to improve the consistency of the API. Change-Id: Idb4b8ba5d73a5242c25d306dcc7c77e3654ac3b6 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-2017-67/+120
|\| | | | | | | Change-Id: Ib250ceecd02291f752b7775f329f0f494c4aed38
| * Android: Remove usage of qt_androidRequestPermissionVal Doroshchuk2019-11-154-15/+13
| | | | | | | | | | | | | | Use specific function instead, e.g. qt_androidRequestCameraPermission. Change-Id: I925e4d8ac4f1993c073930a79453894dd516d769 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Android: Don't close camera when recording permission is askedVal Doroshchuk2019-11-157-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-142-0/+38
| |\ | | | | | | | | | Change-Id: Ie351f3c36eecf9e83a5b6a55ec0aac27387b5656
| | * Android: Fix fetching video frame data from the GUI thread5.13Val Doroshchuk2019-11-122-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If QAbstractVideoSurface is not used on rendering thread added a way to pass shared opengl context via GLContext surface property. Camera and media players that are created in Qt Quick will usually have their rendering done on the render thread, but the callback for custom video surface(s) (or probes) will usually be handle on the GUI thread, so to make it convenient to for the user to access the frame data, which is rendered on request, we now set-up context sharing and render to a fbo on the calling thread, if needed. Task-number: QTBUG-69333 Change-Id: I4cc5c1f741c82376f1402a047b946b59281c9a4c Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-126-21/+29
| |\| | | | | | | | | | Change-Id: I5b99b3d05502e15373ebaedcad06d6ab4d25d387
| | * opensl: support android voice comm preset in order to trigger aecBrad Davis2019-11-113-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | OpenSL ES support acoustic echo cancellation via the SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION preset, but this isn't exposed through Qt's wrapping layer. This change exposes new Qt constants to enable the use of this feature Change-Id: Ie64a949313b5a5b35d24159d3549290893ce32dd Fixes: QTBUG-70368 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
| | * AVFMediaAsserWriter: remove deprecated declrationTimur Pocheptsov2019-11-053-20/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interface in headers should not contain i-var declarations, these days it must be in implementation part. Also, replace quite suspicious 'load' with 'loadAquire' to pair 'storeRelease'. Since I have QT_USE_NAMESPACE in *.mm file, no need in ugly QT_PREPEND_NAMESPACE macro anymore. Change-Id: Ia19e3c5b68687030c97e8e8e982ae89627e909f9 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
| * | Merge remote-tracking branch 'origin/5.13' into 5.14v5.14.0-beta3Qt Forward Merge Bot2019-11-052-23/+19
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I255dc22dc21d3629a41a8c2ae2076c48b594e626
| | * ALSA: Calculate buffer size based on min period timeVaL Doroshchuk2019-11-041-19/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When defualt buffer size (100000us) and period time (20000us) are out of range, currently buffer size is computed with respect of either 2 or 4 chunks of maximum buffer time. Which is not enough. Fixing computing of buffer time based on minimum period time: How many minimum periods could fit in maximum suggested buffer time. Fixes: QTBUG-43256 Task-number: QTBUG-79526 Change-Id: I722e5145e3b6d323e306da420ec764db3575225f Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * Qt Mumtimedia - fix build for iOSTimur Pocheptsov2019-11-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since RestrictedBool conversion operator was introduced, objective-C method calls require explicit .data() on our smart pointers. Fixes: QTBUG-79686 Change-Id: Ie32ebf0442cd56a01466aa58b89651d7c293de6d Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@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>
* | | Introduce QVideoFrame::image()VaL Doroshchuk2019-10-313-6/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-153-2/+15
|\| | | | | | | | | | | | | | | Conflicts: src/multimedia/video/qvideoframe.cpp src/plugins/directshow/player/directshowplayercontrol.cpp Change-Id: I00840245e35861cf4fe1d62789815ca125b2052a
| * WinRT: Ignore media in MediaPlayer only if stream is not changed tooVal Doroshchuk2019-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | When qrc media content is set, it allocates and opens QFile. If the same content is set again, the url remains the same, but it creats new QFile, and need to update by new stream. Change-Id: Iee6c50135bb8304177affbe70b27d24898fc5b5c Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
| * DirectShow: Fix crash when media in qrc is set twiceVal Doroshchuk2019-10-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | When qrc media content is set, it allocates and opens QFile. If the same content is set again, the url remains the same, but it creats new QFile, and need to update DirectShowIOReader by new stream. Change-Id: If3f5c187c4e2987e1a593b45f9a46c3c1b77ce45 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
| * AVF: Emit StalledMedia when unbuffered and resume playback afterwardsVaL Doroshchuk2019-10-081-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | If remote source is requested to play but there is a limitation in network bandwidth, StalledMedia status is never emitted, also the playback is not resumed after buffer gets full again. Based on AVPlayerItem.playbackLikelyToKeepUp introduced changing the media status and resuming the playback. Task-number: QTBUG-49806 Change-Id: If8aa10a1ea2cee2a40c679871b836d2dca622fcd Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-085-8/+32
|\| | | | | | | | | | | | | Conflicts: src/multimedia/configure.json Change-Id: Ie887a5f4d718cb3e082b0e2ee996c6687af330cb
| * Fix build with ALSA in non-system locationJoerg Bornemann2019-10-071-1/+1
| | | | | | | | | | | | | | | | This amends commit f0ea2641. Fixes: QTBUG-79014 Change-Id: Ib04d844ef64e335785408dc8d7e512a5a3651655 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
| * imx6: Fix mapping VPU texture using real physical address of dataVaL Doroshchuk2019-10-022-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Get real physical address of video frame data and provide it to imx6 vivante videonode to prevent memory leak from kernel. By default qtmultimedia does not depend on gstreamer-imx, but the plugin should exist on imx platform. So gstreamer_imxcommon will be disabled. And should be manually enabled in yocto receipt. Change-Id: I6e75746a2ba651d12bdd7697ae483699aad450fc Fixes: QTBUG-73084 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
| * 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>
| * DirectShow: Don't seek if playback is stoppedVal Doroshchuk2019-10-011-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the playback is already stopped, and after that new position is requested twice, e.g. stop(); setPosition(0); setPosition(0); this causes the playback to start. Need to postpone setting of new position until play is requested. Also no need to emit positionChanged when position is not changed. Fixes: QTBUG-68778 Change-Id: Ib62942ee155d9c8ed2310132dcc6b501dfef1a04 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| * DirectShow: Emit media status before errorVal Doroshchuk2019-10-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Media status should be emitted before any error. Since error can cause changing the media and changing to new media status. Fixes BFAIL : tst_QMediaPlayerBackend::playlistObject() Compared values are not the same Actual (mediaStatusSpy.count()): 4 Expected (6) : 6 Task-number: QTBUG-46368 Change-Id: I8eb82e7a551d78abd143baa594cfda9bacd7e544 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Small performance improvements suggested by clang-tidyAlbert Astals Cid2019-10-074-6/+6
| | | | | | | | | | | | | | | | * 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-014-2/+24
|\| | | | | | | | | | | | | Conflicts: src/multimedia/video/qvideoframe.h Change-Id: I8458c4138be05f661d6528116cbc6b18298f0a91
| * DirectShow: Implement QMediaVideoProbeControl->flushVal Doroshchuk2019-09-273-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | Need to flush when at least one frame is probed and stop is called, EOS or QMediaPlayer is destroyed. Fixes BFAIL : tst_QMediaPlayerBackend::probes() '(probeHandler.isVideoFlushCalled)' returned FALSE. () Task-number: QTBUG-46368 Change-Id: I09ebd6608c9a1b8a0a0707d83200d75ddb435734 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
| * 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-1215-52/+86
|\| | | | | | | | | | | | | | | 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>
| * DirectShow: Allow QMediaPlayer in secondary threadVal Doroshchuk2019-09-094-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since using of any COM objects must be only after CoInitialize(), otherwise CoCreateInstance() returns nothing which causes a crash. If QMediaPlayer is moved to another thread, loading of any content will also cause a crash because of COM is not initialized. Proposing to use thread_local ref counter to keep each thread initialized and avoid double initialization. Fixes: QTBUG-77163 Change-Id: I81c67d6407b853c824edd3b42454fddf792fd90c Reviewed-by: Christian Strømme <christian.stromme@qt.io>