summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | Set geometry for recreated video renderer backendVal Doroshchuk2018-05-081-7/+6
| | | | | | | | | | | | | | | | | | | | | | If video renderer backend has been recreated, then it needs to update its geometry. Which previously didn't happen and as a result no content was shown. The geometry is now updated from within the video node. Task-number: QTBUG-54680 Change-Id: Iadbf324f4734c9ac6c487eaedd014629ca330599 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | DirectShow: Fix crackling when playing custom sample rateVal Doroshchuk2018-05-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Seems waveOutWrite() requires WAVEHDR->dwBufferLength to be even number otherwise some crackling might be heard while playing. And looks like it is not related to QAudioFormat, any of it produces the issue. Task-number: QTBUG-64931 Change-Id: I87dbe165611325d9c0291a3bffdc091397b42741 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Switch WindowGrabber to a private parent windowJames McDonnell2018-05-072-18/+25
| | | | | | | | | | | | | | | | The code that it was using to retrieve a parent window didn't always get the right window. Using a private window prevents any confusion. Change-Id: Ic368460c6bf150891ff51f1f3b00bbe93c6cf780 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | 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>
* | QMediaPlayer: remove else after returnAndre Hartmann2018-04-301-2/+3
| | | | | | | | | | | | | | | | The else was also missing the curly braces, but as we usually omit else after return, let's just remove it. Change-Id: Ia91261bbe6edf4e9b0d454d1fdf91c5cfa62e4cc Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Fix comment endThiago Macieira2018-04-271-1/+1
| | | | | | | | | | | | | | | | Caught by Clang 6: qgstutils.cpp:180:1: warning: '/*' within block comment [-Wcomment] Change-Id: I3840d727dee443318644fffd152938f2b4df5400 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | QSound(Effect): Cleanup coding styleAndre Hartmann2018-04-264-11/+11
| | | | | | | | | | Change-Id: Ie8589bb55388c1f41b1706b6571e2eec401fc415 Reviewed-by: Christian Stromme <christian.stromme@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>
* | QSound: Allow to play files with qrc schemaAndre Hartmann2018-04-254-1/+40
| | | | | | | | | | | | | | | | It was possible to play resource files only by prefix ":/". Added support of qrc schema in filenames. Change-Id: I9e538422828ad2107ab5567d172dca8728cbc64d Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | DirectShow: Add overrideFriedemann Kleint2018-04-256-30/+30
| | | | | | | | | | | | | | | | Silence the clang-cl build. Task-number: QTBUG-63512 Change-Id: I701998d63a54b556b32fa0100bf43ef3071e598b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix DirectShow COM class hierarchyFriedemann Kleint2018-04-2413-205/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the class DirectShowObject. Move the ref counting code to a macro COM_REF_MIXIN that is used for the classes that are actually instantiated. Fix warnings: common/directshowpin.h(56,5): warning: 'reinterpret_cast' from class 'DirectShowPin *' to its base at non-zero offset 'IUnknown *' behaves differently from 'static_cast' [-Wreinterpret-base-class] DIRECTSHOW_OBJECT ^~~~~~~~~~~~~~~~~ common/directshowobject.h(69,33): note: expanded from macro 'DIRECTSHOW_OBJECT' return GetInterface(reinterpret_cast<IUnknown*>(this), ppv); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ common/directshowpin.h(56,5): note: use 'static_cast' to adjust the pointer correctly while upcasting Task-number: QTBUG-63512 Task-number: QTBUG-64157 Change-Id: Ibef143d675cd169b78fe46ff5a0c83f6e3434487 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@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>
* | Doc: Remove QDoc warnings in Qt MultimediaPaul Wicking2018-04-201-4/+4
|/ | | | | | | | | Update the parameter description for two methods that cause QDoc warnings. This change also seeks to improve clarity of the description. Task-number: QTBUG-67790 Change-Id: Iafcf650b0584f8a293fc1585701f7731a34cea6b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Fix documentation warningsTopi Reinio2018-04-1935-106/+85
| | | | | | | | | | | | Add a custom module header, used only for documentation builds, that pulls in also the QtMultimediaWidgets module. Several documentation fixes to clean up warnings from clang. Task-number: QTBUG-67790 Change-Id: I6c1013798a648250c8555eb92684ec3b33ff7531 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Remove space that causes QDoc warningPaul Wicking2018-04-181-1/+1
| | | | | | | | Remove one space that is the cause of a QDoc warning with Clang. Task-number: QTBUG-67790 Change-Id: Iad60c6b4bdf9570c8c30e5acd641463807f3b416 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Add more generated files to .gitignoreAndre Hartmann2018-04-171-1/+6
| | | | | Change-Id: Icc776e45c827df33cb8f1c3750ea8177c038cbcd Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* DirectShowPlayerService: Proper check of DirectShowUtils::connectFilters's ↵Oliver Wolff2018-04-171-2/+2
| | | | | | | | | | | result The function returns a bool no HRESULT. Neither SUCCEEDED nor FAILED returns the proper result when fed with a bool. Change-Id: Ic46957f1f2c9098afac2e216fe5ef2dd1dee00a6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* DirectShowUtils::findUnconnectedPin: Try other pins if matchPin failsOliver Wolff2018-04-171-3/+0
| | | | | | | | | | If matchPin fails for one of the pins (for whatever reason), the loop can just continue and check whether another unconnected pin can be found. If this check fails for every pin, false will be returned in the end. Change-Id: I1a58a26633b43052f3963212932d789d4800c714 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* DirectShowUtils::connectFilters: Return false if every pin failsOliver Wolff2018-04-171-3/+3
| | | | | | | | If every pin connection fails, the result of the function should be false. It does not matter if graph->EnumFilters(&f); failed or succeeded. Change-Id: I87ec6bcda5d5dbe60154b39e21c73af1dd06fe3d Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* DirectShowUtils::matchPin: Return false on connection mismatchOliver Wolff2018-04-171-1/+1
| | | | | | | | | If the pin's connection state does not match shouldBeConnected, the function has to return false instead of checking the result of the isPinConnected call. Change-Id: Id15f054d5847434a5bb06b91bbc1455c6fdd2ded Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Extend WASAPI config checkFriedemann Kleint2018-04-161-0/+1
| | | | | | | | | Include a header used by the utils on which clang-cl typically chokes. Task-number: QTBUG-63512 Change-Id: I79eaac32612641bb784b61aab27a3acf76042a19 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Windows Audio: Fix Clang warnings about int/C-style castsFriedemann Kleint2018-04-161-2/+3
| | | | | | | | | For 64bit: qwindowsaudioinput.cpp(420,15): warning: cast to 'HMIXEROBJ__ *' from smaller integer type 'UINT' (aka 'unsigned int') [-Wint-to-pointer-cast] mixerID = (HMIXEROBJ)mixerIntID; Change-Id: Icb13142b0d8868e995f47caa02784c260abfc10f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* PulseAudioOutput: Emit QAudio::StoppedState on QAudio::OpenErrorv5.11.0-beta4VaL Doroshchuk2018-04-121-0/+3
| | | | | | | | | If a problem occurs in open() the stateChanged() signal should be explicitly emitted regardless that current state has not been changed since QAudio::StoppedState. Task-number: QTBUG-49569 Change-Id: I6f4e235fa4b6b3bbf0dc3946dfe1f983ac10f356 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* QSound(Effect): Use C++11 member initializationv5.11.0-beta3Andre Hartmann2018-03-276-77/+48
| | | | | Change-Id: Iec7442f4621ad131bf6291e0f5d013ee379c5e3b Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* QSound: Fix comment typosAndre Hartmann2018-03-271-3/+3
| | | | | Change-Id: I13cf879be6fc6225552990b8196aeb39299b8e3f Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* QSound(Effect): Convert to functor-style connectAndre Hartmann2018-03-275-34/+41
| | | | | Change-Id: Ie58ee30b1ace836c620812b8063246c0d01d7214 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* QSoundEffectPrivate: Use nullptr instead 0 or NULLAndre Hartmann2018-03-232-37/+39
| | | | | | Change-Id: I62e3d4d1284adeea457d754d63650b5c9b81e276 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Fix target rectangle coordinates while painting image with QPainterVal Doroshchuk2018-03-221-2/+3
| | | | | | | | | | | | | QRectF::setX() may change the width. QRectF::setY() may change the height. If either width or height has been adjusted incorrect target rect is applied to draw an image which will cause some artefacts to be shown (like rectangle with a garbage) and incorrect size of actual content. Task-number: QTBUG-53594 Change-Id: Iee92aaf908952d7809e8ad62f8d1126b7ecac642 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* DirectShow: Fix blank QVideoWidget when it is pausedVal Doroshchuk2018-03-223-37/+5
| | | | | | | | | | | | | If playback is paused latest video frame is shown. If after that the window is deactivated (unfocused or hidden) the picture is cleared. And just empty area is shown. Provided following fixes: 1. Prevented clearing the painted video picture when the window is unfocused. 2. Repainted latest video frame again when the window gets back from hidden state to shown. Task-number: QTBUG-65780 Change-Id: I62b3c6e25133a7d08a5060a5ab9f6b35d927fbd4 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* DirectShow: Add warning when not supported playback rate appliedVal Doroshchuk2018-03-221-1/+4
| | | | | | | | | | | | IMediaSeeking::SetRate() may return an error when not supported rate is being applied. Added a warning to inform user about incorrect rate value also fixed a bug when the rate has been always fell back to 1.0 instead of previous value. Task-number: QTBUG-55354 Change-Id: I85fb5572cba6920b461a023aef1bc09a981ab033 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Support changing of volume in 24-bit audio samplesVaL Doroshchuk2018-03-223-0/+76
| | | | | | | | Introduced a fix to support changing of volume for 3 bytes samples audio stream. Task-number: QTBUG-60579 Change-Id: I4ba4a9a1cf65812ccbc46b40c78546875d5e4d73 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Gstreamer: Fix leak in prepare-window-handle messageVaL Doroshchuk2018-03-211-1/+3
| | | | | | | | | | | If the handler returns GST_BUS_DROP, it should unref the message, else the message should not be unreffed by the sync handler. The message is not going to be unreffed after handler call is made. Task-number: QTBUG-64142 Change-Id: Ib44f574e95457cdfab66b390c691a8b572987d66 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Gstreamer: Fix setting vaapi sink propertiesVaL Doroshchuk2018-03-212-124/+294
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since vaapi and xvimage sinks require different ranges for the properties: brightness, contrast, hue, saturation. Added support of vaapi ranges. It also fixes problem when contrast was always 0 as default value which led to always show black screen. - brightness xvimage: Allowed values: [-1000,1000], Default value: 0 vaapi: Allowed values: [-1,1], Default value: 0 - contrast xvimage: Allowed values: [-1000,1000], Default value: 0 vaapi: Allowed values: [0,2], Default value: 1 - hue xvimage: Allowed values: [-1000,1000], Default value: 0 vaapi: Allowed values: [-180,180], Default value: 0 - saturation xvimage: Allowed values: [-1000,1000], Default value: 0 vaapi: Allowed values: [0,2], Default value: 1 Task-number: QTBUG-23761 Change-Id: I8fda8ce4c6f47c4567e67c670f802a0e9f55af6e Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Allow to receive mouse move events in QVideoWidgetVaL Doroshchuk2018-03-211-1/+3
| | | | | | | | | | | | No move events are being received for QVideoWidget even with enabled Qt::WA_MouseTracking. All these events are ignored because video widget from QVideoWidgetControl always has disabled Qt::WA_MouseTracking. Proxied this mouse tracking property to video widget. Task-number: QTBUG-30728 Change-Id: Ic196042596906ce8b5674b62ea66f5e035ba3cfe Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Audiocapture: Fix setting QAudioEncoderSettings::bitRateVaL Doroshchuk2018-03-211-7/+6
| | | | | | | | | | | | | | The sample size is now correctly calculated using provided bit rate via QAudioEncoderSettings. The bit rate is calculated like bitrate = sample size * sample rate * channel count Fixed bug when sample size is 8 when bit rate and sample rate is 8000 which is not correct. The bit rate must be 8 * 8000. Task-number: QTBUG-65207 Change-Id: I660fadfaaf6cc63004480fb84165252360b7f75e 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>
* DirectShow: Emit an error if QCamera::start() failsVal Doroshchuk2018-03-213-13/+29
| | | | | | | | | | | | | | | | | | | If a camera is not started successfully, then an error() should be emitted. After an error the camera's state will be QCamera::UnloadedState and status will be QCamera::UnloadedStatus. The error signal is handled when the camera is unable to set following states: QCamera::UnloadedState, QCamera::LoadedState or QCamera::LoadingState. Thus additionally to QCamera::start() an error can be emitted even when QCamera::load(), QCamera::unload(), or QCamera::stop() is called. Task-number: QTBUG-51825 Change-Id: Ib5ea08ed7983ea49a7bf8c0321cc5266a68d9144 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Add test for checking error handling on startVaL Doroshchuk2018-03-211-0/+22
| | | | | | | | | | | | | If a camera is not started successfully error() signal has to be emitted. This change adds a test for checking that we emit and set the correct status and state when trying to start an already active camera. Task-number: QTBUG-51825 Change-Id: Ia14119aa9a93a76e363214401b8c2e9f216e35c9 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>
* Wrap QTest::qWaitForWindowExposed() with QVERIFYv5.11.0-beta2Kari Oikarinen2018-03-011-6/+6
| | | | | | | | The function is marked Q_REQUIRED_RESULT, so not handling the return value is a compiler warning. Change-Id: I167950e8f579446516c15f54388addf759afa69d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Replace deprecated qSort() by std::sort()Friedemann Kleint2018-02-285-10/+19
| | | | | Change-Id: I74ffd5bafaef9ebbe7f12600ad831c8deb58ae64 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.11v5.11.0-beta1Liang Qi2018-02-182-4/+11
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I2af17ff905c26466fa1ea8b612dff3b505a3d33a
| * fix typo in QCameraImageProcessing documentationJochen Seemann2018-02-051-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-55660 Change-Id: I444bef63c0b8d9a9f9fdbce8e3ceabb067c1fe84 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * Bump versionOswald Buddenhagen2018-02-021-1/+1
| | | | | | | | Change-Id: I92c2c4abd8df9bd07949d488dcac44038a70931d
| * GStreamer: fix udpsrc timeout settingYoann Lopes2018-02-021-3/+10
| | | | | | | | | | | | | | | | | | | | The timeout's time unit has changed between 0.10 and 1.0, from microseconds to nanoseconds, but we were always passing the value in microseconds. This would cause an UDP stream to always timeout with GStreamer 1.0. Change-Id: I69786480d29854d3a030f9dbea15c69ee89f3dd5 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.10.1' into 5.11v5.11.0-alpha1Liang Qi2018-02-142-5/+74
|\ \ | | | | | | | | | Change-Id: If65f60670bbfb011363a1b5230253805b3e63553
| * | Revert "GStreamer: Prevent calling CameraBinSession::setStateHelper twice"v5.10.15.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>