summaryrefslogtreecommitdiff
path: root/src/multimedia/platform/darwin/mediaplayer/avfmediaplayersession.mm
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-02-09 12:55:32 +0100
committerLars Knoll <lars.knoll@qt.io>2021-02-12 15:38:47 +0000
commit187419edb2c087063afc5931134d36692f4b39a4 (patch)
tree88d9117e2c6475f8c32d83b2ee09f27b2dba60a9 /src/multimedia/platform/darwin/mediaplayer/avfmediaplayersession.mm
parent3c59ba2b3ce96f578b2d677ecc1fbf7da0b2e27f (diff)
downloadqtmultimedia-187419edb2c087063afc5931134d36692f4b39a4.tar.gz
Rework the metadata handling
Get rid of metadata reader and writer controls. Instead use a simple cross platform value class to store meta data. The backend can then convert to and from whatever the native API expects. Change-Id: I7cf84bfbe8eef2a88615a52ba5afeec50a0652c8 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/multimedia/platform/darwin/mediaplayer/avfmediaplayersession.mm')
-rw-r--r--src/multimedia/platform/darwin/mediaplayer/avfmediaplayersession.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/multimedia/platform/darwin/mediaplayer/avfmediaplayersession.mm b/src/multimedia/platform/darwin/mediaplayer/avfmediaplayersession.mm
index 7fa6d25c6..386e66ecd 100644
--- a/src/multimedia/platform/darwin/mediaplayer/avfmediaplayersession.mm
+++ b/src/multimedia/platform/darwin/mediaplayer/avfmediaplayersession.mm
@@ -39,7 +39,9 @@
#include "avfmediaplayersession_p.h"
#include "avfmediaplayerservice_p.h"
+#include "avfmediaplayercontrol_p.h"
#include "avfvideooutput_p.h"
+#include "avfmetadata_p.h"
#include <qpointer.h>
#include <QFileInfo>
@@ -945,6 +947,10 @@ void AVFMediaPlayerSession::processLoadStateChange(QMediaPlayer::State newState)
AVPlayerItem *playerItem = [static_cast<AVFMediaPlayerSessionObserver*>(m_observer) playerItem];
+ // get the meta data
+ QMediaMetaData metaData = AVFMetaData::fromAsset(playerItem.asset);
+ static_cast<AVFMediaPlayerControl *>(m_service->player())->setMetaData(metaData);
+
if (playerItem) {
// Check each track for audio and video content
AVAssetTrack *videoTrack = nil;