gst_plugins_good/gst/qtmux/atoms.h
branchRCL_3
changeset 30 7e817e7e631c
parent 29 567bb019e3e3
equal deleted inserted replaced
29:567bb019e3e3 30:7e817e7e631c
     1 /* Quicktime muxer plugin for GStreamer
       
     2  * Copyright (C) 2008 Thiago Sousa Santos <thiagoss@embedded.ufcg.edu.br>
       
     3  *
       
     4  * This library is free software; you can redistribute it and/or
       
     5  * modify it under the terms of the GNU Library General Public
       
     6  * License as published by the Free Software Foundation; either
       
     7  * version 2 of the License, or (at your option) any later version.
       
     8  *
       
     9  * This library is distributed in the hope that it will be useful,
       
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    12  * Library General Public License for more details.
       
    13  *
       
    14  * You should have received a copy of the GNU Library General Public
       
    15  * License along with this library; if not, write to the
       
    16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       
    17  * Boston, MA 02111-1307, USA.
       
    18  */
       
    19 /*
       
    20  * Unless otherwise indicated, Source Code is licensed under MIT license.
       
    21  * See further explanation attached in License Statement (distributed in the file
       
    22  * LICENSE).
       
    23  *
       
    24  * Permission is hereby granted, free of charge, to any person obtaining a copy of
       
    25  * this software and associated documentation files (the "Software"), to deal in
       
    26  * the Software without restriction, including without limitation the rights to
       
    27  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
       
    28  * of the Software, and to permit persons to whom the Software is furnished to do
       
    29  * so, subject to the following conditions:
       
    30  *
       
    31  * The above copyright notice and this permission notice shall be included in all
       
    32  * copies or substantial portions of the Software.
       
    33  *
       
    34  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
       
    35  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
       
    36  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
       
    37  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
       
    38  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
       
    39  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
       
    40  * SOFTWARE.
       
    41  */
       
    42 
       
    43 #ifndef __ATOMS_H__
       
    44 #define __ATOMS_H__
       
    45 
       
    46 #include <glib.h>
       
    47 #include <string.h>
       
    48 
       
    49 #include "descriptors.h"
       
    50 #include "properties.h"
       
    51 #include "fourcc.h"
       
    52 #include "ftypcc.h"
       
    53 
       
    54 /* light-weight context that may influence header atom tree construction */
       
    55 typedef enum _AtomsTreeFlavor
       
    56 {
       
    57   ATOMS_TREE_FLAVOR_MOV,
       
    58   ATOMS_TREE_FLAVOR_ISOM,
       
    59   ATOMS_TREE_FLAVOR_3GP
       
    60 } AtomsTreeFlavor;
       
    61 
       
    62 typedef struct _AtomsContext
       
    63 {
       
    64   AtomsTreeFlavor flavor;
       
    65 } AtomsContext;
       
    66 
       
    67 AtomsContext* atoms_context_new  (AtomsTreeFlavor flavor);
       
    68 void          atoms_context_free (AtomsContext *context);
       
    69 
       
    70 #define METADATA_DATA_FLAG 0x0
       
    71 #define METADATA_TEXT_FLAG 0x1
       
    72 
       
    73 /* atom defs and functions */
       
    74 
       
    75 /**
       
    76  * Used for storing time related values for some atoms.
       
    77  */
       
    78 typedef struct _TimeInfo
       
    79 {
       
    80   guint64 creation_time;
       
    81   guint64 modification_time;
       
    82   guint32 timescale;
       
    83   guint64 duration;
       
    84 } TimeInfo;
       
    85 
       
    86 typedef struct _Atom
       
    87 {
       
    88   guint32 size;
       
    89   guint32 type;
       
    90   guint64 extended_size;
       
    91 } Atom;
       
    92 
       
    93 typedef struct _AtomFull
       
    94 {
       
    95   Atom header;
       
    96 
       
    97   guint8 version;
       
    98   guint8 flags[3];
       
    99 } AtomFull;
       
   100 
       
   101 /*
       
   102  * Generic extension atom
       
   103  */
       
   104 typedef struct _AtomData
       
   105 {
       
   106   Atom header;
       
   107 
       
   108   /* not written */
       
   109   guint32 datalen;
       
   110   guint8 *data;
       
   111 } AtomData;
       
   112 
       
   113 typedef struct _AtomFTYP
       
   114 {
       
   115   Atom header;
       
   116   guint32 major_brand;
       
   117   guint32 version;
       
   118   guint32 *compatible_brands;
       
   119 
       
   120   /* not written */
       
   121   guint32 compatible_brands_size;
       
   122 } AtomFTYP;
       
   123 
       
   124 typedef struct _AtomMVHD
       
   125 {
       
   126   AtomFull header;
       
   127 
       
   128   /* version 0: 32 bits */
       
   129   TimeInfo time_info;
       
   130 
       
   131   guint32 prefered_rate;      /* ISO: 0x00010000 */
       
   132   guint16 volume;             /* ISO: 0x0100 */
       
   133   guint16 reserved3;          /* ISO: 0x0 */
       
   134   guint32 reserved4[2];       /* ISO: 0, 0 */
       
   135   /* ISO: identity matrix =
       
   136    * { 0x00010000, 0, 0, 0, 0x00010000, 0, 0, 0, 0x40000000 } */
       
   137   guint32 matrix[9];
       
   138 
       
   139   /* ISO: all 0 */
       
   140   guint32 preview_time;
       
   141   guint32 preview_duration;
       
   142   guint32 poster_time;
       
   143   guint32 selection_time;
       
   144   guint32 selection_duration;
       
   145   guint32 current_time;
       
   146 
       
   147   guint32 next_track_id;
       
   148 } AtomMVHD;
       
   149 
       
   150 typedef struct _AtomTKHD
       
   151 {
       
   152   AtomFull header;
       
   153 
       
   154   /* version 0: 32 bits */
       
   155   /* like the TimeInfo struct, but it has this track_ID inside */
       
   156   guint64 creation_time;
       
   157   guint64 modification_time;
       
   158   guint32 track_ID;
       
   159   guint32 reserved;
       
   160   guint64 duration;
       
   161 
       
   162   guint32 reserved2[2];
       
   163   guint16 layer;
       
   164   guint16 alternate_group;
       
   165   guint16 volume;
       
   166   guint16 reserved3;
       
   167 
       
   168   /* ISO: identity matrix =
       
   169    * { 0x00010000, 0, 0, 0, 0x00010000, 0, 0, 0, 0x40000000 } */
       
   170   guint32 matrix[9];
       
   171   guint32 width;
       
   172   guint32 height;
       
   173 } AtomTKHD;
       
   174 
       
   175 typedef struct _AtomMDHD
       
   176 {
       
   177   AtomFull header;
       
   178 
       
   179   /* version 0: 32 bits */
       
   180   TimeInfo time_info;
       
   181 
       
   182   /* ISO: packed ISO-639-2/T language code (first bit must be 0) */
       
   183   guint16 language_code;
       
   184   /* ISO: 0 */
       
   185   guint16 quality;
       
   186 } AtomMDHD;
       
   187 
       
   188 typedef struct _AtomHDLR
       
   189 {
       
   190   AtomFull header;
       
   191 
       
   192   /* ISO: 0 */
       
   193   guint32 component_type;
       
   194   guint32 handler_type;
       
   195   guint32 manufacturer;
       
   196   guint32 flags;
       
   197   guint32 flags_mask;
       
   198   gchar *name;
       
   199 } AtomHDLR;
       
   200 
       
   201 typedef struct _AtomVMHD
       
   202 {
       
   203   AtomFull header;          /* ISO: flags = 1 */
       
   204 
       
   205   guint16 graphics_mode;
       
   206   /* RGB */
       
   207   guint16 opcolor[3];
       
   208 } AtomVMHD;
       
   209 
       
   210 typedef struct _AtomSMHD
       
   211 {
       
   212   AtomFull header;
       
   213 
       
   214   guint16 balance;
       
   215   guint16 reserved;
       
   216 } AtomSMHD;
       
   217 
       
   218 typedef struct _AtomHMHD
       
   219 {
       
   220   AtomFull header;
       
   221 
       
   222   guint16 max_pdu_size;
       
   223   guint16 avg_pdu_size;
       
   224   guint32 max_bitrate;
       
   225   guint32 avg_bitrate;
       
   226   guint32 sliding_avg_bitrate;
       
   227 } AtomHMHD;
       
   228 
       
   229 typedef struct _AtomURL
       
   230 {
       
   231   AtomFull header;
       
   232 
       
   233   gchar *location;
       
   234 } AtomURL;
       
   235 
       
   236 typedef struct _AtomDREF
       
   237 {
       
   238   AtomFull header;
       
   239 
       
   240   GList *entries;
       
   241 } AtomDREF;
       
   242 
       
   243 typedef struct _AtomDINF
       
   244 {
       
   245   Atom header;
       
   246 
       
   247   AtomDREF dref;
       
   248 } AtomDINF;
       
   249 
       
   250 typedef struct _STTSEntry
       
   251 {
       
   252   guint32 sample_count;
       
   253   gint32 sample_delta;
       
   254 } STTSEntry;
       
   255 
       
   256 typedef struct _AtomSTTS
       
   257 {
       
   258   AtomFull header;
       
   259 
       
   260   guint n_entries;
       
   261   /* list of STTSEntry */
       
   262   GList *entries;
       
   263 } AtomSTTS;
       
   264 
       
   265 typedef struct _AtomSTSS
       
   266 {
       
   267   AtomFull header;
       
   268 
       
   269   guint n_entries;
       
   270   /* list of sample indexes (guint32) */
       
   271   GList *entries;
       
   272 } AtomSTSS;
       
   273 
       
   274 typedef struct _AtomESDS
       
   275 {
       
   276   AtomFull header;
       
   277 
       
   278   ESDescriptor es;
       
   279 } AtomESDS;
       
   280 
       
   281 typedef struct _AtomFRMA
       
   282 {
       
   283   Atom header;
       
   284 
       
   285   guint32 media_type;
       
   286 } AtomFRMA;
       
   287 
       
   288 typedef enum _SampleEntryKind
       
   289 {
       
   290   UNKNOWN,
       
   291   AUDIO,
       
   292   VIDEO
       
   293 } SampleEntryKind;
       
   294 
       
   295 typedef struct _SampleTableEntry
       
   296 {
       
   297   Atom header;
       
   298 
       
   299   guint8 reserved[6];
       
   300   guint16 data_reference_index;
       
   301 
       
   302   /* sort of entry */
       
   303   SampleEntryKind kind;
       
   304 } SampleTableEntry;
       
   305 
       
   306 typedef struct _AtomHintSampleEntry
       
   307 {
       
   308   SampleTableEntry se;
       
   309   guint32 size;
       
   310   guint8 *data;
       
   311 } AtomHintSampleEntry;
       
   312 
       
   313 typedef struct _SampleTableEntryMP4V
       
   314 {
       
   315   SampleTableEntry se;
       
   316 
       
   317   guint16 version;
       
   318   guint16 revision_level;
       
   319 
       
   320   guint32 vendor;                 /* fourcc code */
       
   321   guint32 temporal_quality;
       
   322   guint32 spatial_quality;
       
   323 
       
   324   guint16 width;
       
   325   guint16 height;
       
   326 
       
   327   guint32 horizontal_resolution;
       
   328   guint32 vertical_resolution;
       
   329   guint32 datasize;
       
   330 
       
   331   guint16 frame_count;            /* usually 1 */
       
   332 
       
   333   guint8 compressor[32];         /* pascal string, i.e. first byte = length */
       
   334 
       
   335   guint16 depth;
       
   336   guint16 color_table_id;
       
   337 
       
   338   /* (optional) list of AtomInfo */
       
   339   GList *extension_atoms;
       
   340 } SampleTableEntryMP4V;
       
   341 
       
   342 typedef struct _SampleTableEntryMP4A
       
   343 {
       
   344   SampleTableEntry se;
       
   345 
       
   346   guint16 version;
       
   347   guint16 revision_level;
       
   348   guint32 vendor;
       
   349 
       
   350   guint16 channels;
       
   351   guint16 sample_size;
       
   352   guint16 compression_id;
       
   353   guint16 packet_size;
       
   354 
       
   355   guint32 sample_rate;            /* fixed point 16.16 */
       
   356 
       
   357   guint32 samples_per_packet;
       
   358   guint32 bytes_per_packet;
       
   359   guint32 bytes_per_frame;
       
   360   guint32 bytes_per_sample;
       
   361 
       
   362   /* (optional) list of AtomInfo */
       
   363   GList *extension_atoms;
       
   364 } SampleTableEntryMP4A;
       
   365 
       
   366 typedef struct _SampleTableEntryMP4S
       
   367 {
       
   368   SampleTableEntry se;
       
   369 
       
   370   AtomESDS es;
       
   371 } SampleTableEntryMP4S;
       
   372 
       
   373 typedef struct _AtomSTSD
       
   374 {
       
   375   AtomFull header;
       
   376 
       
   377   guint n_entries;
       
   378   /* list of subclasses of SampleTableEntry */
       
   379   GList *entries;
       
   380 } AtomSTSD;
       
   381 
       
   382 typedef struct _AtomSTSZ
       
   383 {
       
   384   AtomFull header;
       
   385 
       
   386   guint32 sample_size;
       
   387 
       
   388   /* need the size here because when sample_size is constant,
       
   389    * the list is empty */
       
   390   guint32 table_size;
       
   391   /* list of guint32 */
       
   392   GList *entries;
       
   393 } AtomSTSZ;
       
   394 
       
   395 typedef struct _STSCEntry
       
   396 {
       
   397   guint32 first_chunk;
       
   398   guint32 samples_per_chunk;
       
   399   guint32 sample_description_index;
       
   400 } STSCEntry;
       
   401 
       
   402 typedef struct _AtomSTSC
       
   403 {
       
   404   AtomFull header;
       
   405 
       
   406   guint n_entries;
       
   407   /* list of STSCEntry */
       
   408   GList *entries;
       
   409 } AtomSTSC;
       
   410 
       
   411 
       
   412 /*
       
   413  * used for both STCO and CO64
       
   414  * if used as STCO, entries should be truncated to use only 32bits
       
   415  */
       
   416 typedef struct _AtomSTCO64
       
   417 {
       
   418   AtomFull header;
       
   419 
       
   420   guint n_entries;
       
   421   /* list of guint64 */
       
   422   GList *entries;
       
   423 } AtomSTCO64;
       
   424 
       
   425 typedef struct _CTTSEntry
       
   426 {
       
   427   guint32 samplecount;
       
   428   guint32 sampleoffset;
       
   429 } CTTSEntry;
       
   430 
       
   431 typedef struct _AtomCTTS
       
   432 {
       
   433   AtomFull header;
       
   434 
       
   435   /* also entry count here */
       
   436   guint n_entries;
       
   437   GList *entries;
       
   438 } AtomCTTS;
       
   439 
       
   440 typedef struct _AtomSTBL
       
   441 {
       
   442   Atom header;
       
   443 
       
   444   AtomSTSD stsd;
       
   445   AtomSTTS stts;
       
   446   AtomSTSS stss;
       
   447   AtomSTSC stsc;
       
   448   AtomSTSZ stsz;
       
   449   /* NULL if not present */
       
   450   AtomCTTS *ctts;
       
   451 
       
   452   AtomSTCO64 stco64;
       
   453 } AtomSTBL;
       
   454 
       
   455 typedef struct _AtomMINF
       
   456 {
       
   457   Atom header;
       
   458 
       
   459   /* only (exactly) one of those must be present */
       
   460   AtomVMHD *vmhd;
       
   461   AtomSMHD *smhd;
       
   462   AtomHMHD *hmhd;
       
   463 
       
   464   AtomHDLR *hdlr;
       
   465   AtomDINF dinf;
       
   466   AtomSTBL stbl;
       
   467 } AtomMINF;
       
   468 
       
   469 typedef struct _AtomMDIA
       
   470 {
       
   471   Atom header;
       
   472 
       
   473   AtomMDHD mdhd;
       
   474   AtomHDLR hdlr;
       
   475   AtomMINF minf;
       
   476 } AtomMDIA;
       
   477 
       
   478 typedef struct _AtomILST
       
   479 {
       
   480   Atom header;
       
   481 
       
   482   /* list of AtomInfo */
       
   483   GList* entries;
       
   484 } AtomILST;
       
   485 
       
   486 typedef struct _AtomTagData
       
   487 {
       
   488   AtomFull header;
       
   489   guint32 reserved;
       
   490 
       
   491   guint32 datalen;
       
   492   guint8* data;
       
   493 } AtomTagData;
       
   494 
       
   495 typedef struct _AtomTag
       
   496 {
       
   497   Atom header;
       
   498 
       
   499   AtomTagData data;
       
   500 } AtomTag;
       
   501 
       
   502 typedef struct _AtomMETA
       
   503 {
       
   504   AtomFull header;
       
   505   AtomHDLR hdlr;
       
   506   AtomILST *ilst;
       
   507 } AtomMETA;
       
   508 
       
   509 typedef struct _AtomUDTA
       
   510 {
       
   511   Atom header;
       
   512 
       
   513   /* list of AtomInfo */
       
   514   GList* entries;
       
   515   /* or list is further down */
       
   516   AtomMETA *meta;
       
   517 } AtomUDTA;
       
   518 
       
   519 typedef struct _AtomTRAK
       
   520 {
       
   521   Atom header;
       
   522 
       
   523   AtomTKHD tkhd;
       
   524   AtomMDIA mdia;
       
   525 
       
   526   /* some helper info for structural conformity checks */
       
   527   gboolean is_video;
       
   528   gboolean is_h264;
       
   529 } AtomTRAK;
       
   530 
       
   531 typedef struct _AtomMOOV
       
   532 {
       
   533   /* style */
       
   534   AtomsContext context;
       
   535 
       
   536   Atom header;
       
   537 
       
   538   AtomMVHD mvhd;
       
   539 
       
   540   /* list of AtomTRAK */
       
   541   GList *traks;
       
   542   AtomUDTA *udta;
       
   543 } AtomMOOV;
       
   544 
       
   545 typedef struct _AtomWAVE
       
   546 {
       
   547   Atom header;
       
   548 
       
   549   /* list of AtomInfo */
       
   550   GList *extension_atoms;
       
   551 } AtomWAVE;
       
   552 
       
   553 
       
   554 /*
       
   555  * Function to serialize an atom
       
   556  */
       
   557 typedef guint64 (*AtomCopyDataFunc) (Atom *atom, guint8 **buffer, guint64 *size, guint64 *offset);
       
   558 
       
   559 /*
       
   560  * Releases memory allocated by an atom
       
   561  */
       
   562 typedef guint64 (*AtomFreeFunc) (Atom *atom);
       
   563 
       
   564 /*
       
   565  * Some atoms might have many optional different kinds of child atoms, so this
       
   566  * is useful for enabling generic handling of any atom.
       
   567  * All we need are the two functions (copying it to an array
       
   568  * for serialization and the memory releasing function).
       
   569  */
       
   570 typedef struct _AtomInfo
       
   571 {
       
   572   Atom *atom;
       
   573   AtomCopyDataFunc copy_data_func;
       
   574   AtomFreeFunc free_func;
       
   575 } AtomInfo;
       
   576 
       
   577 
       
   578 guint64    atom_copy_data              (Atom *atom, guint8 **buffer,
       
   579                                         guint64 *size, guint64* offset);
       
   580 
       
   581 AtomFTYP*  atom_ftyp_new               (AtomsContext *context, guint32 major,
       
   582                                         guint32 version, GList *brands);
       
   583 guint64    atom_ftyp_copy_data         (AtomFTYP *ftyp, guint8 **buffer,
       
   584                                         guint64 *size, guint64 *offset);
       
   585 void       atom_ftyp_free              (AtomFTYP *ftyp);
       
   586 
       
   587 AtomTRAK*  atom_trak_new               (AtomsContext *context);
       
   588 void       atom_trak_add_samples       (AtomTRAK * trak, guint32 nsamples, guint32 delta,
       
   589                                         guint32 size, guint64 chunk_offset, gboolean sync,
       
   590                                         gboolean do_pts, gint64 pts_offset);
       
   591 guint32    atom_trak_get_timescale     (AtomTRAK *trak);
       
   592 
       
   593 AtomMOOV*  atom_moov_new               (AtomsContext *context);
       
   594 void       atom_moov_free              (AtomMOOV *moov);
       
   595 guint64    atom_moov_copy_data         (AtomMOOV *atom, guint8 **buffer, guint64 *size, guint64* offset);
       
   596 void       atom_moov_update_timescale  (AtomMOOV *moov, guint32 timescale);
       
   597 void       atom_moov_update_duration   (AtomMOOV *moov);
       
   598 void       atom_moov_set_64bits        (AtomMOOV *moov, gboolean large_file);
       
   599 void       atom_moov_chunks_add_offset (AtomMOOV *moov, guint32 offset);
       
   600 void       atom_moov_add_trak          (AtomMOOV *moov, AtomTRAK *trak);
       
   601 
       
   602 /* media sample description related helpers */
       
   603 
       
   604 typedef struct
       
   605 {
       
   606   guint32 fourcc;
       
   607   guint width;
       
   608   guint height;
       
   609   guint depth;
       
   610   guint frame_count;
       
   611   gint color_table_id;
       
   612   guint par_n;
       
   613   guint par_d;
       
   614 
       
   615   GstBuffer *codec_data;
       
   616 } VisualSampleEntry;
       
   617 
       
   618 typedef struct
       
   619 {
       
   620   guint32 fourcc;
       
   621   guint version;
       
   622   gint compression_id;
       
   623   guint sample_rate;
       
   624   guint channels;
       
   625   guint sample_size;
       
   626   guint bytes_per_packet;
       
   627   guint samples_per_packet;
       
   628   guint bytes_per_sample;
       
   629   guint bytes_per_frame;
       
   630 
       
   631   GstBuffer *codec_data;
       
   632 } AudioSampleEntry;
       
   633 
       
   634 void atom_trak_set_audio_type (AtomTRAK * trak, AtomsContext * context,
       
   635                                AudioSampleEntry * entry, guint32 scale,
       
   636                                AtomInfo * ext, gint sample_size);
       
   637 void atom_trak_set_video_type (AtomTRAK * trak, AtomsContext * context,
       
   638                                VisualSampleEntry * entry, guint32 rate,
       
   639                                AtomInfo * ext);
       
   640 
       
   641 AtomInfo *   build_codec_data_extension  (guint32 fourcc, const GstBuffer * codec_data);
       
   642 AtomInfo *   build_mov_aac_extension     (AtomTRAK * trak, const GstBuffer * codec_data);
       
   643 AtomInfo *   build_esds_extension        (AtomTRAK * trak, guint8 object_type,
       
   644                                           guint8 stream_type, const GstBuffer * codec_data);
       
   645 AtomInfo *   build_jp2h_extension        (AtomTRAK * trak, gint width, gint height,
       
   646                                           guint32 fourcc);
       
   647 AtomInfo *   build_amr_extension         ();
       
   648 AtomInfo *   build_h263_extension        ();
       
   649 
       
   650 
       
   651 /*
       
   652  * Meta tags functions
       
   653  */
       
   654 void atom_moov_add_str_tag    (AtomMOOV *moov, guint32 fourcc, const gchar *value);
       
   655 void atom_moov_add_uint_tag   (AtomMOOV *moov, guint32 fourcc, guint32 flags,
       
   656                                guint32 value);
       
   657 void atom_moov_add_tag        (AtomMOOV *moov, guint32 fourcc, guint32 flags,
       
   658                                const guint8 * data, guint size);
       
   659 void atom_moov_add_blob_tag   (AtomMOOV *moov, guint8 *data, guint size);
       
   660 
       
   661 void atom_moov_add_3gp_str_tag       (AtomMOOV * moov, guint32 fourcc, const gchar * value);
       
   662 void atom_moov_add_3gp_uint_tag      (AtomMOOV * moov, guint32 fourcc, guint16 value);
       
   663 void atom_moov_add_3gp_str_int_tag   (AtomMOOV * moov, guint32 fourcc, const gchar * value,
       
   664                                       gint16 ivalue);
       
   665 void atom_moov_add_3gp_tag           (AtomMOOV * moov, guint32 fourcc, guint8 * data,
       
   666                                       guint size);
       
   667 
       
   668 #define GST_QT_MUX_DEFAULT_TAG_LANGUAGE   "eng"
       
   669 guint16  language_code               (const char * lang);
       
   670 
       
   671 #endif /* __ATOMS_H__ */