52 #ifndef QT_NO_WMSDK |
52 #ifndef QT_NO_WMSDK |
53 namespace |
53 namespace |
54 { |
54 { |
55 struct QWMMetaDataKeyLookup |
55 struct QWMMetaDataKeyLookup |
56 { |
56 { |
57 QtMedia::MetaData key; |
57 QtMediaServices::MetaData key; |
58 const wchar_t *token; |
58 const wchar_t *token; |
59 }; |
59 }; |
60 } |
60 } |
61 |
61 |
62 static const QWMMetaDataKeyLookup qt_wmMetaDataKeys[] = |
62 static const QWMMetaDataKeyLookup qt_wmMetaDataKeys[] = |
63 { |
63 { |
64 { QtMedia::Title, L"Title" }, |
64 { QtMediaServices::Title, L"Title" }, |
65 { QtMedia::SubTitle, L"WM/SubTitle" }, |
65 { QtMediaServices::SubTitle, L"WM/SubTitle" }, |
66 { QtMedia::Author, L"Author" }, |
66 { QtMediaServices::Author, L"Author" }, |
67 { QtMedia::Comment, L"Comment" }, |
67 { QtMediaServices::Comment, L"Comment" }, |
68 { QtMedia::Description, L"Description" }, |
68 { QtMediaServices::Description, L"Description" }, |
69 { QtMedia::Category, L"WM/Category" }, |
69 { QtMediaServices::Category, L"WM/Category" }, |
70 { QtMedia::Genre, L"WM/Genre" }, |
70 { QtMediaServices::Genre, L"WM/Genre" }, |
71 //{ QtMedia::Date, 0 }, |
71 //{ QtMediaServices::Date, 0 }, |
72 { QtMedia::Year, L"WM/Year" }, |
72 { QtMediaServices::Year, L"WM/Year" }, |
73 { QtMedia::UserRating, L"UserRating" }, |
73 { QtMediaServices::UserRating, L"UserRating" }, |
74 //{ QtMedia::MetaDatawords, 0 }, |
74 //{ QtMediaServices::MetaDatawords, 0 }, |
75 { QtMedia::Language, L"Language" }, |
75 { QtMediaServices::Language, L"Language" }, |
76 { QtMedia::Publisher, L"WM/Publisher" }, |
76 { QtMediaServices::Publisher, L"WM/Publisher" }, |
77 { QtMedia::Copyright, L"Copyright" }, |
77 { QtMediaServices::Copyright, L"Copyright" }, |
78 { QtMedia::ParentalRating, L"ParentalRating" }, |
78 { QtMediaServices::ParentalRating, L"ParentalRating" }, |
79 { QtMedia::RatingOrganisation, L"RatingOrganisation" }, |
79 { QtMediaServices::RatingOrganisation, L"RatingOrganisation" }, |
80 |
80 |
81 // Media |
81 // Media |
82 { QtMedia::Size, L"FileSize" }, |
82 { QtMediaServices::Size, L"FileSize" }, |
83 { QtMedia::MediaType, L"MediaType" }, |
83 { QtMediaServices::MediaType, L"MediaType" }, |
84 { QtMedia::Duration, L"Duration" }, |
84 { QtMediaServices::Duration, L"Duration" }, |
85 |
85 |
86 // Audio |
86 // Audio |
87 { QtMedia::AudioBitRate, L"AudioBitRate" }, |
87 { QtMediaServices::AudioBitRate, L"AudioBitRate" }, |
88 { QtMedia::AudioCodec, L"AudioCodec" }, |
88 { QtMediaServices::AudioCodec, L"AudioCodec" }, |
89 { QtMedia::ChannelCount, L"ChannelCount" }, |
89 { QtMediaServices::ChannelCount, L"ChannelCount" }, |
90 { QtMedia::SampleRate, L"Frequency" }, |
90 { QtMediaServices::SampleRate, L"Frequency" }, |
91 |
91 |
92 // Music |
92 // Music |
93 { QtMedia::AlbumTitle, L"WM/AlbumTitle" }, |
93 { QtMediaServices::AlbumTitle, L"WM/AlbumTitle" }, |
94 { QtMedia::AlbumArtist, L"WM/AlbumArtist" }, |
94 { QtMediaServices::AlbumArtist, L"WM/AlbumArtist" }, |
95 { QtMedia::ContributingArtist, L"Author" }, |
95 { QtMediaServices::ContributingArtist, L"Author" }, |
96 { QtMedia::Composer, L"WM/Composer" }, |
96 { QtMediaServices::Composer, L"WM/Composer" }, |
97 { QtMedia::Conductor, L"WM/Conductor" }, |
97 { QtMediaServices::Conductor, L"WM/Conductor" }, |
98 { QtMedia::Lyrics, L"WM/Lyrics" }, |
98 { QtMediaServices::Lyrics, L"WM/Lyrics" }, |
99 { QtMedia::Mood, L"WM/Mood" }, |
99 { QtMediaServices::Mood, L"WM/Mood" }, |
100 { QtMedia::TrackNumber, L"WM/TrackNumber" }, |
100 { QtMediaServices::TrackNumber, L"WM/TrackNumber" }, |
101 //{ QtMedia::TrackCount, 0 }, |
101 //{ QtMediaServices::TrackCount, 0 }, |
102 //{ QtMedia::CoverArtUriSmall, 0 }, |
102 //{ QtMediaServices::CoverArtUriSmall, 0 }, |
103 //{ QtMedia::CoverArtUriLarge, 0 }, |
103 //{ QtMediaServices::CoverArtUriLarge, 0 }, |
104 |
104 |
105 // Image/Video |
105 // Image/Video |
106 //{ QtMedia::Resolution, 0 }, |
106 //{ QtMediaServices::Resolution, 0 }, |
107 //{ QtMedia::PixelAspectRatio, 0 }, |
107 //{ QtMediaServices::PixelAspectRatio, 0 }, |
108 |
108 |
109 // Video |
109 // Video |
110 //{ QtMedia::FrameRate, 0 }, |
110 //{ QtMediaServices::FrameRate, 0 }, |
111 { QtMedia::VideoBitRate, L"VideoBitRate" }, |
111 { QtMediaServices::VideoBitRate, L"VideoBitRate" }, |
112 { QtMedia::VideoCodec, L"VideoCodec" }, |
112 { QtMediaServices::VideoCodec, L"VideoCodec" }, |
113 |
113 |
114 //{ QtMedia::PosterUri, 0 }, |
114 //{ QtMediaServices::PosterUri, 0 }, |
115 |
115 |
116 // Movie |
116 // Movie |
117 { QtMedia::ChapterNumber, L"ChapterNumber" }, |
117 { QtMediaServices::ChapterNumber, L"ChapterNumber" }, |
118 { QtMedia::Director, L"WM/Director" }, |
118 { QtMediaServices::Director, L"WM/Director" }, |
119 { QtMedia::LeadPerformer, L"LeadPerformer" }, |
119 { QtMediaServices::LeadPerformer, L"LeadPerformer" }, |
120 { QtMedia::Writer, L"WM/Writer" }, |
120 { QtMediaServices::Writer, L"WM/Writer" }, |
121 |
121 |
122 // Photos |
122 // Photos |
123 { QtMedia::CameraManufacturer, L"CameraManufacturer" }, |
123 { QtMediaServices::CameraManufacturer, L"CameraManufacturer" }, |
124 { QtMedia::CameraModel, L"CameraModel" }, |
124 { QtMediaServices::CameraModel, L"CameraModel" }, |
125 { QtMedia::Event, L"Event" }, |
125 { QtMediaServices::Event, L"Event" }, |
126 { QtMedia::Subject, L"Subject" } |
126 { QtMediaServices::Subject, L"Subject" } |
127 }; |
127 }; |
128 |
128 |
129 static QVariant getValue(IWMHeaderInfo *header, const wchar_t *key) |
129 static QVariant getValue(IWMHeaderInfo *header, const wchar_t *key) |
130 { |
130 { |
131 WORD streamNumber = 0; |
131 WORD streamNumber = 0; |