45 |
45 |
46 #include <gst/gstversion.h> |
46 #include <gst/gstversion.h> |
47 |
47 |
48 struct QGstreamerMetaDataKeyLookup |
48 struct QGstreamerMetaDataKeyLookup |
49 { |
49 { |
50 QtMedia::MetaData key; |
50 QtMediaServices::MetaData key; |
51 const char *token; |
51 const char *token; |
52 }; |
52 }; |
53 |
53 |
54 static const QGstreamerMetaDataKeyLookup qt_gstreamerMetaDataKeys[] = |
54 static const QGstreamerMetaDataKeyLookup qt_gstreamerMetaDataKeys[] = |
55 { |
55 { |
56 { QtMedia::Title, GST_TAG_TITLE }, |
56 { QtMediaServices::Title, GST_TAG_TITLE }, |
57 //{ QtMedia::SubTitle, 0 }, |
57 //{ QtMediaServices::SubTitle, 0 }, |
58 //{ QtMedia::Author, 0 }, |
58 //{ QtMediaServices::Author, 0 }, |
59 { QtMedia::Comment, GST_TAG_COMMENT }, |
59 { QtMediaServices::Comment, GST_TAG_COMMENT }, |
60 { QtMedia::Description, GST_TAG_DESCRIPTION }, |
60 { QtMediaServices::Description, GST_TAG_DESCRIPTION }, |
61 //{ QtMedia::Category, 0 }, |
61 //{ QtMediaServices::Category, 0 }, |
62 { QtMedia::Genre, GST_TAG_GENRE }, |
62 { QtMediaServices::Genre, GST_TAG_GENRE }, |
63 { QtMedia::Year, "year" }, |
63 { QtMediaServices::Year, "year" }, |
64 //{ QtMedia::UserRating, 0 }, |
64 //{ QtMediaServices::UserRating, 0 }, |
65 |
65 |
66 { QtMedia::Language, GST_TAG_LANGUAGE_CODE }, |
66 { QtMediaServices::Language, GST_TAG_LANGUAGE_CODE }, |
67 |
67 |
68 { QtMedia::Publisher, GST_TAG_ORGANIZATION }, |
68 { QtMediaServices::Publisher, GST_TAG_ORGANIZATION }, |
69 { QtMedia::Copyright, GST_TAG_COPYRIGHT }, |
69 { QtMediaServices::Copyright, GST_TAG_COPYRIGHT }, |
70 //{ QtMedia::ParentalRating, 0 }, |
70 //{ QtMediaServices::ParentalRating, 0 }, |
71 //{ QtMedia::RatingOrganisation, 0 }, |
71 //{ QtMediaServices::RatingOrganisation, 0 }, |
72 |
72 |
73 // Media |
73 // Media |
74 //{ QtMedia::Size, 0 }, |
74 //{ QtMediaServices::Size, 0 }, |
75 //{ QtMedia::MediaType, 0 }, |
75 //{ QtMediaServices::MediaType, 0 }, |
76 { QtMedia::Duration, GST_TAG_DURATION }, |
76 { QtMediaServices::Duration, GST_TAG_DURATION }, |
77 |
77 |
78 // Audio |
78 // Audio |
79 { QtMedia::AudioBitRate, GST_TAG_BITRATE }, |
79 { QtMediaServices::AudioBitRate, GST_TAG_BITRATE }, |
80 { QtMedia::AudioCodec, GST_TAG_AUDIO_CODEC }, |
80 { QtMediaServices::AudioCodec, GST_TAG_AUDIO_CODEC }, |
81 //{ QtMedia::ChannelCount, 0 }, |
81 //{ QtMediaServices::ChannelCount, 0 }, |
82 //{ QtMedia::SampleRate, 0 }, |
82 //{ QtMediaServices::SampleRate, 0 }, |
83 |
83 |
84 // Music |
84 // Music |
85 { QtMedia::AlbumTitle, GST_TAG_ALBUM }, |
85 { QtMediaServices::AlbumTitle, GST_TAG_ALBUM }, |
86 { QtMedia::AlbumArtist, GST_TAG_ARTIST}, |
86 { QtMediaServices::AlbumArtist, GST_TAG_ARTIST}, |
87 { QtMedia::ContributingArtist, GST_TAG_PERFORMER }, |
87 { QtMediaServices::ContributingArtist, GST_TAG_PERFORMER }, |
88 #if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19) |
88 #if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19) |
89 { QtMedia::Composer, GST_TAG_COMPOSER }, |
89 { QtMediaServices::Composer, GST_TAG_COMPOSER }, |
90 #endif |
90 #endif |
91 //{ QtMedia::Conductor, 0 }, |
91 //{ QtMediaServices::Conductor, 0 }, |
92 //{ QtMedia::Lyrics, 0 }, |
92 //{ QtMediaServices::Lyrics, 0 }, |
93 //{ QtMedia::Mood, 0 }, |
93 //{ QtMediaServices::Mood, 0 }, |
94 { QtMedia::TrackNumber, GST_TAG_TRACK_NUMBER }, |
94 { QtMediaServices::TrackNumber, GST_TAG_TRACK_NUMBER }, |
95 |
95 |
96 //{ QtMedia::CoverArtUrlSmall, 0 }, |
96 //{ QtMediaServices::CoverArtUrlSmall, 0 }, |
97 //{ QtMedia::CoverArtUrlLarge, 0 }, |
97 //{ QtMediaServices::CoverArtUrlLarge, 0 }, |
98 |
98 |
99 // Image/Video |
99 // Image/Video |
100 //{ QtMedia::Resolution, 0 }, |
100 //{ QtMediaServices::Resolution, 0 }, |
101 //{ QtMedia::PixelAspectRatio, 0 }, |
101 //{ QtMediaServices::PixelAspectRatio, 0 }, |
102 |
102 |
103 // Video |
103 // Video |
104 //{ QtMedia::VideoFrameRate, 0 }, |
104 //{ QtMediaServices::VideoFrameRate, 0 }, |
105 //{ QtMedia::VideoBitRate, 0 }, |
105 //{ QtMediaServices::VideoBitRate, 0 }, |
106 { QtMedia::VideoCodec, GST_TAG_VIDEO_CODEC }, |
106 { QtMediaServices::VideoCodec, GST_TAG_VIDEO_CODEC }, |
107 |
107 |
108 //{ QtMedia::PosterUrl, 0 }, |
108 //{ QtMediaServices::PosterUrl, 0 }, |
109 |
109 |
110 // Movie |
110 // Movie |
111 //{ QtMedia::ChapterNumber, 0 }, |
111 //{ QtMediaServices::ChapterNumber, 0 }, |
112 //{ QtMedia::Director, 0 }, |
112 //{ QtMediaServices::Director, 0 }, |
113 { QtMedia::LeadPerformer, GST_TAG_PERFORMER }, |
113 { QtMediaServices::LeadPerformer, GST_TAG_PERFORMER }, |
114 //{ QtMedia::Writer, 0 }, |
114 //{ QtMediaServices::Writer, 0 }, |
115 |
115 |
116 // Photos |
116 // Photos |
117 //{ QtMedia::CameraManufacturer, 0 }, |
117 //{ QtMediaServices::CameraManufacturer, 0 }, |
118 //{ QtMedia::CameraModel, 0 }, |
118 //{ QtMediaServices::CameraModel, 0 }, |
119 //{ QtMedia::Event, 0 }, |
119 //{ QtMediaServices::Event, 0 }, |
120 //{ QtMedia::Subject, 0 } |
120 //{ QtMediaServices::Subject, 0 } |
121 }; |
121 }; |
122 |
122 |
123 QGstreamerMetaDataProvider::QGstreamerMetaDataProvider(QGstreamerPlayerSession *session, QObject *parent) |
123 QGstreamerMetaDataProvider::QGstreamerMetaDataProvider(QGstreamerPlayerSession *session, QObject *parent) |
124 :QMetaDataControl(parent), m_session(session) |
124 :QMetaDataControl(parent), m_session(session) |
125 { |
125 { |