[vlc-commits] demux: mp4: add youtube meta

Francois Cartegnie git at videolan.org
Wed Oct 28 18:54:33 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct 28 18:26:23 2015 +0100| [5ee57b864a30473cda72532e8ce0f30e293cd15c] | committer: Francois Cartegnie

demux: mp4: add youtube meta

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ee57b864a30473cda72532e8ce0f30e293cd15c
---

 modules/demux/mp4/libmp4.c |    6 ++++++
 modules/demux/mp4/libmp4.h |    6 ++++++
 modules/demux/mp4/meta.c   |    6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index a2dcc97..9286a89 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -3892,6 +3892,12 @@ static const struct
     { ATOM_rtng,    MP4_ReadBox_Metadata,    ATOM_ilst },
     { ATOM_trkn,    MP4_ReadBox_Metadata,    ATOM_ilst },
     { ATOM_xid_,    MP4_ReadBox_Metadata,    ATOM_ilst },
+    { ATOM_gshh,    MP4_ReadBox_Metadata,    ATOM_ilst }, /* YouTube gs?? */
+    { ATOM_gspm,    MP4_ReadBox_Metadata,    ATOM_ilst },
+    { ATOM_gspu,    MP4_ReadBox_Metadata,    ATOM_ilst },
+    { ATOM_gssd,    MP4_ReadBox_Metadata,    ATOM_ilst },
+    { ATOM_gsst,    MP4_ReadBox_Metadata,    ATOM_ilst },
+    { ATOM_gstd,    MP4_ReadBox_Metadata,    ATOM_ilst },
 
     /* udta */
     { ATOM_0x40PRM, MP4_ReadBox_String,    ATOM_udta },
diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index 757c589..b8fbb71 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -325,6 +325,12 @@ typedef int64_t stime_t;
 #define ATOM_rtng VLC_FOURCC( 'r', 't', 'n', 'g' )
 #define ATOM_tsel VLC_FOURCC( 't', 's', 'e', 'l' )
 #define ATOM_xid_ VLC_FOURCC( 'x', 'i', 'd', ' ' )
+#define ATOM_gshh VLC_FOURCC( 'g', 's', 'h', 'h' )
+#define ATOM_gspm VLC_FOURCC( 'g', 's', 'p', 'm' )
+#define ATOM_gspu VLC_FOURCC( 'g', 's', 'p', 'u' )
+#define ATOM_gssd VLC_FOURCC( 'g', 's', 's', 'd' )
+#define ATOM_gsst VLC_FOURCC( 'g', 's', 's', 't' )
+#define ATOM_gstd VLC_FOURCC( 'g', 's', 't', 'd' )
 
 #define ATOM_0x40PRM VLC_FOURCC( '@', 'P', 'R', 'M' )
 #define ATOM_0x40PRQ VLC_FOURCC( '@', 'P', 'R', 'Q' )
diff --git a/modules/demux/mp4/meta.c b/modules/demux/mp4/meta.c
index 2128107..b597cc3 100644
--- a/modules/demux/mp4/meta.c
+++ b/modules/demux/mp4/meta.c
@@ -95,6 +95,12 @@ static const struct
     { ATOM_flvr,    N_("Encoding Params") },
     { ATOM_vndr,    N_("Vendor") },
     { ATOM_xid_,    N_("Catalog Number") },
+    { ATOM_gshh,    N_("YouTube Host") },
+    { ATOM_gspm,    N_("YouTube Ping Message") },
+    { ATOM_gspu,    N_("YouTube Ping Url") },
+    { ATOM_gssd,    N_("YouTube Source Data") },
+    { ATOM_gsst,    N_("YouTube Start Time") },
+    { ATOM_gstd,    N_("YouTube Track Duration") },
     { 0, "" },
 };
 



More information about the vlc-commits mailing list