]> git.sesse.net Git - vlc/blobdiff - modules/demux/mp4/libmp4.h
MP4: update Copyright
[vlc] / modules / demux / mp4 / libmp4.h
index 148ea62fc470cc282c034c93c9a0e67aaff28c14..688cd0c801c2f4b61b4c21fa3d6e34f6d1adfc88 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * libmp4.h : LibMP4 library for mp4 module for vlc
  *****************************************************************************
- * Copyright (C) 2001-2004 the VideoLAN team
+ * Copyright (C) 2001-2004, 2010 the VideoLAN team
  * $Id$
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
 #define FOURCC_sawb VLC_FOURCC( 's', 'a', 'w', 'b' )
 #define FOURCC_OggS VLC_FOURCC( 'O', 'g', 'g', 'S' )
 #define FOURCC_alac VLC_FOURCC( 'a', 'l', 'a', 'c' )
+#define FOURCC_dac3 VLC_FOURCC( 'd', 'a', 'c', '3' )
+#define FOURCC_dec3 VLC_FOURCC( 'd', 'e', 'c', '3' )
+#define FOURCC_enda VLC_FOURCC( 'e', 'n', 'd', 'a' )
+#define FOURCC_gnre VLC_FOURCC( 'g', 'n', 'r', 'e' )
+#define FOURCC_trkn VLC_FOURCC( 't', 'r', 'k', 'n' )
 
 #define FOURCC_zlib VLC_FOURCC( 'z', 'l', 'i', 'b' )
 #define FOURCC_SVQ1 VLC_FOURCC( 'S', 'V', 'Q', '1' )
 
 #define FOURCC_dvc  VLC_FOURCC( 'd', 'v', 'c', ' ' )
 #define FOURCC_dvp  VLC_FOURCC( 'd', 'v', 'p', ' ' )
+#define FOURCC_dv5n VLC_FOURCC( 'd', 'v', '5', 'n' )
+#define FOURCC_dv5p VLC_FOURCC( 'd', 'v', '5', 'p' )
 #define FOURCC_raw  VLC_FOURCC( 'r', 'a', 'w', ' ' )
 
 #define FOURCC_jpeg VLC_FOURCC( 'j', 'p', 'e', 'g' )
 #define FOURCC_iviv VLC_FOURCC( 'i', 'v', 'i', 'v' )
 #define FOURCC_name VLC_FOURCC( 'n', 'a', 'm', 'e' )
 #define FOURCC_priv VLC_FOURCC( 'p', 'r', 'i', 'v' )
+#define FOURCC_drmi VLC_FOURCC( 'd', 'r', 'm', 'i' )
+#define FOURCC_frma VLC_FOURCC( 'f', 'r', 'm', 'a' )
+#define FOURCC_skcr VLC_FOURCC( 's', 'k', 'c', 'r' )
 
 #define FOURCC_text VLC_FOURCC( 't', 'e', 'x', 't' )
 #define FOURCC_tx3g VLC_FOURCC( 't', 'x', '3', 'g' )
 #define FOURCC_subp VLC_FOURCC( 's', 'u', 'b', 'p' )
+#define FOURCC_sbtl VLC_FOURCC( 's', 'b', 't', 'l' )
 
 #define FOURCC_0xa9nam VLC_FOURCC( 0xa9, 'n', 'a', 'm' )
 #define FOURCC_0xa9aut VLC_FOURCC( 0xa9, 'a', 'u', 't' )
-#define FOURCC_0xa9swr VLC_FOURCC( 0xa9, 's', 'w', 'r' )
 #define FOURCC_0xa9cpy VLC_FOURCC( 0xa9, 'c', 'p', 'y' )
 #define FOURCC_0xa9inf VLC_FOURCC( 0xa9, 'i', 'n', 'f' )
 #define FOURCC_0xa9ART VLC_FOURCC( 0xa9, 'A', 'R', 'T' )
 #define FOURCC_0xa9wrt VLC_FOURCC( 0xa9, 'w', 'r', 't' )
 #define FOURCC_0xa9com VLC_FOURCC( 0xa9, 'c', 'o', 'm' )
 #define FOURCC_0xa9gen VLC_FOURCC( 0xa9, 'g', 'e', 'n' )
+#define FOURCC_0xa9too VLC_FOURCC( 0xa9, 't', 'o', 'o' )
+#define FOURCC_0xa9wrn VLC_FOURCC( 0xa9, 'w', 'r', 'n' )
+#define FOURCC_0xa9swr VLC_FOURCC( 0xa9, 's', 'w', 'r' )
+#define FOURCC_0xa9mak VLC_FOURCC( 0xa9, 'm', 'a', 'k' )
+#define FOURCC_0xa9mod VLC_FOURCC( 0xa9, 'm', 'o', 'd' )
+#define FOURCC_0xa9PRD VLC_FOURCC( 0xa9, 'P', 'R', 'D' )
+#define FOURCC_0xa9grp VLC_FOURCC( 0xa9, 'g', 'r', 'p' )
+#define FOURCC_0xa9lyr VLC_FOURCC( 0xa9, 'g', 'r', 'p' )
 #define FOURCC_chpl VLC_FOURCC( 'c', 'h', 'p', 'l' )
 #define FOURCC_WLOC VLC_FOURCC( 'W', 'L', 'O', 'C' )
 
 #define FOURCC_meta VLC_FOURCC( 'm', 'e', 't', 'a' )
 #define FOURCC_ilst VLC_FOURCC( 'i', 'l', 's', 't' )
 
+#define FOURCC_chap VLC_FOURCC( 'c', 'h', 'a', 'p' )
+
 /* Do you want some debug information on all read boxes ? */
 #define MP4_VERBOSE  1
 
@@ -297,6 +317,7 @@ typedef struct MP4_Box_data_mdhd_s
     uint64_t i_duration;
 
     /* one bit for pad */
+    uint16_t      i_language_code;
     /* unsigned int(5)[3] language difference with 0x60*/
     unsigned char i_language[3];
     uint16_t i_predefined;
@@ -463,6 +484,8 @@ typedef struct MP4_Box_data_sample_vide_s
     int     i_qt_image_description;
     uint8_t *p_qt_image_description;
 
+    void    *p_drms;
+
 } MP4_Box_data_sample_vide_t;
 
 #define MP4_TEXT_DISPLAY_FLAG_DONT_DISPLAY       (1<<0)
@@ -739,6 +762,18 @@ typedef struct MP4_Box_data_cmov_s
 
 } MP4_Box_data_cmov_t;
 
+typedef struct
+{
+    uint32_t i_type;
+} MP4_Box_data_frma_t;
+
+typedef struct
+{
+    uint32_t i_init;
+    uint32_t i_encr;
+    uint32_t i_decr;
+} MP4_Box_data_skcr_t;
+
 typedef struct
 {
     uint8_t  i_version;
@@ -791,6 +826,13 @@ typedef struct
 
 } MP4_Box_data_0xa9xxx_t;
 
+typedef struct
+{
+    uint32_t i_entry_count;
+    uint32_t *i_track_ID;
+
+} MP4_Box_data_tref_generic_t;
+
 typedef struct
 {
     uint8_t  i_version;
@@ -829,6 +871,36 @@ typedef struct
 
 } MP4_Box_data_avcC_t;
 
+typedef struct
+{
+    uint8_t i_fscod;
+    uint8_t i_bsid;
+    uint8_t i_bsmod;
+    uint8_t i_acmod;
+    uint8_t i_lfeon;
+    uint8_t i_bitrate_code;
+
+} MP4_Box_data_dac3_t;
+
+typedef struct
+{
+    uint16_t i_little_endian;
+
+} MP4_Box_data_enda_t;
+
+typedef struct
+{
+    uint16_t i_genre;
+
+} MP4_Box_data_gnre_t;
+
+typedef struct
+{
+    uint32_t i_track_number;
+    uint32_t i_track_total;
+
+} MP4_Box_data_trkn_t;
+
 /*
 typedef struct MP4_Box_data__s
 {
@@ -855,13 +927,17 @@ typedef union MP4_Box_data_s
     MP4_Box_data_stts_t *p_stts;
     MP4_Box_data_ctts_t *p_ctts;
     MP4_Box_data_stsd_t *p_stsd;
-        MP4_Box_data_sample_vide_t *p_sample_vide;
-        MP4_Box_data_sample_soun_t *p_sample_soun;
-        MP4_Box_data_sample_text_t *p_sample_text;
-        MP4_Box_data_sample_hint_t *p_sample_hint;
-
-        MP4_Box_data_esds_t *p_esds;
-        MP4_Box_data_avcC_t *p_avcC;
+    MP4_Box_data_sample_vide_t *p_sample_vide;
+    MP4_Box_data_sample_soun_t *p_sample_soun;
+    MP4_Box_data_sample_text_t *p_sample_text;
+    MP4_Box_data_sample_hint_t *p_sample_hint;
+
+    MP4_Box_data_esds_t *p_esds;
+    MP4_Box_data_avcC_t *p_avcC;
+    MP4_Box_data_dac3_t *p_dac3;
+    MP4_Box_data_enda_t *p_enda;
+    MP4_Box_data_gnre_t *p_gnre;
+    MP4_Box_data_trkn_t *p_trkn;
 
     MP4_Box_data_stsz_t *p_stsz;
     MP4_Box_data_stz2_t *p_stz2;
@@ -880,6 +956,9 @@ typedef union MP4_Box_data_s
 
     MP4_Box_data_moviehintinformation_rtp_t p_moviehintinformation_rtp;
 
+    MP4_Box_data_frma_t *p_frma;
+    MP4_Box_data_skcr_t *p_skcr;
+
     MP4_Box_data_rdrf_t *p_rdrf;
     MP4_Box_data_rmdr_t *p_rmdr;
     MP4_Box_data_rmqu_t *p_rmqu;
@@ -887,6 +966,7 @@ typedef union MP4_Box_data_s
 
     MP4_Box_data_0xa9xxx_t *p_0xa9xxx;
     MP4_Box_data_chpl_t *p_chpl;
+    MP4_Box_data_tref_generic_t *p_tref_generic;
 
     void                *p_data; /* for unknow type */
 } MP4_Box_data_t;