new API: NeAACDecGetVersion
knik
6 years ago
1141 | 1141 | unsigned char header[8]; |
1142 | 1142 | float length = 0; |
1143 | 1143 | FILE *hMP4File; |
1144 | char *faad_id_string; | |
1145 | char *faad_copyright_string; | |
1144 | 1146 | |
1145 | 1147 | /* System dependant types */ |
1146 | 1148 | #ifdef _WIN32 |
1298 | 1300 | } |
1299 | 1301 | } |
1300 | 1302 | |
1301 | ||
1302 | faad_fprintf(stderr, " *********** Ahead Software MPEG-4 AAC Decoder V%s ******************\n\n", FAAD2_VERSION); | |
1303 | NeAACDecGetVersion(&faad_id_string, &faad_copyright_string); | |
1304 | ||
1305 | faad_fprintf(stderr, " *********** Ahead Software MPEG-4 AAC Decoder V%s ******************\n\n", faad_id_string); | |
1303 | 1306 | faad_fprintf(stderr, " Build: %s\n", __DATE__); |
1304 | faad_fprintf(stderr, " Copyright 2002-2004: Ahead Software AG\n"); | |
1305 | faad_fprintf(stderr, " http://www.audiocoding.com\n"); | |
1306 | faad_fprintf(stderr, "\n Latest version and bug tracking available here:\n"); | |
1307 | faad_fprintf(stderr, " http://sourceforge.net/projects/faac/\n\n"); | |
1307 | faad_fprintf(stderr, "%s", faad_copyright_string); | |
1308 | 1308 | if (cap & FIXED_POINT_CAP) |
1309 | 1309 | faad_fprintf(stderr, " Fixed point version\n"); |
1310 | 1310 | else |
72 | 72 | #endif |
73 | 73 | #endif |
74 | 74 | |
75 | #define FAAD2_VERSION PACKAGE_VERSION | |
76 | ||
77 | 75 | /* object types for AAC */ |
78 | 76 | #define MAIN 1 |
79 | 77 | #define LC 2 |
250 | 248 | unsigned long buffer_size, |
251 | 249 | mp4AudioSpecificConfig *mp4ASC); |
252 | 250 | |
251 | /* Get version and copyright strings */ | |
252 | int NEAACDECAPI NeAACDecGetVersion(char **faad_id_string, | |
253 | char **faad_copyright_string); | |
254 | ||
253 | 255 | #ifdef _WIN32 |
254 | 256 | #pragma pack(pop) |
255 | 257 | #endif |
63 | 63 | NeAACDecFrameInfo *hInfo); |
64 | 64 | |
65 | 65 | |
66 | int NEAACDECAPI NeAACDecGetVersion(char **faad_id_string, | |
67 | char **faad_copyright_string) | |
68 | { | |
69 | static char *libfaadName = PACKAGE_VERSION; | |
70 | static char *libCopyright = | |
71 | " Copyright 2002-2004: Ahead Software AG\n" | |
72 | " http://www.audiocoding.com\n" | |
73 | " bug tracking: https://sourceforge.net/p/faac/bugs/\n"; | |
74 | ||
75 | if (faad_id_string) | |
76 | *faad_id_string = libfaadName; | |
77 | ||
78 | if (faad_copyright_string) | |
79 | *faad_copyright_string = libCopyright; | |
80 | ||
81 | return 0; | |
82 | } | |
66 | 83 | char NEAACDECAPI *NeAACDecGetErrorMessage(unsigned char errcode) |
67 | 84 | { |
68 | 85 | if (errcode >= NUM_ERROR_MESSAGES) |
114 | 131 | hDecoder->config.downMatrix = 0; |
115 | 132 | hDecoder->adts_header_present = 0; |
116 | 133 | hDecoder->adif_header_present = 0; |
117 | hDecoder->latm_header_present = 0; | |
134 | hDecoder->latm_header_present = 0; | |
118 | 135 | #ifdef ERROR_RESILIENCE |
119 | 136 | hDecoder->aacSectionDataResilienceFlag = 0; |
120 | 137 | hDecoder->aacScalefactorDataResilienceFlag = 0; |
282 | 299 | #endif |
283 | 300 | /* Check if an ADIF header is present */ |
284 | 301 | if ((buffer[0] == 'A') && (buffer[1] == 'D') && |
285 | (buffer[2] == 'I') && (buffer[3] == 'F')) | |
286 | { | |
302 | (buffer[2] == 'I') && (buffer[3] == 'F')) | |
303 | { | |
287 | 304 | hDecoder->adif_header_present = 1; |
288 | 305 | |
289 | 306 | get_adif_header(&adif, &ld); |
324 | 341 | } |
325 | 342 | |
326 | 343 | if (!*samplerate) |
327 | return -1; | |
344 | return -1; | |
328 | 345 | |
329 | 346 | #if (defined(PS_DEC) || defined(DRM_PS)) |
330 | 347 | /* check if we have a mono file */ |