Skip to content

Commit

Permalink
fix vc 2010 build error
Browse files Browse the repository at this point in the history
compiler internal error QString x[] = { QStringLiteral("123")};
don't know the reason
  • Loading branch information
wang-bin committed Jan 9, 2015
1 parent d14cb85 commit 9ea24e1
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions qml/MediaMetaData.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/******************************************************************************
QtAV: Media play library based on Qt and FFmpeg
Copyright (C) 2014 Wang Bin <[email protected]>
Copyright (C) 2014-2015 Wang Bin <[email protected]>
theoribeiro <[email protected]>
* This file is part of QtAV
Expand Down Expand Up @@ -104,39 +104,39 @@ MediaMetaData::Key MediaMetaData::fromFFmpegName(const QString &name) const
{
typedef struct {
Key key;
QString name;
const char* name;
} key_t;
key_t key_map[] = {
{ AlbumTitle, QStringLiteral("album") }, //?
{ AlbumArtist, QStringLiteral("album_artist") },
{ Author, QStringLiteral("artist") }, //?
{ Comment, QStringLiteral("comment") },
{ Composer, QStringLiteral("composer") },
{ Copyright, QStringLiteral("copyright") },
// { Date, QStringLiteral("date") }, //QDate
{ Language, QStringLiteral("language") }, //maybe a list in ffmpeg
{ Publisher, QStringLiteral("publisher") },
{ Title, QStringLiteral("title") },
//{ TrackNumber, QStringLiteral("track") }, // can be "current/total"
//{ TrackCount, QStringLiteral("track") }, // can be "current/total"
{ AlbumTitle, "album" }, //?
{ AlbumArtist, "album_artist" },
{ Author, "artist" }, //?
{ Comment, "comment" },
{ Composer, "composer" },
{ Copyright, "copyright" },
// { Date, "date" }, //QDate
{ Language, "language" }, //maybe a list in ffmpeg
{ Publisher, "publisher" },
{ Title, "title" },
//{ TrackNumber, "track" }, // can be "current/total"
//{ TrackCount, "track" }, // can be "current/total"

// below are keys not listed in ffmpeg generic tag names and value is a QString
{ Description, QStringLiteral("description") }, //dx
{ (Key)-1, QString() },
{ Description, "description" }, //dx
{ (Key)-1, 0 },
};
for (int i = 0; (int)key_map[i].key >= 0; ++i) {
if (name.toLower() == key_map[i].name)
return key_map[i].key;
}
// below are keys not listed in ffmpeg generic tag names and value is a QString
key_t wm_key[] = {
{ UserRating, QStringLiteral("rating") }, //dx, WM/
{ ParentalRating, QStringLiteral("parentalrating") }, //dx, WM/
//{ RatingOrganization, QStringLiteral("rating_organization") },
{ Conductor, QStringLiteral("conductor") }, //dx, WM/
{ Lyrics, QStringLiteral("lyrics") }, //dx, WM/
{ Mood, QStringLiteral("mood") }, //dx, WM/
{ (Key)-1, QString() },
{ UserRating, "rating" }, //dx, WM/
{ ParentalRating, "parentalrating" }, //dx, WM/
//{ RatingOrganization, "rating_organization" },
{ Conductor, "conductor" }, //dx, WM/
{ Lyrics, "lyrics" }, //dx, WM/
{ Mood, "mood" }, //dx, WM/
{ (Key)-1, 0 },
};
for (int i = 0; (int)wm_key[i].key >= 0; ++i) {
if (name.toLower().contains(wm_key[i].name))
Expand Down

0 comments on commit 9ea24e1

Please sign in to comment.