annotate IM_AF Decoder/IM_AF_Decoder.h @ 0:138a3cea9792

Different files related to my project, including the encoder (I made it) and decoder. Also I added the mp4atoms as an example. MP4atoms belong to the IMAF player library.
author Eugenio Oñate Hospital <eo301@eecs.qmul.ac.uk>
date Wed, 04 Jul 2012 22:16:23 +0100
parents
children
rev   line source
eo301@0 1 #ifndef IM_AF_Decoder_h__
eo301@0 2 #define IM_AF_Decoder_h__
eo301@0 3
eo301@0 4 #define IMAF_DECODER_API
eo301@0 5
eo301@0 6 typedef int IMAF_Err;
eo301@0 7 typedef void* IMAF_DecoderH;
eo301@0 8
eo301@0 9 typedef struct IMAF_Decoder_Param
eo301@0 10 {
eo301@0 11 unsigned char *InputMafFilename; //in
eo301@0 12 unsigned int NumberOfAudioTrack; //out
eo301@0 13 unsigned int MovieTimescale; //out
eo301@0 14 unsigned int MovieDuration; //out
eo301@0 15 unsigned int HasTimedTextTrack; //out
eo301@0 16 unsigned int MajorBrand; //out
eo301@0 17 unsigned int NumberOfCompatibleBrands; //out
eo301@0 18 unsigned int *CompatibleBrands; //out
eo301@0 19 }IMAF_Decoder_Param;
eo301@0 20
eo301@0 21 typedef struct IMAF_AudioParam
eo301@0 22 {
eo301@0 23 unsigned int nBitsPerSample;
eo301@0 24 unsigned int nChannels;
eo301@0 25 unsigned int nSamplingFrequency;
eo301@0 26 }IMAF_AudioParam;
eo301@0 27
eo301@0 28 typedef struct IMAF_Group
eo301@0 29 {
eo301@0 30 unsigned int group_ID;
eo301@0 31 unsigned int num_elements;
eo301@0 32 unsigned int *element_ID;
eo301@0 33 unsigned int group_activation_mode;
eo301@0 34 unsigned int group_activation_elements_number;
eo301@0 35 unsigned int group_reference_volume; // 0~100 (0~1.0)
eo301@0 36 char *group_name;
eo301@0 37 char *group_description;
eo301@0 38 }IMAF_Group;
eo301@0 39
eo301@0 40 typedef struct IMAF_Preset
eo301@0 41 {
eo301@0 42 unsigned int preset_ID;
eo301@0 43 unsigned int num_preset_elements;
eo301@0 44 unsigned int *preset_element_ID; //array
eo301@0 45 unsigned int preset_type;
eo301@0 46 unsigned int preset_global_volume;
eo301@0 47 unsigned int *preset_volume_element;
eo301@0 48 unsigned int *num_input_channel;
eo301@0 49 unsigned int output_channel_type;
eo301@0 50 unsigned int num_output_channel;
eo301@0 51 unsigned int num_updates;
eo301@0 52 unsigned int *updated_sample_number;
eo301@0 53 char *preset_name;
eo301@0 54 }IMAF_Preset;
eo301@0 55
eo301@0 56 typedef struct IMAF_SelectionRule
eo301@0 57 {
eo301@0 58 unsigned int selection_rule_ID;
eo301@0 59 unsigned int selection_rule_type;
eo301@0 60 unsigned int element_ID;
eo301@0 61 unsigned int min_num_elements;
eo301@0 62 unsigned int max_num_elements;
eo301@0 63 unsigned int key_element_ID;
eo301@0 64 char *selection_rule_description;
eo301@0 65 }IMAF_SelectionRule;
eo301@0 66
eo301@0 67 typedef struct IMAF_MixingRule
eo301@0 68 {
eo301@0 69 unsigned int mixing_rule_ID;
eo301@0 70 unsigned int mixing_rule_type;
eo301@0 71 unsigned int element_ID;
eo301@0 72 unsigned int min_volume;
eo301@0 73 unsigned int max_volume;
eo301@0 74 unsigned int key_element_ID;
eo301@0 75 char *mixing_rule_description;
eo301@0 76 }IMAF_MixingRule;
eo301@0 77
eo301@0 78 typedef struct StyleRecord
eo301@0 79 {
eo301@0 80 unsigned int startChar;
eo301@0 81 unsigned int endChar;
eo301@0 82 unsigned int fontID;
eo301@0 83 unsigned int face_style_flags;
eo301@0 84 unsigned int font_size;
eo301@0 85 unsigned int text_color_r;
eo301@0 86 unsigned int text_color_g;
eo301@0 87 unsigned int text_color_b;
eo301@0 88 unsigned int text_color_a;
eo301@0 89 }StyleRecord;
eo301@0 90
eo301@0 91 typedef struct TextSampleStyleParam
eo301@0 92 {
eo301@0 93 //tx3g
eo301@0 94 unsigned int displayFlags;
eo301@0 95 unsigned int horizontal_justification;
eo301@0 96 unsigned int vertical_justification;
eo301@0 97 unsigned int background_color_r;
eo301@0 98 unsigned int background_color_g;
eo301@0 99 unsigned int background_color_b;
eo301@0 100 unsigned int background_color_a;
eo301@0 101 unsigned int default_text_box_top;
eo301@0 102 unsigned int default_text_box_left;
eo301@0 103 unsigned int default_text_box_bottom;
eo301@0 104 unsigned int default_text_box_right;
eo301@0 105 unsigned int default_style_startChar;
eo301@0 106 unsigned int default_style_endChar;
eo301@0 107 unsigned int default_style_font_ID;
eo301@0 108 unsigned int default_style_face_style_flags;
eo301@0 109 unsigned int default_style_font_size;
eo301@0 110 unsigned int default_style_text_color_r;
eo301@0 111 unsigned int default_style_text_color_g;
eo301@0 112 unsigned int default_style_text_color_b;
eo301@0 113 unsigned int default_style_text_color_a;
eo301@0 114 unsigned int font_ID;
eo301@0 115 unsigned int font_name_length;
eo301@0 116 unsigned char *font;
eo301@0 117 //styl
eo301@0 118 unsigned int styl_entry_count;
eo301@0 119 StyleRecord *styl_text_styles;
eo301@0 120 //hlit
eo301@0 121 unsigned int hlit_startcharoffset;
eo301@0 122 unsigned int hlit_endcharoffset;
eo301@0 123 //hclr
eo301@0 124 unsigned int hclr_highlight_color_r;
eo301@0 125 unsigned int hclr_highlight_color_g;
eo301@0 126 unsigned int hclr_highlight_color_b;
eo301@0 127 unsigned int hclr_highlight_color_a;
eo301@0 128 //krok
eo301@0 129 unsigned int krok_highlight_start_time;
eo301@0 130 unsigned int krok_entry_count;
eo301@0 131 unsigned int *krok_highlight_end_time;
eo301@0 132 unsigned int *krok_startcharoffset;
eo301@0 133 unsigned int *krok_endcharoffset;
eo301@0 134 //dlay
eo301@0 135 //href
eo301@0 136 //tbox
eo301@0 137 //blnk
eo301@0 138 //twrp
eo301@0 139 }TextSampleStyleParam;
eo301@0 140
eo301@0 141 #ifdef __cplusplus
eo301@0 142 extern "C" {
eo301@0 143 #endif
eo301@0 144
eo301@0 145 IMAF_DECODER_API IMAF_Err IMAF_Decoder_Create(IMAF_DecoderH *IMafDecoder, IMAF_Decoder_Param *param);
eo301@0 146
eo301@0 147 IMAF_DECODER_API IMAF_Err IMAF_Decoder_GetAudioTrackInfos(IMAF_DecoderH IMafDecoder, unsigned int *AudioTrackObjectTypeArray
eo301@0 148 ,unsigned int *AudioTrackIdArray, IMAF_AudioParam *AudioParamArray);
eo301@0 149 IMAF_DECODER_API IMAF_Err IMAF_Decoder_GetGroupContainerInfo(IMAF_DecoderH IMafDecoder, unsigned int *GroupCount);
eo301@0 150 IMAF_DECODER_API IMAF_Err IMAF_Decoder_GetGroupByIndex(IMAF_DecoderH IMafDecoder, unsigned int i, IMAF_Group *grup);
eo301@0 151 IMAF_DECODER_API IMAF_Err IMAF_Decoder_GetPresetContainerInfo(IMAF_DecoderH IMafDecoder, unsigned int *num_preset, unsigned int *default_preset_ID);
eo301@0 152 IMAF_DECODER_API IMAF_Err IMAF_Decoder_GetPresetByIndex(IMAF_DecoderH IMafDecoder, unsigned int i, IMAF_Preset *prst);
eo301@0 153 IMAF_DECODER_API IMAF_Err IMAF_Decoder_GetRuleContainerInfo(IMAF_DecoderH IMafDecoder, unsigned int *num_selection_rules, unsigned int *num_mixing_rules);
eo301@0 154 IMAF_DECODER_API IMAF_Err IMAF_Decoder_GetSelectionRuleByIndex(IMAF_DecoderH IMafDecoder, unsigned int i, IMAF_SelectionRule *rusc);
eo301@0 155 IMAF_DECODER_API IMAF_Err IMAF_Decoder_GetMixingRuleByIndex(IMAF_DecoderH IMafDecoder, unsigned int i, IMAF_MixingRule *rumx);
eo301@0 156
eo301@0 157 IMAF_DECODER_API IMAF_Err IMAFDecoder_SeekSample(IMAF_DecoderH IMafDecoder, unsigned int mediaTime);
eo301@0 158 IMAF_DECODER_API IMAF_Err IMAFDecoder_GetNextAudioSampleByIndex(IMAF_DecoderH IMafDecoder, unsigned int i,
eo301@0 159 unsigned char **SampleData, unsigned int *SampleDataSize, unsigned int *CurrentTime, unsigned int *sampleNumber);
eo301@0 160
eo301@0 161 IMAF_DECODER_API IMAF_Err IMAFDecoder_GetNextTextSample(IMAF_DecoderH IMafDecoder,
eo301@0 162 unsigned char **SampleData, unsigned int *SampleDataSize, unsigned int *CurrentTime, TextSampleStyleParam **param);
eo301@0 163
eo301@0 164 // only for AAC track
eo301@0 165 IMAF_DECODER_API IMAF_Err IMAFDecoder_GetDsiByIndex(IMAF_DecoderH IMafDecoder, unsigned int i, char** dsi, unsigned int *dsiSize);
eo301@0 166
eo301@0 167 IMAF_DECODER_API IMAF_Err IMAFDecoder_GetSongImage(IMAF_DecoderH IMafDecoder, unsigned char **image, unsigned int *imageSize);
eo301@0 168
eo301@0 169 IMAF_DECODER_API IMAF_Err IMAFDecoder_GetMetadata(IMAF_DecoderH IMafDecoder, unsigned char **Meta, unsigned int *MetaSize);
eo301@0 170
eo301@0 171 IMAF_DECODER_API IMAF_Err IMAF_Decoder_Destroy(IMAF_DecoderH IMafDecoder);
eo301@0 172
eo301@0 173 IMAF_DECODER_API char* IMAF_Decoder_GetLastError(IMAF_Err err);
eo301@0 174
eo301@0 175 #ifdef __cplusplus
eo301@0 176 }
eo301@0 177 #endif
eo301@0 178
eo301@0 179 #endif // IM_AF_Decoder_h__