forked from wang-bin/QtAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiler internal error QString x[] = { QStringLiteral("123")}; don't know the reason
- Loading branch information
Showing
1 changed file
with
23 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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)) | ||
|