| 1 | /* |
| 2 | * Xing VBR tagging for LAME. |
| 3 | * |
| 4 | * Copyright (c) 1999 A.L. Faber |
| 5 | * |
| 6 | * This library is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU Library General Public |
| 8 | * License as published by the Free Software Foundation; either |
| 9 | * version 2 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This library is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * Library General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Library General Public |
| 17 | * License along with this library; if not, write to the |
| 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 19 | * Boston, MA 02111-1307, USA. |
| 20 | */ |
| 21 | |
| 22 | #ifndef LAME_VRBTAG_H |
| 23 | #define LAME_VRBTAG_Hcxx . . $ `external/lame/VbrTag.h:23:9`! |
| 24 | |
| 25 | |
| 26 | /* ----------------------------------------------------------- |
| 27 | * A Vbr header may be present in the ancillary |
| 28 | * data field of the first frame of an mp3 bitstream |
| 29 | * The Vbr header (optionally) contains |
| 30 | * frames total number of audio frames in the bitstream |
| 31 | * bytes total number of bytes in the bitstream |
| 32 | * toc table of contents |
| 33 | |
| 34 | * toc (table of contents) gives seek points |
| 35 | * for random access |
| 36 | * the ith entry determines the seek point for |
| 37 | * i-percent duration |
| 38 | * seek point in bytes = (toc[i]/256.0) * total_bitstream_bytes |
| 39 | * e.g. half duration seek point = (toc[50]/256.0) * total_bitstream_bytes |
| 40 | */ |
| 41 | |
| 42 | |
| 43 | #define FRAMES_FLAGcxx . . $ `external/lame/VbrTag.h:43:9`! 0x0001 |
| 44 | #define BYTES_FLAGcxx . . $ `external/lame/VbrTag.h:44:9`! 0x0002 |
| 45 | #define TOC_FLAGcxx . . $ `external/lame/VbrTag.h:45:9`! 0x0004 |
| 46 | #define VBR_SCALE_FLAGcxx . . $ `external/lame/VbrTag.h:46:9`! 0x0008 |
| 47 | |
| 48 | #define NUMTOCENTRIEScxx . . $ `external/lame/VbrTag.h:48:9`! 100 |
| 49 | |
| 50 | #ifndef lame_internal_flags_definedcxx . . $ `external/lame/encoder.h:147:9`! |
| 51 | #define lame_internal_flags_defined |
| 52 | struct lame_internal_flags; |
| 53 | typedef struct lame_internal_flags lame_internal_flags; |
| 54 | #endif |
| 55 | |
| 56 | |
| 57 | /*structure to receive extracted header */ |
| 58 | /* toc may be NULL*/ |
| 59 | typedef structcxx . . $ $anonymous_type_f8e00e9d947f4225_0# { |
| 60 | int h_idcxx . . $ $anonymous_type_f8e00e9d947f4225_0#h_id.; /* from MPEG header, 0=MPEG2, 1=MPEG1 */ |
| 61 | int sampratecxx . . $ $anonymous_type_f8e00e9d947f4225_0#samprate.; /* determined from MPEG header */ |
| 62 | int flagscxx . . $ $anonymous_type_f8e00e9d947f4225_0#flags.; /* from Vbr header data */ |
| 63 | int framescxx . . $ $anonymous_type_f8e00e9d947f4225_0#frames.; /* total bit stream frames from Vbr header data */ |
| 64 | int bytescxx . . $ $anonymous_type_f8e00e9d947f4225_0#bytes.; /* total bit stream bytes from Vbr header data */ |
| 65 | int vbr_scalecxx . . $ $anonymous_type_f8e00e9d947f4225_0#vbr_scale.; /* encoded vbr scale from Vbr header data */ |
| 66 | unsigned char toccxx . . $ $anonymous_type_f8e00e9d947f4225_0#toc.[NUMTOCENTRIEScxx . . $ `external/lame/VbrTag.h:48:9`!]; /* may be NULL if toc not desired */ |
| 67 | int headersizecxx . . $ $anonymous_type_f8e00e9d947f4225_0#headersize.; /* size of VBR header, in bytes */ |
| 68 | int enc_delaycxx . . $ $anonymous_type_f8e00e9d947f4225_0#enc_delay.; /* encoder delay */ |
| 69 | int enc_paddingcxx . . $ $anonymous_type_f8e00e9d947f4225_0#enc_padding.; /* encoder paddign added at end of stream */ |
| 70 | } VBRTAGDATAcxx . . $ VBRTAGDATA#; |
| 71 | |
| 72 | int GetVbrTagcxx . . $ GetVbrTag(483ff48f8ccba583).(VBRTAGDATAcxx . . $ VBRTAGDATA# * pTagData, const unsigned char *buf); |
| 73 | |
| 74 | int InitVbrTagcxx . . $ InitVbrTag(12e50c934c2e73e2).(lame_global_flagscxx . . $ lame_global_flags# * gfp); |
| 75 | int PutVbrTagcxx . . $ PutVbrTag(fb438155f9919c1f).(lame_global_flagscxx . . $ lame_global_flags# const *gfp, FILEcxx . . $ FILE# * fid); |
| 76 | void AddVbrFramecxx . . $ AddVbrFrame(4f558d83b2842a93).(lame_internal_flagscxx . . $ lame_internal_flags# * gfc); |
| 77 | void UpdateMusicCRCcxx . . $ UpdateMusicCRC(3cd8f30c3c91a9ed).(uint16_tcxx . . $ uint16_t# * crc, const unsigned char *buffer, int size); |
| 78 | |
| 79 | #endif |