summaryrefslogtreecommitdiffstats
path: root/src/plugins/avfoundation/mediaplayer
Commit message (Collapse)AuthorAgeFilesLines
...
| | * 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>
* AVFoundation: Use CoreAnimation to render video to QVideoWidgetAndy Nichols2013-08-277-262/+115
| | | | | | | | | Previously a QGLWidget was used as a target for the AVFVideoFrameRenderer. This was uncessary as it is possible to render directly on top of the QWidget using the CoreAnimation Framework. Change-Id: I08923c85fd56c8874c1d8c187ae5145e220fab92 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* AVFoundation: Enable use of QMediaPlayer for audio on iOSAndy Nichols2013-08-273-28/+42
| | | | | | | | | This commit disables the video components of the AVFoundation mediaplayer backend when building for iOS and enables the use of QMediaPlayer with audio assets. Change-Id: Iadd6f9c61ed1e656301326e90a22cbca6428b654 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Multimedia plugins now have a unique JSON metadata 'Keys' property.Yoann Lopes2013-06-211-1/+2
| | | | | | | | | | | | | | | | | | | | | They previously had the multimedia services they provided as keys. This was a problem when several plugins were available on the same platform, providing the same multimedia service, but with different features or capabilities. Since they had the same key, only the first plugin in the directory was loaded. Nevertheless, it was actually working until commit 732dcfe7 in qtbase, as all plugins were loaded even when sharing the same key. The services a multimedia plugin provides are now declared in the 'Services' property. To preserve compatibility with third-party plugins, if that new property doesn't exist it falls back to the 'Keys' property. Task-number: QTBUG-31868 Task-number: QTBUG-31476 Change-Id: Ic3ba32eeef21b69b922bd3d4feb111101559d132 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Decouple qmediametadata.h from qmultimedia.hSze Howe Koh2013-05-141-1/+1
| | | | | | | | qmultimedia.h is included in more places, but qmediametadata.h is larger. This patch should reduce unnecessary #include-ing. Change-Id: I4a3d174bafc555d794bb75087c1f6b79745ae903 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* AVFoundation: Emit error when media fails to loadAndy Nichols2013-04-172-8/+9
| | | | | | | | | | | This also makes sure that if you attempt to load an invalid media file while another file is playing that the old session is stopped. Task-number: QTBUG-30411 Change-Id: Ied4dbaffeac50465112c1e94e7c69d1600a6de51 Reviewed-by: Christian Stromme <christian.stromme@digia.com> Reviewed-by: Dan Winkler <dantwinkler@gmail.com>
* AVFoundation: Remove stray semicolon after conditionAndy Nichols2013-04-161-1/+1
| | | | | Change-Id: I1c9a822ee54e7c189fe8806a11334cd23cd79a31 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Doc: Fix minor typosSze Howe Koh2013-04-102-2/+2
| | | | | | Task-number: QTWEBSITE-514 Change-Id: Ie8f3689d18d15fd0e88e0ada4a745d9994d9c2ae Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* make use of qtHaveModule()Oswald Buddenhagen2013-01-111-1/+1
| | | | | | | Change-Id: I14da5455b7dd4681254e1652395df5f5c65746bd Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1022-22/+22
| | | | | | Change-Id: Ia8c1c38aba1544603fada8c414cc856f365fd15b Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Compile in 32-bit mode.Morten Johan Sørvig2013-01-082-5/+5
| | | | | | | | | | CGRect == NSRect only in 64-bit mode. Don't add -framework QuickTime based on the host arch, use QT_ARCH instead. Change-Id: I829bc1bcfe37f70a07e8c55a5bc7dee90aaa981a Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Add PLUGIN_CLASS_NAME to qtmultimedia pluginsMiikka Heikkinen2012-12-101-0/+1
| | | | | | | | Needed for automating static plugin loading. Task-number: QTBUG-28131 Change-Id: Ia392b112fc46dedd34c9ffdbd6e874dbbfeaef83 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fixed build on MacOS with clang in C++11 mode.Erik Verbruggen2012-12-061-5/+5
| | | | | | | | | | avfvideowidget.mm:120:9: error: non-constant-expression cannot be narrowed from type 'int' to 'GLfloat' (aka 'float') in initializer list [-Wc++11-narrowing] x1, y1, zValue, ^~ Change-Id: I5a08bf8b53cf029dbdfaeaa03f4babd6d49d62ad Reviewed-by: Andy Nichols <andy.nichols@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>