summaryrefslogtreecommitdiffstats
path: root/src/plugins/avfoundation/mediaplayer
Commit message (Collapse)AuthorAgeFilesLines
* AVF: Fix mediaplayer state and status issuesChristian Strømme2017-04-263-52/+90
| | | | | | | | | This fixes the issues that were causing the whole qmediaplayerbackend test to be blacklisted on macOS. Task-number: QTBUG-46368 Change-Id: I59a35dd50a9c07e4e4382c5facb391f5c8a27ee7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-101-2/+0
|\ | | | | | | | | | | | | Conflicts: src/plugins/gstreamer/camerabin/camerabincontainer.h Change-Id: I4942d41d69112335fe0c994002f1b32ef3aad051
| * Use QT_CONFIG macro to check for featuresLars Knoll2017-02-271-2/+0
| | | | | | | | | | | | | | And remove many custom defines. Change-Id: I658cc8430d1d99ed3c0aafe03a77adce76621a29 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-121-1/+3
|\| | | | | | | | | | | | | Conflicts: src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp Change-Id: I7c30c2d13fdd07ee07e4449d5d3e256e988d3793
| * Move qtmultimedia over to the new config systemLars Knoll2016-11-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Use the new configuration system to define external libraries, configure tests and features. Don't use pkg-config outside of the configuration step. And move all command line options over from qtbase, so that we can remove them from there in a second step. Change-Id: I1aa4b557a6aee17eeceb00602005a2d28b426a26 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-122-53/+59
|\| | | | | | | Change-Id: I126bc73db5b5d9b6c26cb9ff5da7ed13a16b378b
| * Merge remote-tracking branch 'origin/5.7' into 5.8Yoann Lopes2016-10-112-53/+59
| |\ | | | | | | | | | Change-Id: I8cfa9cb233675bb7ff842118d96ec8ac0b97964f
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-042-53/+59
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp Change-Id: I4a30fc030c25e7b8da3eb9f386c4a5fa468df141
| | | * AVFoundation: fix metadata controlYoann Lopes2016-09-272-53/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correctly emit metaDataAvailableChanged and metaDataChanged signals. Task-number: QTBUG-46368 Change-Id: Ic79acd519b47f4d864fa335c8f75758fe9185c39 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | | Remove deprecated QSysInfo APIs and dead code from macOS/iOS backendJake Petroules2016-09-234-34/+2
|/ / / | | | | | | | | | | | | | | | | | | Deployment targets are currently macOS 10.9 and iOS 7.0. Change-Id: I500a95c00eb3be6e693e38f0f2205941f7bc9601 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Yoann Lopes2016-09-012-3/+19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/multimedia/audio/qaudiosystemplugin.cpp src/plugins/directshow/helpers/directshowobject.cpp src/plugins/directshow/player/directshowiosource.cpp src/plugins/directshow/player/directshowiosource.h Change-Id: I0e4632c7705128f81429ddbcb0d4abbc04858a8b
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-272-3/+19
| |\| | | | | | | | | | Change-Id: I639d42e78a2b85e939c9f8e9dd5da70cdc058857
| | * AVFoundation: fix memory leakYoann Lopes2016-08-221-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using 'self' in a block maintains a strong reference to it, the previous code would never release that reference and therefore leak the AVFMediaPlayerSessionObserver object when the session was deleted. Captured variables used in the relevant block are now marked with '__block' to make sure no strong references are maintained. We now also make sure the session still exist when that callback block is called. Change-Id: I847b524d8692559fe5884517abb5b9cc7696b4fd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * Fix instance method not found warningJake Petroules2016-08-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | NSView/UIView were only forward declared here which led to warnings when calling methods on instances of them. Change-Id: Ic2b391bb0ed8d45306dc16e2a807ce7fcae5015e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | Adjust to qtConfig() changes in qtbaseLars Knoll2016-08-191-2/+2
|/ / | | | | | | | | | | Change-Id: I26d80ece18abf882338de5ce0258469ed103a0eb Reviewed-by: Yoann Lopes <yoann.lopes@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-6/+15
|\| | | | | | | Change-Id: I3204cdf695f4b47730a88a7c41fc7a6de967b161
| * AVFoundation: fix mediaStatus and state changesYoann Lopes2016-08-121-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | When both state and mediaStatus are updated at the same time, make sure both variables are updated before emitting the corresponding signals. Also, always emit mediaStatusChanged() signals before stateChanged() to make sure mediaStatus changes are not cancelled by some action resulting from a state change. Task-number: QTBUG-49578 Change-Id: I0caea8261120595227834dbac7fed286d125bcab Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-6/+5
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/avfoundation/mediaplayer/mediaplayer.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin5/mockserviceplugin5.pro Change-Id: I5742596230dc510ba2a09eba624429bb67179194
| * standardize statement order in project files a bitOswald Buddenhagen2016-02-251-1/+1
| | | | | | | | | | Change-Id: I96bbe1343eedbad6b48579d700bbb6b5b80d69f1 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * remove redundant statements from project filesOswald Buddenhagen2016-02-251-1/+0
| | | | | | | | | | | | | | | | | | | | - TARGET is unnecessary if it matches the project file's basename - CONFIG+=no_private_qt_headers_warning is added by qt_build_config.prf - load(qt_build_config) is done by .qmake.conf Change-Id: I3eb45a758dfee34be3c78fc13d996780741c95e9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-251-4/+4
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: I8e1554b648327ea2fb342b882ce8e439bd6f271d Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-1926-364/+520
| | | | | | | | | | | | | | | | | | | | | | 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>
* | tvOS supportMike Krus2016-01-136-20/+21
|/ | | | | | | Builds, tested simple video playback Change-Id: I04e1da050c587cba3609107dc88a155a6949f2c3 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* AVFoundation: implemented QMediaPlayer::seekable.Yoann Lopes2015-09-153-1/+19
| | | | | Change-Id: Iaca8daa2460062954497b3e510dd1828953c80fd Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* AVFoundation: fix rendering when player reached EndOfMedia.Yoann Lopes2015-09-151-0/+5
| | | | | | | | | | | Once the media player reached the end of the media, it shouldn't be rendering frames anymore. This could happen when seeking after reaching the end. The output layer is now cleared on EndOfMedia to make sure that doesn't happen. Change-Id: I18a21eaff6c63a2bd54d4c2953f89eb1722f66d5 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* AVFoundation: correctly unload current media.Yoann Lopes2015-09-151-31/+14
| | | | | | | | | | When loading a new media, we should unload the previous media. This makes sure all properties set right after loading a new media (e.g. position, volume) are correctly set on the new AVPlayer and not on the old one. Change-Id: I4cd71b785ccdb4cd0772cedffc3c25665f402776 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* AVFoundation: store seek requests before media is loaded.Yoann Lopes2015-09-152-5/+27
| | | | | | | | And actually seek once the media is loaded. Task-number: QTBUG-48057 Change-Id: I9446a1e66a48f9a94c039be9af81689ed04bc56c Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* AVFoundation: fix initial volume.Yoann Lopes2015-09-152-22/+28
| | | | | | | | | | The volume level set before loading a media was never actually set on AVPlayer. Regression introduced by 4e07ff99 on OSX. Task-number: QTBUG-48154 Change-Id: I599e3d55b35d7196aebc4753a367a29049f99d33 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* AVFoundation: fix playback rate.Yoann Lopes2015-09-153-8/+13
| | | | | | | | | | | | Calling play on the AVPlayer internally resets the playback rate, which means any playback rate set before calling play was ignored. We now always call setRate to start playback to avoid resetting the rate with play. Aslo fixed the playbackRateChanged() signal that was never emitted. Task-number: QTBUG-45570 Change-Id: I3a77e1db31c57f1e3491287bdf977731b9d73509 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* AVFoundation: don't use shared OpenGL contexts unless needed.Yoann Lopes2015-06-101-11/+15
| | | | | | | | | | We were always using shared OpenGL contexts to render media player frames into an OpenGL texture. There's no need to do that when there already is a current context on the current thread. This happens in non-QtQuick cases, when the OpenGL thread is also the main thread. Change-Id: Icb97ed49609c764263007a43b6bb481e23768111 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* OSX/iOS: Fix volume and muteFrank Osterfeld2015-05-111-2/+2
| | | | | | | | | My last fix for iOS (4e07ff99) introduced this regression of passing the outdated value to the native player object. Change-Id: I01b0df8c7a0fe1382ef73b55d288a40daf024e3d Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* ios: Enable volume and mute functionalityFrank Osterfeld2015-02-251-9/+21
| | | | | | | | | | | AVPlayer::setVolume and setMute also exist on iOS, so no need to ifdef them to be OS X-only. As they require iOS 7.0, add runtime checks to ensure that the methods exist. Task-number: QTBUG-39240 Change-Id: I10810705cef8e5d8c18e4c79a15fa06425ea57f9 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com> Reviewed-by: James Turner <james.turner@kdab.com>
* ios: Do not leak texture cache objectsFrank Osterfeld2015-02-251-9/+11
| | | | | | | | | Do not recreate m_textureCache if it already exists. This changes the memory allocation behavior of a simple iOS example program from linearly increasing to constant over time. Change-Id: I6ff13b586c653fb7b4cadfa9f4ebf985b07ee455 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Update copyright headersAntti Kokko2015-02-1226-378/+274
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I1c6faa4f59f8eca54f01ef20941fa60161dd7872 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* iOS video frame render implementation.James Turner2015-02-048-61/+575
| | | | | | | | | | | | Uses CVTextureCache, iOS only for now, OS-X code could be ported but will need further work to support TEXTURE_RECTANGLE in the QVideoNode classes. When we can’t share a context, falls back to an offscreen window, FBO rendering and grabbing a QImage. Change-Id: I23b831fdcc63aeb1b67b7741d8d56779470240d3 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* AVFoundation: fix media player video rendering in QML.Yoann Lopes2014-10-012-19/+4
| | | | | | | | | The AVPlayerLayer was set on the QVideoRendererControl before its geometry was updated, causing the renderer control to display frames with an invalid size. Change-Id: I90e18dce69d4b48a3d7932d44a7eab4fd443f1fb Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Fixed avfmediaplayersession.mm for OSX 10.10 Yosemite.Jens Cornelis2014-09-111-1/+1
| | | | | | | | Implicit cast caused build to fail. Explicit cast builds fine. Task-number: QTBUG-41136 Change-Id: I0147c26a0f8b8198d6ed9944311547b81a50bccb Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-015-55/+64
|\ | | | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstreamervideoinputdevicecontrol.cpp src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp Change-Id: Ic854589562d2deeaa0ebf75840cb8a2ee32e99de
| * AVFoundation: fix some controls not being correctly destroyed on iOS.Yoann Lopes2014-08-253-4/+9
| | | | | | | | | | | | | | | | | | This patch also makes sure AVF video layers are removed from their parent layer when their corresponding Qt video outputs are destroyed. Task-number: QTBUG-39385 Change-Id: I164cd0da7084f84c0473ed3e396e734acce2a22e Reviewed-by: Andy Nichols <andy.nichols@digia.com>
| * AVFoundation: fix retrieving tracks information from live sources.Yoann Lopes2014-08-252-51/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For live sources, tracks information is available only after the AVPlayer changed its status to AVPlayerStatusReadyToPlay. It also seems to be available only from AVPlayerItem.tracks rather than AVAsset.tracks. The audioAvailableChanged() and videoAvailableChanged() signals are now correclty emitted and the video layer is correctly positioned for live sources. Task-number: QTBUG-38666 Change-Id: I8ee015a6ce81694c1fc1e44c679887cf7ccb0fd6 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-2412-227/+131
| | | | | | | | | | | | | | | | | | - 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>
* | Fix compilation with -no-openglKai Koehne2014-07-011-4/+9
|/ | | | | Change-Id: Ib8f39dcea58018f076d6a3fa733303958c707f1a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* AVFoundation: Add QVideoWindowControl supportAndy Nichols2014-03-204-2/+378
| | | | | | | | | | | | | | | | This adds the capability to render videos directly to native window surfaces when using the AVFoundation plugin. This adds limited support for displaying videos from QML on iOS. These videos are displayed in a CALayer above the QQuickWindow, so it will not be possible to render any QtQuick items on top of a video using the QVideoWindowControl to provide video. [ChangeLog][QtMultimedia][iOS] Add limited support for playing videos in QtQuick on iOS (Videos are played on top of scene with limited transform support). Change-Id: I80381d9a07b45b6fa1959678166e6da0004f8c19 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* AVFoundation: Fix another crash when destroying a QMediaPlayerAndy Nichols2014-03-141-2/+2
| | | | | | | | We need to unload media before we delete the player. Task-number: QTBUG-37447 Change-Id: I09263214c425339c0d8c192091aeaa6e3fb5331f Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* AVFoundation: Prevent Crash in QMediaPlayerAndy Nichols2014-03-071-1/+4
| | | | | | | Task-number: QTBUG-34213 Change-Id: I0883436175439abbb4ea964ed552a17b970ed05c Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* AVFoundation: Call stop() on VideoSurface when changing sourcesAndy Nichols2014-03-041-0/+5
| | | | | | | | | | Before we were reusing the active surface when we switched videos. This leads to an inconsitency in states, and the sourceRect property of the video surface does not get updated. Task-number: QTBUG-28655 Change-Id: Ie29bf1d9b1c11b6f51a869253c730202001c07cf Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* AVFoundation: Fix y-inverted QML VideosAndy Nichols2014-03-041-2/+3
| | | | | | | | | | | | When the code that supports iOS was added, we introduced a bug where QML videos would be played y-inverted on OS X. This is because we made no effort to y-invert the Framebuffer Object before rendering the texture in the SceneGraph. Now we render the video the the FBO y-inverted, so there is no need to y-invert the resulting texture. Task-number: QTBUG-35955 Change-Id: I41af1aaae57923b9972b5be5ec65f7d2a97d77c5 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* AVFoundation: Remove debug codeAndy Nichols2014-03-031-2/+2
| | | | | | | | | Some debug code made it into the released code, so each time you used the QWidget based video player the terminal would print data about the window frame size. Change-Id: I86eb00ce5edb23b7a2abf6a63893cd17aaeb0ee3 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Fixes mediaplayer crashes on OSXtom2014-01-241-11/+23
| | | | | | | | | | | | | Fixes the "libqavfmediaplayer.dylib 0x0000000110fa7c8c -[AVFMediaPlayerSessionObserver unloadMedia]" crash on Macs. The problem was: writing to memory that had already been released. If not sure, one should always check if the objects exist before deleting it. Solution tested on OSX 10.7, 10.8, 10.9 [ChangeLog][qtmultimedia][avfmediaplayersession] Task-number: QTBUG-34213 Change-Id: Iac108711851c348e96e73542b4e71653007eeb54 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* AVFoundation: Enable QVideoWidget on iOSAndy Nichols2013-08-272-22/+21
| | | | | Change-Id: I88041e7a2ea052fe449542eeaada31c09d93d163 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>