Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e28b1e56 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android Git Automerger
Browse files

am ba77a3f9: Add support for the "compilation" tag in mp3, mp4 and ogg, and...

am ba77a3f9: Add support for the "compilation" tag in mp3, mp4 and ogg, and also add support for two common ways of specifying album artist in ogg files. b/3311831

* commit 'ba77a3f9cb1d68b2ed4813aaae856444578e3a75':
  Add support for the "compilation" tag in mp3, mp4 and ogg, and also add support for two common ways of specifying album artist in ogg files. b/3311831
parents e6bf51ea 288fb7e5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ enum {
    METADATA_KEY_MIMETYPE        = 22,
    METADATA_KEY_DISC_NUMBER     = 23,
    METADATA_KEY_ALBUMARTIST     = 24,
    METADATA_KEY_COMPILATION     = 25,
    // Add more here...
};

+1 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ enum {
    kKeyDiscNumber        = 'dnum',  // cstring
    kKeyDate              = 'date',  // cstring
    kKeyWriter            = 'writ',  // cstring
    kKeyCompilation       = 'cpil',  // cstring
    kKeyTimeScale         = 'tmsl',  // int32_t

    // video profile and level
+1 −0
Original line number Diff line number Diff line
@@ -743,6 +743,7 @@ sp<MetaData> MP3Extractor::getMetaData() {
        { kKeyAuthor, "TXT", "TEXT" },
        { kKeyCDTrackNumber, "TRK", "TRCK" },
        { kKeyDiscNumber, "TPA", "TPOS" },
        { kKeyCompilation, "TCP", "TCMP" },
    };
    static const size_t kNumMapEntries = sizeof(kMap) / sizeof(kMap[0]);

+11 −0
Original line number Diff line number Diff line
@@ -1379,6 +1379,17 @@ status_t MPEG4Extractor::parseMetaData(off_t offset, size_t size) {
            metadataKey = kKeyGenre;
            break;
        }
        case FOURCC('c', 'p', 'i', 'l'):
        {
            if (size == 9 && flags == 21) {
                char tmp[16];
                sprintf(tmp, "%d",
                        (int)buffer[size - 1]);

                mFileMetaData->setCString(kKeyCompilation, tmp);
            }
            break;
        }
        case FOURCC('t', 'r', 'k', 'n'):
        {
            if (size == 16 && flags == 0) {
+3 −0
Original line number Diff line number Diff line
@@ -660,6 +660,9 @@ void MyVorbisExtractor::parseFileMetaData() {
    } kMap[] = {
        { "TITLE", kKeyTitle },
        { "ARTIST", kKeyArtist },
        { "ALBUMARTIST", kKeyAlbumArtist },
        { "ALBUM ARTIST", kKeyAlbumArtist },
        { "COMPILATION", kKeyCompilation },
        { "ALBUM", kKeyAlbum },
        { "COMPOSER", kKeyComposer },
        { "GENRE", kKeyGenre },
Loading