Go to the source code of this file.
Data Structures | |
struct | mpeg |
Defines | |
#define | MPEG_VERSION_1 3 |
#define | MPEG_VERSION_2 2 |
#define | MPEG_VERSION_2_5 0 |
#define | LAYER_VERSION_1 3 |
#define | LAYER_VERSION_2 2 |
#define | LAYER_VERSION_3 1 |
#define | CMODE_STEREO 0 |
#define | CMODE_JOINT_STEREO 1 |
#define | CMODE_DUAL_CHANNEL 2 |
#define | CMODE_SINGLE_CHANNEL 3 |
#define | FRAME_SIZE_LAYER_1 384 |
#define | FRAME_SIZE_LAYER_2 1152 |
#define | FRAME_SIZE_LAYER_3 1152 |
#define | MASK_SYNC 0xFFE00000 |
#define | SHIFT_SYNC 21 |
#define | MASK_MPEG 0x180000 |
#define | SHIFT_MPEG 19 |
#define | MASK_LAYER 0x60000 |
#define | SHIFT_LAYER 17 |
#define | MASK_PROT 0x10000 |
#define | SHIFT_PROT 16 |
#define | MASK_BITRATE 0xF000 |
#define | SHIFT_BITRATE 12 |
#define | MASK_FREQ 0xC00 |
#define | SHIFT_FREQ 10 |
#define | MASK_PADDING 0x200 |
#define | SHIFT_PADDING 9 |
#define | MASK_PRIV 0x100 |
#define | SHIFT_PRIV 8 |
#define | MASK_CHAN 0xC0 |
#define | SHIFT_CHAN 6 |
#define | MASK_MODE_EXT 0x30 |
#define | SHIFT_MODE_EXT 4 |
#define | MASK_COPYRIGHT 0x8 |
#define | SHIFT_COPYRIGHT 3 |
#define | MASK_ORIG 0x4 |
#define | SHIFT_ORIG 2 |
#define | MASK_EMPHASIS 0x3 |
#define | SHIFT_EMPHASIS 0 |
Functions | |
int | mpeg_read (const char *_path, struct mpeg *_mpeg) |
unsigned long int | mpeg_seek_next_header (FILE *_fp) |
int | mpeg_extract_info (unsigned long int _header, struct mpeg *_mpeg) |
size_t | mpeg_frame_length (struct mpeg *_mpeg) |
size_t | mpeg_frame_bytes (struct mpeg *_mpeg) |
void | mpeg_print (struct mpeg *_mpeg) |
#define MPEG_VERSION_1 3 |
#define MPEG_VERSION_2 2 |
#define MPEG_VERSION_2_5 0 |
#define LAYER_VERSION_1 3 |
#define LAYER_VERSION_2 2 |
#define LAYER_VERSION_3 1 |
#define CMODE_JOINT_STEREO 1 |
#define MASK_SYNC 0xFFE00000 |
#define MASK_MPEG 0x180000 |
#define SHIFT_MPEG 19 |
#define MASK_LAYER 0x60000 |
#define SHIFT_LAYER 17 |
#define MASK_PROT 0x10000 |
#define SHIFT_PROT 16 |
#define MASK_BITRATE 0xF000 |
#define SHIFT_BITRATE 12 |
#define MASK_FREQ 0xC00 |
#define SHIFT_FREQ 10 |
#define MASK_PADDING 0x200 |
#define SHIFT_PADDING 9 |
#define MASK_PRIV 0x100 |
#define SHIFT_PRIV 8 |
#define MASK_CHAN 0xC0 |
#define SHIFT_CHAN 6 |
#define MASK_MODE_EXT 0x30 |
#define SHIFT_MODE_EXT 4 |
#define MASK_COPYRIGHT 0x8 |
#define SHIFT_COPYRIGHT 3 |
#define MASK_ORIG 0x4 |
#define SHIFT_ORIG 2 |
#define MASK_EMPHASIS 0x3 |
#define SHIFT_EMPHASIS 0 |
int mpeg_read | ( | const char * | _path, | |
struct mpeg * | _mpeg | |||
) |
Definition at line 118 of file mpeg.c.
References mpeg_extract_info(), and mpeg_seek_next_header().
Referenced by main().
unsigned long int mpeg_seek_next_header | ( | FILE * | _fp | ) |
int mpeg_extract_info | ( | unsigned long int | _header, | |
struct mpeg * | _mpeg | |||
) |
Definition at line 156 of file mpeg.c.
References mpeg::bit_copyright, mpeg::bit_orig, mpeg::bit_padding, mpeg::bit_priv, mpeg::bit_prot, mpeg::bitrate, bitrates, mpeg::chan, mpeg::emphasis, mpeg::freq, freqs, mpeg::layer_desc, MASK_BITRATE, MASK_CHAN, MASK_COPYRIGHT, MASK_EMPHASIS, MASK_FREQ, MASK_LAYER, MASK_MODE_EXT, MASK_MPEG, MASK_ORIG, MASK_PADDING, MASK_PRIV, MASK_PROT, MASK_SYNC, mpeg::mode_ext, mpeg::mpeg_version, MPEG_VERSION_1, MPEG_VERSION_2, MPEG_VERSION_2_5, SHIFT_BITRATE, SHIFT_CHAN, SHIFT_COPYRIGHT, SHIFT_EMPHASIS, SHIFT_FREQ, SHIFT_LAYER, SHIFT_MODE_EXT, SHIFT_MPEG, SHIFT_ORIG, SHIFT_PADDING, SHIFT_PRIV, and SHIFT_PROT.
Referenced by mpeg_read().
size_t mpeg_frame_length | ( | struct mpeg * | _mpeg | ) |
Definition at line 200 of file mpeg.c.
References mpeg::bit_padding, mpeg::bitrate, mpeg::freq, mpeg::layer_desc, and LAYER_VERSION_1.
Referenced by mpeg_frame_bytes(), and mpeg_print().
size_t mpeg_frame_bytes | ( | struct mpeg * | _mpeg | ) |
void mpeg_print | ( | struct mpeg * | _mpeg | ) |
Definition at line 212 of file mpeg.c.
References mpeg::bit_copyright, mpeg::bit_orig, mpeg::bit_padding, mpeg::bit_priv, mpeg::bit_prot, mpeg::bitrate, mpeg::chan, CMODE_JOINT_STEREO, mpeg::emphasis, mpeg::freq, mpeg::layer_desc, LAYER_VERSION_1, LAYER_VERSION_2, LAYER_VERSION_3, mpeg::mode_ext, mpeg_frame_bytes(), mpeg_frame_length(), mpeg::mpeg_version, MPEG_VERSION_1, MPEG_VERSION_2, and MPEG_VERSION_2_5.
Referenced by main().