On Wed, 26 Nov 2014, Vittorio Giovara wrote:

Based on L-Smash code by Yusuke Nakamura <[email protected]>.
---
libavformat/mov.c | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index c34d076..b2fd08d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -283,19 +283,40 @@ static int mov_read_udta_string(MOVContext *c, 
AVIOContext *pb, MOVAtom atom)
        if (c->show_xmp)
            return mov_metadata_raw(c, pb, atom.size, "xmp");       break;
    case MKTAG( 'a', 'A', 'R', 'T'): key = "album_artist";          break;
+    case MKTAG( 'a', 'p', 'I', 'D'): key = "account_id";            break;
+    case MKTAG( 'a', 'k', 'I', 'D'): key = "account_type";
+        parse = mov_metadata_int8_no_padding;                       break;
+    case MKTAG( 'c', 'a', 't', 'g'): key = "category";              break;
+    case MKTAG( 'c', 'p', 'i', 'l'): key = "compilation";
+        parse = mov_metadata_int8_no_padding;                       break;
    case MKTAG( 'c', 'p', 'r', 't'): key = "copyright";             break;
    case MKTAG( 'd', 'e', 's', 'c'): key = "description";           break;
    case MKTAG( 'd', 'i', 's', 'k'): key = "disc";
        parse = mov_metadata_track_or_disc_number;                  break;
+    case MKTAG( 'e', 'g', 'i', 'd'): key = "episode_uid";
+        parse = mov_metadata_int8_no_padding;                       break;
    case MKTAG( 'g', 'n', 'r', 'e'): key = "genre";
        parse = mov_metadata_gnre;                                  break;
+    case MKTAG( 'g', 'r', 'u', 'p'): key = "grouping";
    case MKTAG( 'h', 'd', 'v', 'd'): key = "hd_video";
        parse = mov_metadata_int8_no_padding;                       break;
+    case MKTAG( 'k', 'e', 'y', 'w'): key = "keywords";              break;
    case MKTAG( 'l', 'd', 'e', 's'): key = "synopsis";              break;
    case MKTAG( 'l', 'o', 'c', 'i'):
        return mov_metadata_loci(c, pb, atom.size);
+    case MKTAG( 'p', 'c', 's', 't'): key = "podcast";
+        parse = mov_metadata_int8_no_padding;
    case MKTAG( 'p', 'g', 'a', 'p'): key = "gapless_playback";
        parse = mov_metadata_int8_no_padding;                       break;
+    case MKTAG( 'p', 'u', 'r', 'd'): key = "purchase_date";         break;
+    case MKTAG( 'r', 't', 'n', 'g'): key = "rating";
+        parse = mov_metadata_int8_no_padding;                       break;
+    case MKTAG( 's', 'o', 'a', 'a'): key = "sort_album_artist";     break;
+    case MKTAG( 's', 'o', 'a', 'l'): key = "sort_album";            break;
+    case MKTAG( 's', 'o', 'a', 'r'): key = "sort_artist";           break;
+    case MKTAG( 's', 'o', 'c', 'o'): key = "sort_composer";         break;
+    case MKTAG( 's', 'o', 'n', 'm'): key = "sort_name";             break;
+    case MKTAG( 's', 'o', 's', 'n'): key = "sort_show";             break;
    case MKTAG( 's', 't', 'i', 'k'): key = "media_type";
        parse = mov_metadata_int8_no_padding;                       break;
    case MKTAG( 't', 'r', 'k', 'n'): key = "track";
@@ -303,8 +324,8 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
    case MKTAG( 't', 'v', 'e', 'n'): key = "episode_id";            break;
    case MKTAG( 't', 'v', 'e', 's'): key = "episode_sort";
        parse = mov_metadata_int8_bypass_padding;                   break;
-    case MKTAG( 't', 'v', 'n', 'n'): key = "network";               break;
-    case MKTAG( 't', 'v', 's', 'h'): key = "show";                  break;
+    case MKTAG( 't', 'v', 'n', 'n'): key = "tv_network";            break;
+    case MKTAG( 't', 'v', 's', 'h'): key = "tv_show";               break;
    case MKTAG( 't', 'v', 's', 'n'): key = "season_number";
        parse = mov_metadata_int8_bypass_padding;                   break;
    case MKTAG(0xa9, 'A', 'R', 'T'): key = "artist";                break;
@@ -315,12 +336,16 @@ static int mov_read_udta_string(MOVContext *c, 
AVIOContext *pb, MOVAtom atom)
    case MKTAG(0xa9, 'd', 'a', 'y'): key = "date";                  break;
    case MKTAG(0xa9, 'e', 'n', 'c'): key = "encoder";               break;
    case MKTAG(0xa9, 'g', 'e', 'n'): key = "genre";                 break;
+    case MKTAG(0xa9, 'g', 'r', 'p'): key = "grouping";              break;
    case MKTAG(0xa9, 'i', 'n', 'f'): key = "comment";               break;
+    case MKTAG(0xa9, 'l', 'y', 'r'): key = "lyrics";                break;
    case MKTAG(0xa9, 'n', 'a', 'm'): key = "title";                 break;
+    case MKTAG(0xa9, 's', 't', '3'): key = "subtitle";              break;
    case MKTAG(0xa9, 's', 'w', 'r'): key = "encoder";               break;
-    case MKTAG(0xa9, 't', 'o', 'o'): key = "encoder";               break;
+    case MKTAG(0xa9, 't', 'o', 'o'): key = "software";              break;

This changes what metadata key is used for some of the already existing keys. Especially for this particular key, I do know of people using it to disambiguate between which version of lavf has created files, for the case when the default behaviour has changed for some parameter. Changing this, and people's code will keep looking for a key that doesn't exist any longer.

Please don't mix such changes under the subject "expand the list of parsed tags" - whether the change itself makes sense or not is a different topic, but it most definitely doesn't belong here.

    case MKTAG(0xa9, 'w', 'r', 't'): key = "composer";              break;
    case MKTAG(0xa9, 'x', 'y', 'z'): key = "location";              break;
+    case MKTAG( '-', '-', '-', '-'): key = "custom";                break;

Um, what?

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to