1 /* Quicktime muxer plugin for GStreamer
2 * Copyright (C) 2008-2010 Thiago Santos <thiagoss@embedded.ufcg.edu.br>
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.
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.
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., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 * Unless otherwise indicated, Source Code is licensed under MIT license.
21 * See further explanation attached in License Statement (distributed in the file
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:
31 * The above copyright notice and this permission notice shall be included in all
32 * copies or substantial portions of the Software.
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
48 #include <gst/video/video.h>
50 #include "descriptors.h"
51 #include "properties.h"
54 /* helper storage struct */
55 #define ATOM_ARRAY(struct_type) \
64 #define atom_array_init(array, reserve) \
67 (array)->size = reserve; \
68 (array)->data = g_malloc (sizeof (*(array)->data) * reserve); \
71 #define atom_array_append(array, elmt, inc) \
73 g_assert ((array)->data); \
75 if (G_UNLIKELY ((array)->len == (array)->size)) { \
76 (array)->size += inc; \
78 g_realloc ((array)->data, sizeof (*((array)->data)) * (array)->size); \
80 (array)->data[(array)->len] = elmt; \
84 #define atom_array_get_len(array) ((array)->len)
85 #define atom_array_index(array, index) ((array)->data[index])
87 #define atom_array_clear(array) \
89 (array)->size = (array)->len = 0; \
90 g_free ((array)->data); \
91 (array)->data = NULL; \
94 /* light-weight context that may influence header atom tree construction */
95 typedef enum _AtomsTreeFlavor
97 ATOMS_TREE_FLAVOR_MOV,
98 ATOMS_TREE_FLAVOR_ISOM,
99 ATOMS_TREE_FLAVOR_3GP,
100 ATOMS_TREE_FLAVOR_ISML
103 typedef struct _AtomsContext
105 AtomsTreeFlavor flavor;
108 AtomsContext* atoms_context_new (AtomsTreeFlavor flavor);
109 void atoms_context_free (AtomsContext *context);
111 #define METADATA_DATA_FLAG 0x0
112 #define METADATA_TEXT_FLAG 0x1
114 /* atom defs and functions */
116 typedef struct _AtomInfo AtomInfo;
119 * Used for storing time related values for some atoms.
121 typedef struct _TimeInfo
123 guint64 creation_time;
124 guint64 modification_time;
133 guint64 extended_size;
136 typedef struct _AtomFull
145 * Generic extension atom
147 typedef struct _AtomData
157 typedef struct _AtomUUID
169 typedef struct _AtomFTYP
174 guint32 *compatible_brands;
177 guint32 compatible_brands_size;
180 typedef struct _AtomMVHD
184 /* version 0: 32 bits */
187 guint32 prefered_rate; /* ISO: 0x00010000 */
188 guint16 volume; /* ISO: 0x0100 */
189 guint16 reserved3; /* ISO: 0x0 */
190 guint32 reserved4[2]; /* ISO: 0, 0 */
191 /* ISO: identity matrix =
192 * { 0x00010000, 0, 0, 0, 0x00010000, 0, 0, 0, 0x40000000 } */
196 guint32 preview_time;
197 guint32 preview_duration;
199 guint32 selection_time;
200 guint32 selection_duration;
201 guint32 current_time;
203 guint32 next_track_id;
206 typedef struct _AtomTKHD
210 /* version 0: 32 bits */
211 /* like the TimeInfo struct, but it has this track_ID inside */
212 guint64 creation_time;
213 guint64 modification_time;
218 guint32 reserved2[2];
220 guint16 alternate_group;
224 /* ISO: identity matrix =
225 * { 0x00010000, 0, 0, 0, 0x00010000, 0, 0, 0, 0x40000000 } */
231 typedef struct _AtomMDHD
235 /* version 0: 32 bits */
238 /* ISO: packed ISO-639-2/T language code (first bit must be 0) */
239 guint16 language_code;
244 typedef struct _AtomHDLR
249 guint32 component_type;
250 guint32 handler_type;
251 guint32 manufacturer;
256 AtomsTreeFlavor flavor;
259 typedef struct _AtomVMHD
261 AtomFull header; /* ISO: flags = 1 */
263 guint16 graphics_mode;
268 typedef struct _AtomSMHD
276 typedef struct _AtomHMHD
280 guint16 max_pdu_size;
281 guint16 avg_pdu_size;
284 guint32 sliding_avg_bitrate;
287 typedef struct _AtomTCMI
294 guint16 text_color[3];
299 typedef struct _AtomTMCD
306 typedef struct _AtomGMIN
310 guint16 graphics_mode;
317 typedef struct _AtomGMHD
321 /* Only gmin is required in a gmhd atom
322 * The other fields are optional */
328 typedef struct _AtomURL
335 typedef struct _AtomDREF
342 typedef struct _AtomDINF
349 typedef struct _STTSEntry
351 guint32 sample_count;
355 typedef struct _AtomSTTS
359 ATOM_ARRAY (STTSEntry) entries;
362 typedef struct _AtomSTSS
366 ATOM_ARRAY (guint32) entries;
369 typedef struct _AtomESDS
376 typedef struct _AtomFRMA
383 typedef enum _SampleEntryKind
393 typedef struct _SampleTableEntry
398 guint16 data_reference_index;
401 SampleEntryKind kind;
404 typedef struct _AtomHintSampleEntry
409 } AtomHintSampleEntry;
411 typedef struct _SampleTableEntryMP4V
416 guint16 revision_level;
418 guint32 vendor; /* fourcc code */
419 guint32 temporal_quality;
420 guint32 spatial_quality;
425 guint32 horizontal_resolution;
426 guint32 vertical_resolution;
429 guint16 frame_count; /* usually 1 */
431 guint8 compressor[32]; /* pascal string, i.e. first byte = length */
434 guint16 color_table_id;
436 /* (optional) list of AtomInfo */
437 GList *extension_atoms;
438 } SampleTableEntryMP4V;
440 typedef struct _SampleTableEntryMP4A
445 guint16 revision_level;
450 guint16 compression_id;
453 guint32 sample_rate; /* fixed point 16.16 */
455 guint32 samples_per_packet;
456 guint32 bytes_per_packet;
457 guint32 bytes_per_frame;
458 guint32 bytes_per_sample;
460 /* (optional) list of AtomInfo */
461 GList *extension_atoms;
462 } SampleTableEntryMP4A;
464 typedef struct _AtomNAME
468 guint8 language_code;
472 typedef struct _SampleTableEntryTMCD
478 guint32 frame_duration;
483 } SampleTableEntryTMCD;
485 typedef struct _SampleTableEntryTX3G
489 guint32 display_flags;
490 guint64 default_text_box;
492 guint8 font_face; /* bold=0x1, italic=0x2, underline=0x4 */
493 guint8 font_size; /* should always be 0.05 multiplied by the video track header height */
494 guint32 foreground_color_rgba;
496 } SampleTableEntryTX3G;
498 typedef struct _AtomSTSD
503 /* list of subclasses of SampleTableEntry */
507 typedef struct _AtomSTSZ
513 /* need the size here because when sample_size is constant,
514 * the list is empty */
516 ATOM_ARRAY (guint32) entries;
519 typedef struct _STSCEntry
522 guint32 samples_per_chunk;
523 guint32 sample_description_index;
526 typedef struct _AtomSTSC
530 ATOM_ARRAY (STSCEntry) entries;
533 /* FIXME: this can support multiple tracks */
534 typedef struct _AtomTREF
539 ATOM_ARRAY (guint32) entries;
543 * used for both STCO and CO64
544 * if used as STCO, entries should be truncated to use only 32bits
546 typedef struct _AtomSTCO64
549 /* Global offset to add to entries when serialising */
550 guint32 chunk_offset;
551 ATOM_ARRAY (guint64) entries;
554 typedef struct _CTTSEntry
557 guint32 sampleoffset;
560 typedef struct _AtomCTTS
564 /* also entry count here */
565 ATOM_ARRAY (CTTSEntry) entries;
569 typedef struct _AtomSVMI
573 guint8 stereoscopic_composition_type;
574 gboolean is_left_first;
577 typedef struct _AtomSTBL
586 /* NULL if not present */
588 /* NULL if not present */
594 typedef struct _AtomMINF
598 /* only (exactly) one of those must be present */
609 typedef struct _EditListEntry
611 /* duration in movie's timescale */
613 /* start time in media's timescale, -1 for empty */
615 guint32 media_rate; /* fixed point 32 bit */
618 typedef struct _AtomELST
622 /* number of entries is implicit */
626 typedef struct _AtomEDTS
632 typedef struct _AtomMDIA
641 typedef struct _AtomILST
645 /* list of AtomInfo */
649 typedef struct _AtomTagData
658 typedef struct _AtomTag
665 typedef struct _AtomMETA
672 typedef struct _AtomUDTA
676 /* list of AtomInfo */
678 /* or list is further down */
681 AtomsContext *context;
686 TR_DATA_OFFSET = 0x01, /* data-offset-present */
687 TR_FIRST_SAMPLE_FLAGS = 0x04, /* first-sample-flags-present */
688 TR_SAMPLE_DURATION = 0x0100, /* sample-duration-present */
689 TR_SAMPLE_SIZE = 0x0200, /* sample-size-present */
690 TR_SAMPLE_FLAGS = 0x0400, /* sample-flags-present */
691 TR_COMPOSITION_TIME_OFFSETS = 0x0800 /* sample-composition-time-offsets-presents */
696 TF_BASE_DATA_OFFSET = 0x01, /* base-data-offset-present */
697 TF_SAMPLE_DESCRIPTION_INDEX = 0x02, /* sample-description-index-present */
698 TF_DEFAULT_SAMPLE_DURATION = 0x08, /* default-sample-duration-present */
699 TF_DEFAULT_SAMPLE_SIZE = 0x010, /* default-sample-size-present */
700 TF_DEFAULT_SAMPLE_FLAGS = 0x020, /* default-sample-flags-present */
701 TF_DURATION_IS_EMPTY = 0x010000, /* sample-composition-time-offsets-presents */
702 TF_DEFAULT_BASE_IS_MOOF = 0x020000 /* default-base-is-moof */
708 TC_DROP_FRAME = 0x0001, /* Drop-frame timecode */
709 TC_24H_MAX = 0x0002, /* Whether the timecode wraps after 24 hours */
710 TC_NEGATIVE_OK = 0x0004, /* Whether negative time values are OK */
711 TC_COUNTER = 0x0008 /* Whether the time value corresponds to a tape counter value */
714 typedef struct _AtomTRAK
725 /* some helper info for structural conformity checks */
729 AtomsContext *context;
732 typedef struct _AtomTREX
737 guint32 default_sample_description_index;
738 guint32 default_sample_duration;
739 guint32 default_sample_size;
740 guint32 default_sample_flags;
743 typedef struct _AtomMEHD
747 guint64 fragment_duration;
751 typedef struct _AtomMVEX
757 /* list of AtomTREX */
761 typedef struct _AtomMFHD
765 guint32 sequence_number;
768 typedef struct _AtomTFHD
773 guint64 base_data_offset;
774 guint32 sample_description_index;
775 guint32 default_sample_duration;
776 guint32 default_sample_size;
777 guint32 default_sample_flags;
780 typedef struct _AtomTFDT
784 guint64 base_media_decode_time;
787 typedef struct _TRUNSampleEntry
789 guint32 sample_duration;
791 guint32 sample_flags;
792 guint32 sample_composition_time_offset;
795 typedef struct _AtomTRUN
799 guint32 sample_count;
801 guint32 first_sample_flags;
803 /* array of fields */
804 ATOM_ARRAY (TRUNSampleEntry) entries;
807 typedef struct _AtomSDTP
812 guint32 sample_count;
814 /* array of fields */
815 ATOM_ARRAY (guint8) entries;
818 typedef struct _AtomTRAF
826 /* list of AtomTRUN */
828 /* list of AtomSDTP */
832 typedef struct _AtomMOOF
838 /* list of AtomTRAF */
843 typedef struct _AtomMOOV
846 AtomsContext context;
853 /* list of AtomTRAK */
858 guint32 chunks_offset;
861 typedef struct _AtomWAVE
865 /* list of AtomInfo */
866 GList *extension_atoms;
869 typedef struct _TFRAEntry
875 guint32 sample_number;
878 typedef struct _AtomTFRA
884 /* array of entries */
885 ATOM_ARRAY (TFRAEntry) entries;
888 typedef struct _AtomMFRA
897 * Function to serialize an atom
899 typedef guint64 (*AtomCopyDataFunc) (Atom *atom, guint8 **buffer, guint64 *size, guint64 *offset);
902 * Releases memory allocated by an atom
904 typedef guint64 (*AtomFreeFunc) (Atom *atom);
907 * Some atoms might have many optional different kinds of child atoms, so this
908 * is useful for enabling generic handling of any atom.
909 * All we need are the two functions (copying it to an array
910 * for serialization and the memory releasing function).
915 AtomCopyDataFunc copy_data_func;
916 AtomFreeFunc free_func;
919 guint64 atoms_get_current_qt_time (void);
921 guint64 atom_copy_data (Atom *atom, guint8 **buffer,
922 guint64 *size, guint64* offset);
924 AtomFTYP* atom_ftyp_new (AtomsContext *context, guint32 major,
925 guint32 version, GList *brands);
926 guint64 atom_ftyp_copy_data (AtomFTYP *ftyp, guint8 **buffer,
927 guint64 *size, guint64 *offset);
928 void atom_ftyp_free (AtomFTYP *ftyp);
930 AtomTRAK* atom_trak_new (AtomsContext *context);
931 void atom_trak_add_samples (AtomTRAK * trak, guint32 nsamples, guint32 delta,
932 guint32 size, guint64 chunk_offset, gboolean sync,
934 void atom_trak_set_elst_entry (AtomTRAK * trak, gint index, guint32 duration,
935 guint32 media_time, guint32 rate);
936 void atom_trak_edts_clear (AtomTRAK * trak);
937 guint32 atom_trak_get_timescale (AtomTRAK *trak);
938 guint32 atom_trak_get_id (AtomTRAK * trak);
939 void atom_trak_set_constant_size_samples (AtomTRAK * trak, guint32 sample_size);
940 void atom_stbl_add_samples (AtomSTBL * stbl, guint32 nsamples,
941 guint32 delta, guint32 size,
942 guint64 chunk_offset, gboolean sync,
944 void atom_stsc_add_new_entry (AtomSTSC * stsc,
945 guint32 first_chunk, guint32 nsamples);
947 AtomMOOV* atom_moov_new (AtomsContext *context);
948 void atom_moov_free (AtomMOOV *moov);
949 guint64 atom_moov_copy_data (AtomMOOV *atom, guint8 **buffer, guint64 *size, guint64* offset);
950 void atom_moov_update_timescale (AtomMOOV *moov, guint32 timescale);
951 void atom_moov_update_duration (AtomMOOV *moov);
952 void atom_moov_set_fragmented (AtomMOOV *moov, gboolean fragmented);
953 void atom_moov_chunks_set_offset (AtomMOOV *moov, guint32 offset);
954 void atom_moov_add_trak (AtomMOOV *moov, AtomTRAK *trak);
955 guint atom_moov_get_trak_count (AtomMOOV *moov);
957 guint atom_framerate_to_timescale (gint fps_n, gint fps_d);
959 guint64 atom_mvhd_copy_data (AtomMVHD * atom, guint8 ** buffer,
960 guint64 * size, guint64 * offset);
961 void atom_stco64_chunks_set_offset (AtomSTCO64 * stco64, guint32 offset);
962 guint64 atom_trak_copy_data (AtomTRAK * atom, guint8 ** buffer,
963 guint64 * size, guint64 * offset);
964 void atom_stbl_clear (AtomSTBL * stbl);
965 void atom_stbl_init (AtomSTBL * stbl);
966 guint64 atom_stss_copy_data (AtomSTSS *atom, guint8 **buffer,
967 guint64 *size, guint64* offset);
968 guint64 atom_stts_copy_data (AtomSTTS *atom, guint8 **buffer,
969 guint64 *size, guint64* offset);
970 guint64 atom_stsc_copy_data (AtomSTSC *atom, guint8 **buffer,
971 guint64 *size, guint64* offset);
972 guint64 atom_stsz_copy_data (AtomSTSZ *atom, guint8 **buffer,
973 guint64 *size, guint64* offset);
974 guint64 atom_ctts_copy_data (AtomCTTS *atom, guint8 **buffer,
975 guint64 *size, guint64* offset);
976 guint64 atom_svmi_copy_data (AtomSVMI *atom, guint8 **buffer,
977 guint64 *size, guint64* offset);
978 AtomSVMI * atom_svmi_new (guint8 stereoscopic_composition_type, gboolean is_left_first);
979 guint64 atom_stco64_copy_data (AtomSTCO64 *atom, guint8 **buffer,
980 guint64 *size, guint64* offset);
981 AtomMOOF* atom_moof_new (AtomsContext *context, guint32 sequence_number);
982 void atom_moof_free (AtomMOOF *moof);
983 guint64 atom_moof_copy_data (AtomMOOF *moof, guint8 **buffer, guint64 *size, guint64* offset);
984 AtomTRAF * atom_traf_new (AtomsContext * context, guint32 track_ID);
985 void atom_traf_free (AtomTRAF * traf);
986 void atom_traf_set_base_decode_time (AtomTRAF * traf, guint64 base_decode_time);
987 void atom_traf_add_samples (AtomTRAF * traf, guint32 delta,
988 guint32 size, gboolean sync, gint64 pts_offset,
990 guint32 atom_traf_get_sample_num (AtomTRAF * traf);
991 void atom_moof_add_traf (AtomMOOF *moof, AtomTRAF *traf);
993 AtomMFRA* atom_mfra_new (AtomsContext *context);
994 void atom_mfra_free (AtomMFRA *mfra);
995 AtomTFRA* atom_tfra_new (AtomsContext *context, guint32 track_ID);
996 void atom_tfra_add_entry (AtomTFRA *tfra, guint64 dts, guint32 sample_num);
997 void atom_tfra_update_offset (AtomTFRA * tfra, guint64 offset);
998 void atom_mfra_add_tfra (AtomMFRA *mfra, AtomTFRA *tfra);
999 guint64 atom_mfra_copy_data (AtomMFRA *mfra, guint8 **buffer, guint64 *size, guint64* offset);
1002 /* media sample description related helpers */
1011 gint color_table_id;
1015 GstBuffer *codec_data;
1016 } VisualSampleEntry;
1022 gint compression_id;
1026 guint bytes_per_packet;
1027 guint samples_per_packet;
1028 guint bytes_per_sample;
1029 guint bytes_per_frame;
1031 GstBuffer *codec_data;
1038 guint8 font_face; /* bold=0x1, italic=0x2, underline=0x4 */
1040 guint32 foreground_color_rgba;
1041 } SubtitleSampleEntry;
1043 void subtitle_sample_entry_init (SubtitleSampleEntry * entry);
1045 SampleTableEntryMP4A * atom_trak_set_audio_type (AtomTRAK * trak, AtomsContext * context,
1046 AudioSampleEntry * entry, guint32 scale,
1047 AtomInfo * ext, gint sample_size);
1049 SampleTableEntryMP4V * atom_trak_set_video_type (AtomTRAK * trak, AtomsContext * context,
1050 VisualSampleEntry * entry, guint32 rate,
1051 GList * ext_atoms_list);
1053 SampleTableEntryTX3G * atom_trak_set_subtitle_type (AtomTRAK * trak, AtomsContext * context,
1054 SubtitleSampleEntry * entry);
1056 SampleTableEntryTMCD *
1057 atom_trak_set_timecode_type (AtomTRAK * trak, AtomsContext * context, guint trak_timescale, GstVideoTimeCode * tc);
1059 SampleTableEntry * atom_trak_set_caption_type (AtomTRAK *trak, AtomsContext *context,
1060 guint32 trak_timescale, guint32 caption_type);
1062 void atom_trak_update_bitrates (AtomTRAK * trak, guint32 avg_bitrate,
1063 guint32 max_bitrate);
1065 void atom_trak_tx3g_update_dimension (AtomTRAK * trak, guint32 width,
1068 void sample_table_entry_add_ext_atom (SampleTableEntry * ste, AtomInfo * ext);
1070 AtomInfo * build_codec_data_extension (guint32 fourcc, const GstBuffer * codec_data);
1071 AtomInfo * build_mov_aac_extension (AtomTRAK * trak, const GstBuffer * codec_data,
1072 guint32 avg_bitrate, guint32 max_bitrate);
1073 AtomInfo * build_mov_alac_extension (const GstBuffer * codec_data);
1074 AtomInfo * build_esds_extension (AtomTRAK * trak, guint8 object_type,
1075 guint8 stream_type, const GstBuffer * codec_data,
1076 guint32 avg_bitrate, guint32 max_bitrate);
1077 AtomInfo * build_btrt_extension (guint32 buffer_size_db, guint32 avg_bitrate,
1078 guint32 max_bitrate);
1079 AtomInfo * build_jp2h_extension (gint width, gint height, const gchar *colorspace,
1080 gint ncomp, const GValue * cmap_array,
1081 const GValue * cdef_array);
1083 AtomInfo * build_jp2x_extension (const GstBuffer * prefix);
1084 AtomInfo * build_fiel_extension (GstVideoInterlaceMode mode, GstVideoFieldOrder order);
1085 AtomInfo * build_colr_extension (const GstVideoColorimetry *colorimetry, gboolean is_mp4);
1086 AtomInfo * build_clap_extension (gint width_n, gint width_d, gint height_n, gint height_d, gint h_off_n, gint h_off_d, gint v_off_n, gint v_off_d);
1087 AtomInfo * build_tapt_extension (gint clef_width, gint clef_height, gint prof_width, gint prof_height, gint enof_width, gint enof_height);
1090 AtomInfo * build_ac3_extension (guint8 fscod, guint8 bsid,
1091 guint8 bsmod, guint8 acmod,
1092 guint8 lfe_on, guint8 bitrate_code);
1093 AtomInfo * build_opus_extension (guint32 rate, guint8 channels, guint8 mapping_family,
1094 guint8 stream_count, guint8 coupled_count,
1095 guint8 channel_mapping[256], guint16 pre_skip,
1096 guint16 output_gain);
1098 AtomInfo * build_amr_extension (void);
1099 AtomInfo * build_h263_extension (void);
1100 AtomInfo * build_gama_atom (gdouble gamma);
1101 AtomInfo * build_SMI_atom (const GstBuffer *seqh);
1102 AtomInfo * build_ima_adpcm_extension (gint channels, gint rate,
1104 AtomInfo * build_uuid_xmp_atom (GstBuffer * xmp);
1108 * Meta tags functions
1110 void atom_udta_clear_tags (AtomUDTA *udta);
1111 void atom_udta_add_str_tag (AtomUDTA *udta, guint32 fourcc, const gchar *value);
1112 void atom_udta_add_uint_tag (AtomUDTA *udta, guint32 fourcc, guint32 flags,
1114 void atom_udta_add_tag (AtomUDTA *udta, guint32 fourcc, guint32 flags,
1115 const guint8 * data, guint size);
1116 void atom_udta_add_blob_tag (AtomUDTA *udta, guint8 *data, guint size);
1118 void atom_udta_add_3gp_str_tag (AtomUDTA *udta, guint32 fourcc, const gchar * value);
1119 void atom_udta_add_3gp_uint_tag (AtomUDTA *udta, guint32 fourcc, guint16 value);
1120 void atom_udta_add_3gp_str_int_tag (AtomUDTA *udta, guint32 fourcc, const gchar * value,
1122 void atom_udta_add_3gp_tag (AtomUDTA *udta, guint32 fourcc, guint8 * data,
1125 void atom_udta_add_xmp_tags (AtomUDTA *udta, GstBuffer * xmp);
1127 AtomTREF * atom_tref_new (guint32 reftype);
1128 void atom_tref_add_entry (AtomTREF * tref, guint32 sample);
1130 #define GST_QT_MUX_DEFAULT_TAG_LANGUAGE "und" /* undefined/unknown */
1131 guint16 language_code (const char * lang);
1133 #endif /* __ATOMS_H__ */