summaryrefslogtreecommitdiffstats
path: root/src/plugins/winrt
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-151-1/+1
|\ | | | | | | | | | | | | | | 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>
* | Remove usages of deprecated APIsSona Kurazyan2019-08-081-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace the usages of deprecated APIs by corresponding alternatives. - Made the tests for deprecated APIs to compile conditionally, based on the deprecation version. Task-number: QTBUG-76491 Task-number: QTBUG-76540 Task-number: QTBUG-76541 Change-Id: Ifd397dae9b3ebc2ba2504db7baa2d8ff21bfb3a7 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Deprecate canonicalUrl and canonicalRequest in QMediaContentVaL Doroshchuk2019-05-131-1/+1
|/ | | | | | | | | | | Since QMediaContent can contain only one content and media resources are already deprecated, canonicalUrl and canonicalRequest are a bit confusing and outdated. Deprecated and replaced by QMediaContent::request() which already contains the url. Change-Id: I418006e112f49466b0129bf1e6e1ae629c714538 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* winrt: Use highest supported resolution for camera preview/image captureOliver Wolff2019-03-282-7/+18
| | | | | | | | | | | Using the lowest supported resolution yields ugly results and has weird side effects (green bars). If no resolution is explicitly given, we should use the maximum supported solution for preview as well as capture. Task-number: QTBUG-72874 Change-Id: Ie0fae65180e66156c6de468f2cabb9122fe665ba Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* winrt: Fix clang warningsOliver Wolff2018-09-0620-92/+90
| | | | | | | | | | | Fixed warning: - 0 as nullptr constant - missing override - change of signedness - non portable path to header file Change-Id: I75a7d8de45099e39eb46feed2350117b2e1995c3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* winrt: Obtain new camera sample format and size on camera changeOliver Wolff2018-06-223-0/+11
| | | | | | | | | | | | By Resetting d->cameraSampleformat to Format_User when the selected video device is changed we make QWinRTCameraVideoRendererControl reobtain the camera sample format and size during the next call of queueBuffer. This is needed as the new camera might have other values for these, which might result in a white screen after a camera change. Task-number: QTBUG-67417 Change-Id: I29e28ddf4fc278aff00ad824bda61aedad91471d Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* WinRT: Add ref to prevent seg faultVal Doroshchuk2018-05-041-0/+1
| | | | | | | | | | If IMFMediaSink is returned from IMFStreamSink needs to add ref because caller will release it. Task-number: QTBUG-68054 Change-Id: I6d1732f7873e09f742c072380673a08ad86fe73a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* WinRT: Keep camera as uninitialized when errorVal Doroshchuk2018-05-031-1/+1
| | | | | | | | | | | If initialization of camera finished with an error no need to report that camera is initialized successfully. Using camera in this case might lead to some segfaults and other errors. Task-number: QTBUG-68054 Change-Id: I6a197989c2b44454a8594ff19b8c03fb08f57c7e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Fix rotation of camera imageOliver Wolff2018-04-252-24/+32
| | | | | | | Task-number: QTBUG-63014 Change-Id: I6afacdb31f13a9e95784afaab90029a77f9fabfc Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Do not use CoTaskMemFree as image cleanup functionOliver Wolff2018-04-241-1/+7
| | | | | | | | | | | | | | | CoTaskMemFree is declared __stdcall. This declaration causes a stack maintenance behavior (called function pops its own arguments from the stack) that breaks release builds and leads to crashes. By wrapping that function into our own function (which is by default __cdecl) we get the wanted stack maintenance behavior (calling function pops arguments from the stack) and thus avoid these crashes. Task-number: QTBUG-63016 Change-Id: Ibd36f4fc2680351bf41c2991e9b3f1723bb19eab Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* WinRT: Fix white screen for camera outputVal Doroshchuk2018-04-241-7/+12
| | | | | | | | | | | | | | Starting with Direct3D 11.1 GetSharedHandle is not recommended to be used. Instead IDXGIResource1::CreateSharedHandle should be used to get a handle for sharing. It returns NT handle and needs to call CloseHandle. GetSharedHandle fails with E_INVALIDARG seems due to a handle is not shared. Task-number: QTBUG-67417 Change-Id: Ib28acb8edbf737e84f5eef91e7a3a88b2f022bcb Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* WinRT: Read data in callback to prevent deadlockVal Doroshchuk2018-04-232-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | When playing mp3 with QMediaPlayer and seeking is performed (IMFMediaEngineEx::SetCurrentTime) and also IMFByteStream::BeginRead is already done (actual data has not been read yet) but IMFByteStream::EndRead is not called. There would be a possibility to get a deadlock when the playback gets stuck. Possible problem call flow: 1. BeginRead is called 2. Queue finishRead and postpone it 3. SetCurrentTime to new position (is called on event loop) 4. finishRead is called 5. EndRead is called As a result MF_MEDIA_ENGINE_EVENT_SEEKING is received but MF_MEDIA_ENGINE_EVENT_SEEKED is never received. Proposing to read data directly from BeginRead callback and avoid possibility to seek when data is not read yet. Task-number: QTBUG-67614 Change-Id: I809e5df1c05de8014ebd0a48fd008a291f39433c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Replace deprecated qSort() by std::sort()Friedemann Kleint2018-02-281-3/+4
| | | | | Change-Id: I74ffd5bafaef9ebbe7f12600ad831c8deb58ae64 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-194-152/+178
|\ | | | | | | | | | | | | Conflicts: src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.h Change-Id: Ic6e27742ef6d1af0532ad05902a1431ebd5f449d
| * Ask for camera permissionsOliver Wolff2017-09-262-119/+163
| | | | | | | | | | | | Task-number: QTBUG-63308 Change-Id: Ic66d5d50b026350cf03afc19c58fc7c93029a69a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * winrt: Use QMutex instead of criticalSectionsOliver Wolff2017-09-253-33/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | critical sections are really unpredictable when it comes to order of activation. It was possible that the loop in QWinRTAbstractVideoRendererControl's syncAndRender blocked its setBlitMode for up to 30 seconds on application start. During this time the camera screen just stayed black. The whole approach seems to work a lot better when QMutexes are used. Task-number: QTBUG-63015 Change-Id: Ib1b0fa1da35fe299896068146254e4cf1d9616fb Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Replace Q_NULLPTR with nullptrKevin Funk2017-09-275-12/+12
| | | | | | | | | | Change-Id: I3b7601b4a97f8a2b1d2da6ef134f1577846ba713 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-2217-114/+114
|/ | | | | Change-Id: I17b3650a3df5688274151c1f2c4629e4a5062028 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* winrt: Fix video playback without autoplay enabledMaurice Kalinowski2017-03-211-1/+5
| | | | | | | | | | We have to ensure that a device handle is present and valid when calling setSource. Otherwise the engine switches into an error state when trying to continue loading. With autoPlay enabled that implicitly happened. Task-number: QTBUG-58152 Change-Id: Id504efd9b1b77b418ae05baed3ac0c52852cf49e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devYoann Lopes2017-01-262-2/+11
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/multimediawidgets/videographicsitem/videoplayer.h src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp Change-Id: Id5ce05ffe2cd25657232157b162680b2e24a35ba
| * winrt: Fix pause/play for videosMaurice Kalinowski2017-01-031-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is partially a revert of bff19dbe6733d245. While that commit fixed switching cameras it did not respect pausing a video, where setActive is called from a different thread than in the camera case. Using shutdown introduced a wait, which in that case deadlocked. Instead revert to request an interrupt, but when restarting make sure that the render thread is on hold before start is invoked. Task-number: QTBUG-53722 Change-Id: Id5a722911bb2c30509fabb73bec925cadbf77628 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * winrt: Fix video playbackMaurice Kalinowski2017-01-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Rendering should only be activated once the video frame size is known. Otherwise the texture is created with an invalid size and rendering will be stopped. This happens for some codecs where MF_MEDIA_ENGINE_EVENT_LOADEDMETADATA is not known instantly after loading video files. Task-number: QTBUG-57707 Change-Id: Ic2347c8606239770e129544fd228b96929ed6198 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | winrt: Fixed emission of readyForCaptureChangedOliver Wolff2016-11-072-10/+17
| | | | | | | | | | | | | | | | The signal should only be emitted if the state of readyForCapture has actually changed. Change-Id: I4a4e2bf4451cd970f460813b2bdb32685067c453 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | Fixed winrt/windows phone buildOliver Wolff2016-11-072-1/+10
|/ | | | | | | | | readyForCaptureChanged cannot be connected to stateChanged as their arguments are not compatible (error: narrowing). Task-number: QTBUG-56927 Change-Id: I31ebc79a22a2d3565a16ab664163bf2d574a527f Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Fix crash when locking/unlocking focusMaurice Kalinowski2016-10-111-39/+59
| | | | | | | | The lock/unlock operation has to be created in the Xaml thread. Task-number: QTBUG-56034 Change-Id: I450ad0ba4a8f1275f878917bcd16c31fbf87e164 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Add QCameraFlashControlMaurice Kalinowski2016-09-196-0/+286
| | | | | | | | | | | This is without video modes so far, simply because video itself is not supported yet. Also included a cleanup for string conversions. Task-number: QTBUG-48541 Change-Id: Ib090f61861596e095d597cf7e5e74f7040fbc58f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Make focus actions synchronousMaurice Kalinowski2016-09-192-92/+75
| | | | | | | | | | | | | | | The camera and its controls have been moved out of the xaml thread recently, hence acting asynchronously is not required anymore for the focus control. In addition to this, previous behavior caused troubles inside QML as QDeclarativeCameraFocus::setFocusMode always emitted a focus change even though it did not happen yet. This resulted in inconsistencies between QML and the plugin. Task-number: QTBUG-48539 Change-Id: I19a3a3512530b01b627476e233291d737cfee11f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-1730-373/+469
|\ | | | | | | Change-Id: Ib8d05d6e21c7beb19f618cd1edc52d248b1e43b8
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-13/+19
| |\ | | | | | | | | | Change-Id: I3204cdf695f4b47730a88a7c41fc7a6de967b161
| | * WinRT: emit mediaStatus changes before state changesYoann Lopes2016-08-121-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure all mediaStatus changes are emitted, even when some action is done on the media player as a result of a state change. Also, when both mediaStatus and state are changed at the same time, make sure both variables are updated before sending the corresponding signals. Task-number: QTBUG-49578 Change-Id: I8eed6692503bba1540070f6435b7ea1f5e25c023 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | Replaced old license headers with new and correct onesJani Heikkinen2016-08-1230-360/+450
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced - header.LGPL3 with header.LGPL - header.LGPL21 with header.LGPL Change-Id: If11396da6ff12e9122281c17fc4354b05a554ee5 Reviewed-by: Ruslan Baratov <ruslan_baratov@yahoo.com> Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-021-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/integration/qsoundeffect/BLACKLIST Change-Id: Icd2edd4410a4ee914d489634d26b262c0c146bf4
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Yoann Lopes2016-08-011-1/+2
| |\| | | | | | | | | | Change-Id: Ic29cb09048003f18ff86d4546cd547be715eaec8
| | * winrt: Do not assert when missing region of interestMaurice Kalinowski2016-07-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Asserting is too heavy and can cause false positive on devices like the Lumia 535, where focus is supported, but not setting a focus point. Later on we check for existence of the control during the initialization, so it is safe to continue here. Task-number: QTBUG-54278 Change-Id: Ie68ff754d742888bdd6f4047e07d207707c90c91 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-07-212-46/+70
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/directshow/player/directshowiosource.cpp One side disintermediated filling a vector; the other reduced it to one entry. src/plugins/directshow/player/directshowiosource.h One side renamed a member, the other added another adjacent to it. src/plugins/pulseaudio/qpulseaudioengine.h One side added a header, the other replaced the next with a different header. Change-Id: I3a031975f5af43ca39cca571f215c612f640b7d6
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-302-40/+61
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blacklisted a few functions in tst_QAudioInput. Conflicts: .qmake.conf src/plugins/avfoundation/camera/avfcameracontrol.mm src/plugins/avfoundation/camera/avfcameraservice.h src/plugins/avfoundation/camera/avfcameraservice.mm src/plugins/avfoundation/camera/avfcamerasession.h src/plugins/avfoundation/camera/avfcamerasession.mm src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.h src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm src/plugins/avfoundation/camera/avfimagecapturecontrol.mm src/plugins/avfoundation/camera/avfimageencodercontrol.mm src/plugins/avfoundation/camera/avfmediarecordercontrol.h src/plugins/avfoundation/camera/avfmediarecordercontrol.mm tests/auto/integration/qaudioinput/BLACKLIST Task-number: QTBUG-54459 Task-number: QTBUG-49736 Change-Id: I3a1fe8cef50b44d5c2785aaf4cf69fe3f16728e6
| | * Merge remote-tracking branch 'origin/5.6.1' into 5.6Liang Qi2016-06-091-6/+9
| | |\ | | | | | | | | | | | | Change-Id: I0b4fde2a47b428fd04012a8dbec16fd14797b8dd
| | * | winrt: Fix synchronization problems to render threadMaurice Kalinowski2016-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWinRTAbstractVideoRendererControl::setActive was using QThread::requestInterrupt previously to indicate to the render thread that it is supposed to quit. However, when switching cameras you cannot tell the render thread to continue rendering. Instead start() is called and then the render thread recognized the previous interrupt request, resulting in a quit and no further rendering happening. Instead we wait for the render thread to complete by using shutdown(). Task-number: QTBUG-53722 Change-Id: Ibee2ed4f64400ca14c788984a73df4be0653ed2b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * | winrt: Add logging to QWinRTAbstractVideoRendererControlMaurice Kalinowski2016-06-081-0/+9
| | | | | | | | | | | | | | | | | | | | Change-Id: I44620b8513fdf20ebc0e093368044133eabdd6b3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * | winrt: focus action has to happen in the xaml threadMaurice Kalinowski2016-05-311-39/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise it will cause asserts and/or crashes. Change-Id: If8af4202395ae573b280744343dd853346a8c160 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | | Merge remote-tracking branch 'origin/5.6.1' into 5.7.0Liang Qi2016-06-011-6/+9
| |\ \ \ | | | |/ | | |/| | | | | Change-Id: If59885e0d0780390705c69fa7520c6ccc179ef45
| | * | winrt: Fix potential crash when querying for resolutionsv5.6.1-1v5.6.1Maurice Kalinowski2016-05-311-6/+9
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c84bdf63e4de16586eda3c45d5c3c3b2dc4fe089 introduced a potential crash on Windows Phone as querying for photo resolutions still might return video properties. As a result, querying for ImageEncodingProperties will fail and the function returns no resolution at all causing an assert later on. Instead of checking for the stream type passed to getMediaStreamResolutions we have to check for the property type of the list itself. Task-number: QTBUG-53714 Change-Id: I7bfc48ebf1fef4f9165135af604ce6c91a418438 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-241-10/+25
|\| | | | | | | | | | | Change-Id: I5aedca14c2bd454de0c274eeca88d15b83ae07a5
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-10/+25
| |\| | | | | | | | | | Change-Id: Ib95ddbbc6e2b69663597cae045ec81eda6d12d58
| | * Merge 5.6 into 5.6.1Oswald Buddenhagen2016-05-121-1/+1
| | |\ | | | | | | | | | | | | Change-Id: Ib4a7640e12319d78ea5ae8f58d79c9fab8d0ea60
| | | * winrt: Only set focus if supportedMaurice Kalinowski2016-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic6dc2eb6acbd0f5167aa4bad9af08ce8aa5a456b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * | winrt: Fix crash when initializing certain camerasMaurice Kalinowski2016-05-111-9/+24
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some cameras return video properties when querying for MediaStreamType_Photo, ie. Surface Book. This caused an assert. Instead when asking for photo resolutions, only query the available image resolutions and skip results not of type image. Change-Id: Ia1886a11f47676d6713eec86f3a80c664871a968 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-136-198/+259
|\| | | | | | | | | | | Change-Id: I773db005bbdc511169917ee35eb5b517e898926b
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-106-198/+259
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/winrt/qwinrtcameracontrol.cpp Change-Id: I45d3042adf19577a72794610fa1c310cb22e26c4