summaryrefslogtreecommitdiffstats
path: root/src/multimedia/playback/qmediaplayer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-251-20/+20
| | | | | | | | | | | This reverts commit 80d46e3a5f64ff2456c40bdba63b6d5c69a32cdd. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I5c64ffa120f916711e5cf01c828774f8456dec06 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Doc: Fix typoPaul Wicking2021-02-101-1/+1
| | | | | | | | Fixes: QTBUG-90997 Change-Id: Ib007ebf6c9459df3583fd44b0347827514e90d83 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit fcb3c8bfb84038462258ae242da9bcb8e9c2389e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update commercial license headersTarja Sundqvist2021-01-271-20/+20
| | | | | | | | | | | | | | | | Updated header.COMM to files in tqtc-qtmultimedia. Examples, tests or documentation files are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reaso for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4171 Change-Id: I86ebf7c3653b55983cefff246c0cb019cbcda8c4 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Compile with QT_NO_BEARERMANAGEMENTAndy Shaw2020-07-061-1/+12
| | | | | Change-Id: Ibd23ac674e8ba5c0b2d3cea619d0f823a058baab Reviewed-by: Val Doroshchuk <valentyn.doroshchuk@qt.io>
* Merge remote-tracking branch 'origin/5.15.0' into 5.15Qt Forward Merge Bot2020-05-141-0/+7
|\ | | | | | | Change-Id: I9525c18e6a29b8c6cbe3398264a096bde24eca10
| * Fix warning about QNetworkConfiguration being deprecatedThiago Macieira2020-04-231-0/+7
| | | | | | | | | | | | | | | | It's going away in Qt 6.0. Task-number: QTBUG-83692 Change-Id: I9709abb1c3734e10a7defffd1607e1160da1e75c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Suppress QMediaNetworkAccessControl related deprecation warningsMårten Nordheim2020-04-271-0/+9
|/ | | | | Change-Id: Ifb64b01463115f81b2edc4e486a3b0f52197e2a1 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-101-2/+11
|\ | | | | | | Change-Id: I4ea49723c74c6dccf141b65f834b5d539d2ab9d7
| * QMediaPlayer: Update gst-pipeline docsVaL Doroshchuk2020-03-041-2/+11
| | | | | | | | | | | | | | | | | | Added docs for using QAbstractVideoSurface and example how to use QVideoWidget. Change-Id: I27a105a3859086e6fa5d8a19672ef791ce9e5cca Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Deprecate functions taking bearermanagement-related classesMårten Nordheim2020-03-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Bearer Management is going away [ChangeLog][Deprecation Notice] Functions taking or returning QNetworkConfiguration have been deprecated. Change-Id: Iff2e6c5386e5c6ba9da81067ac643bd1eb0d7500 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta1Qt Forward Merge Bot2020-02-221-0/+1
|\| | | | | | | Change-Id: I04934575bd661b80b1f012a7e825dcd753d26908
| * Android: Fix invalid use of incomplete type 'QDir'VaL Doroshchuk2020-02-211-0/+1
| | | | | | | | | | | | Change-Id: Id0a2d380eae9adce441c9eb82367435894e7a7d8 Fixes: QTBUG-82370 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | AVF: Introduce adoption of AVAssetResourceLoaderDelegate protocolVal Doroshchuk2020-02-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+8
|\| | | | | | | Change-Id: Ia0c325dc50b9a5a1cdd205609ba688ad9874f297
| * Android: Flush qrc to tmp file with original nameVaL Doroshchuk2020-02-121-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since android.media.MediaPlayer does not support playing from data stream, we create a temporary file and copy data to it. Each such file contains unique name. When the app is killed, dtor of QMediaPlayer is not called and thus the temporary file is not deleted. Also these files are located inside app's location, e.g. /data/data/org.qtproject.example.app/files/, and no possibility to delete them automatically. Added a fix to rename the temporary file to original name which allows to keep only one copy of the file when the app is killed. Change-Id: I36c8bc4dd339fbf4091689a05f4d9c7febf046a5 Fixes: QTBUG-59517 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | GStreamer: Introduce reverse playbackVaL Doroshchuk2020-02-031-1/+1
| | | | | | | | | | | | | | Fixed to use negative playback rate. Change-Id: I864e76710f2ea176262639d5e91059c71b9bb382 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Introduce MediaPlayer::videoOutput propertyVaL Doroshchuk2020-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This property holds the target video output, and allows to render video to multiple items. MediaPlayer { videoOutput: [videoOutput1, 1, "ignored", videoOutput2.videoSurface] } Incorrect inputs are ignored. The property also accepts single either QAbstractVideoSurface or QDeclarativeVideoOutput objects. Task-number: QTBUG-32939 Change-Id: I41fc557dcac60be6d70b3889036ff4ae75734cc0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Avoid initializing QFlags with 0 or nullptrFriedemann Kleint2019-11-251-1/+1
| | | | | | | | | | | | | | It is being deprecated. Change-Id: I26b871fe9b989972ab1d2c18de344dc9c9275e9f Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Introduce rendering to multiple surfacesVaL Doroshchuk2019-11-061-0/+19
|/ | | | | | | | | | | | | | | | | | | | | QAbstractVideoSurface is used to retrieve and render video frames in particular pixel format. I.e. a backend takes one video surface which asks to provide video frames in one of the supported formats returned from QAbstractVideoSurface::supportedPixelFormats(). So currently there is one source of the video frames and only one video output possible. Introducing QMediaPlayer::setVideoOutput(const QVector<QAbstractVideoSurface *> &) This func takes a list of surfaces, that support at least one shared pixel format, and presents video frames to all of them at the same time. Several surfaces, which do not have any shared pixel formats, will fail to work. Task-number: QTBUG-32939 Change-Id: Ifbdaf692755353fbd5bf3ad74baba1820e3d0237 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-211-11/+11
|\ | | | | | | Change-Id: I2ba97d82a57172656f6549f368ee51f718f9cdf8
| * QMediaPlayer: use new connect syntaxRolf Eike Beer2019-09-181-11/+11
| | | | | | | | | | | | | | Only the Q_PRIVATE_SLOTs remain. Change-Id: Id3daf8275e8510a99a7089d4a537d06a123b6a27 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-121-1/+1
|\| | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstvideorenderersink.cpp src/gsttools/qgstvideorenderersink_p.h Change-Id: I7fe29161d568fa3f7688abfd2f993d1b16ac3fb9
| * Include moc files after QT_END_NAMESPACEVal Doroshchuk2019-09-091-1/+1
| | | | | | | | | | | | Fixes: QTBUG-76574 Change-Id: I69ef47bbd01967c3d7a0c5d1554fcdd29619ebfa Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-08-281-0/+12
|\| | | | | | | Change-Id: Ic16cafaf6df356e430db4d60ad95610c855e1042
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-201-0/+12
| |\ | | | | | | | | | Change-Id: Ic46475146abe7b8493ae343e8332736fa6dcc3af
| | * GStreamer: Add docs for custom pipelinesVaL Doroshchuk2019-08-141-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | The feature was added in 5.12.2. And it is relevant only for GStreamer backend. Change-Id: I87e22e506158dc61bb7f111e74806e7eb8c28d7a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Deprecate canonicalUrl and canonicalRequest in QMediaContentVaL Doroshchuk2019-05-131-6/+9
|/ / | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-091-0/+3
|\| | | | | | | Change-Id: I26440611372622174c5b077be21e5a22b8136e97
| * Fix crash in player example when close the window while playingVaL Doroshchuk2019-02-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | When it is playing and close the window: 1. The player object will be destroyed first (all QString's). 2. Next parent QWidget will be destroyed with all children. 3. While destroying QMediaPlayer from Player object, the playback will be stopped. 4. The status will be changed and Player::statusChanged will be called. The connection still exists. And since all string members are already freed, it produces a crash. Change-Id: I2c2fdca97f0ff4b300527b550ecc0c12b04e5b4e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | multimedia: modernize by using nullptrJochen Seemann2019-01-041-43/+43
|/ | | | | | Change-Id: Id1084fec084b972aaa1d2389ee56ee831a821172 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@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>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-061-1/+11
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I5acdc7e0bd3729b80522dfff0f388cf2507fb111
| * Update player state after QMediaPlayer::EndOfMediaVal Doroshchuk2017-12-201-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Return up-to-date player state if mediaStatusChanged() with QMediaPlayer::EndOfMedia is already received but stateChanged() is not. mediaStatusChanged() is always emitted first which could cause the player to keep outdated state before stateChanged() is received. Task-number: QTBUG-57197 Change-Id: I0706069d2f4875076442fdf8ac7e938272ab843c Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Update customAudioRole Qt versionJames McDonnell2017-09-191-3/+3
| | | | | | | | | | | | | | | | | | The change missed the Qt 5.10 release. Change-Id: I25bc345ac8262966ca31e63f4f87584983fa0bae Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Add custom audio role API to QMediaPlayerJames McDonnell2017-09-061-1/+89
|/ | | | | | | | | | | | Allows use of audio roles beyond those known to Qt. [ChangeLog][QMediaPlayer] Added customAudioRole string property to enable use of audio roles beyond those available via the audioRole enum property. Change-Id: Id7ed5d7bc1af0c15910e699f25c97cfed2d48243 Reviewed-by: Christian Stromme <christian.stromme@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Fix build for -no-feature-temporaryfileStephan Binner2017-05-081-0/+4
| | | | | | | | | If a backend does not support streaming then playing from qrc is impossible for -no-feature-temporaryfile case. Change-Id: Ibb0518c4afe0598c6f3a1c03b75cc00e76b8eead Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-111-10/+10
|\ | | | | | | | | | | | | | | | | | | Conflicts: qtmultimedia.pro src/multimedia/playback/qmediaplayer.cpp src/plugins/directshow/directshow.pro tests/auto/integration/qmediaplayerbackend/BLACKLIST Change-Id: I6dacdcbb223c1d12dd72eb308a67170983c709b3
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-041-10/+10
| |\ | | | | | | | | | Change-Id: Ib038c5e3ebb48c0e46569a35d530fa5ceaf06a32
| | * Reduce size of QMediaPlayerPrivateChristian Stromme2016-10-191-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Rearranged the data members to reduce the object size (-16 bytes on 64 bit systems). Change-Id: I0f285fafc42633fff42eba1ddc68c6f9bee2cec8 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Yoann Lopes2016-10-111-2/+2
|\| | | | | | | | | | | Change-Id: I8cfa9cb233675bb7ff842118d96ec8ac0b97964f
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-041-2/+2
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp Change-Id: I4a30fc030c25e7b8da3eb9f386c4a5fa468df141
| | * Doc: Add comment about stream requirementsChristian Strømme2016-09-281-2/+2
| | | | | | | | | | | | | | | Change-Id: I92e16722dc5cc8df23cf4ed0d048a0d2a23956eb Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | | Improve audio volume documentationYoann Lopes2016-08-221-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Added information about volume scales. Change-Id: Ica8367396147e3e1c814b3575faa5cf0503be031 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-171-7/+9
|\| | | | | | | | | | | Change-Id: Ib8d05d6e21c7beb19f618cd1edc52d248b1e43b8
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-7/+9
| |\| | | | | | | | | | Change-Id: I3204cdf695f4b47730a88a7c41fc7a6de967b161
| | * Fix playing a playlist containing an invalid media as first itemYoann Lopes2016-08-121-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a playlist contains an invalid media, QMediaPlayer normally continues to the next media. If an invalid media was first in the list, the backend would never go into PlayingState, which would then cause the media player to never start the next item in the list (thinking it's stopped). We now always transition to PlayingState when starting playback of a playlist, regardless of the backend going into that state or not. Change-Id: I4227f937e7a619afbd8adbe2fccedfa5d43ad89a Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Pass by QUrl by const-ref, it's non-trivial.Sergio Martins2016-03-021-2/+2
|/ / | | | | | | | | | | | | [-Wclazy-function-args-by-ref] Change-Id: Iac68ca2d3d53951190db6d24ebbbcb60e8bbd789 Reviewed-by: David Faure <david.faure@kdab.com>
* / Updated license headersAntti Kokko2016-01-191-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I324f65c61171f36641472964d095d72e452afb3a Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Yoann Lopes2015-08-241-0/+4
|\ | | | | | | | | | | | | Conflicts: src/imports/multimedia/qdeclarativeaudio.cpp Change-Id: I57c6252b084e4ed796f6f308b2e0c717d0f59b13
| * QMediaPlayer: clear current playlist on deletion.Yoann Lopes2015-08-191-0/+2
| | | | | | | | | | | | | | | | | | | | Makes sure the current playlist is unbound when QMediaPlayer is destroyed. Change-Id: If25efa67bf79af0326f6125d9615165a2c7dd6bb Reviewed-by: Jim Hodapp <jim.hodapp@canonical.com> Reviewed-by: Loïc Molinari <loic.molinari@canonical.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>