summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libmad/frame.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/libmad/frame.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmad/frame.h60
1 files changed, 31 insertions, 29 deletions
diff --git a/core/multimedia/opieplayer/libmad/frame.h b/core/multimedia/opieplayer/libmad/frame.h
index e88d0c8..3b8e454 100644
--- a/core/multimedia/opieplayer/libmad/frame.h
+++ b/core/multimedia/opieplayer/libmad/frame.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * mad - MPEG audio decoder 2 * libmad - MPEG audio decoder library
3 * Copyright (C) 2000-2001 Robert Leslie 3 * Copyright (C) 2000-2001 Robert Leslie
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
@@ -45,24 +45,26 @@ enum mad_emphasis {
45 MAD_EMPHASIS_CCITT_J_17 = 3 /* CCITT J.17 emphasis */ 45 MAD_EMPHASIS_CCITT_J_17 = 3 /* CCITT J.17 emphasis */
46}; 46};
47 47
48struct mad_frame { 48struct mad_header {
49 struct mad_header { 49 enum mad_layer layer; /* audio layer (1, 2, or 3) */
50 enum mad_layer layer; /* audio layer (1, 2, or 3) */ 50 enum mad_mode mode; /* channel mode (see above) */
51 enum mad_mode mode; /* channel mode (see above) */ 51 int mode_extension; /* additional mode info */
52 int mode_extension; /* additional mode info */ 52 enum mad_emphasis emphasis; /* de-emphasis to use (see above) */
53 enum mad_emphasis emphasis; /* de-emphasis to use (see above) */ 53
54 unsigned long bitrate; /* stream bitrate (bps) */
55 unsigned int samplerate; /* sampling frequency (Hz) */
54 56
55 unsigned long bitrate; /* stream bitrate (bps) */ 57 unsigned short crc_check; /* frame CRC accumulator */
56 unsigned int samplerate; /* sampling frequency (Hz) */ 58 unsigned short crc_target; /* final target CRC checksum */
57 59
58 unsigned short crc_check; /* frame CRC accumulator */ 60 int flags; /* flags (see below) */
59 unsigned short crc_target; /* final target CRC checksum */ 61 int private_bits; /* private bits (see below) */
60 62
61 int flags; /* flags (see below) */ 63 mad_timer_t duration; /* audio playing time of frame */
62 int private_bits; /* private bits (see below) */ 64};
63 65
64 mad_timer_t duration; /* audio playing time of frame */ 66struct mad_frame {
65 } header; 67 struct mad_header header; /* MPEG audio header */
66 68
67 int options; /* decoding options (from stream) */ 69 int options; /* decoding options (from stream) */
68 70
@@ -77,26 +79,26 @@ struct mad_frame {
77 ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)) 79 ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36))
78 80
79enum { 81enum {
80 MAD_FLAG_NPRIVATE_III = 0x0007,/* number of Layer III private bits */ 82 MAD_FLAG_NPRIVATE_III = 0x0007,/* number of Layer III private bits */
81 MAD_FLAG_INCOMPLETE = 0x0008,/* header but not data is decoded */ 83 MAD_FLAG_INCOMPLETE = 0x0008,/* header but not data is decoded */
82 84
83 MAD_FLAG_PROTECTION = 0x0010,/* frame has CRC protection */ 85 MAD_FLAG_PROTECTION = 0x0010,/* frame has CRC protection */
84 MAD_FLAG_COPYRIGHT = 0x0020,/* frame is copyright */ 86 MAD_FLAG_COPYRIGHT = 0x0020,/* frame is copyright */
85 MAD_FLAG_ORIGINAL = 0x0040,/* frame is original (else copy) */ 87 MAD_FLAG_ORIGINAL = 0x0040,/* frame is original (else copy) */
86 MAD_FLAG_PADDING = 0x0080,/* frame has additional slot */ 88 MAD_FLAG_PADDING = 0x0080,/* frame has additional slot */
87 89
88 MAD_FLAG_I_STEREO = 0x0100,/* uses intensity joint stereo */ 90 MAD_FLAG_I_STEREO = 0x0100,/* uses intensity joint stereo */
89 MAD_FLAG_MS_STEREO = 0x0200,/* uses middle/side joint stereo */ 91 MAD_FLAG_MS_STEREO = 0x0200,/* uses middle/side joint stereo */
90 MAD_FLAG_FREEFORMAT = 0x0400,/* uses free format bitrate */ 92 MAD_FLAG_FREEFORMAT = 0x0400,/* uses free format bitrate */
91 93
92 MAD_FLAG_LSF_EXT = 0x1000,/* lower sampling freq. extension */ 94 MAD_FLAG_LSF_EXT = 0x1000,/* lower sampling freq. extension */
93 MAD_FLAG_MC_EXT = 0x2000,/* multichannel audio extension */ 95 MAD_FLAG_MC_EXT = 0x2000,/* multichannel audio extension */
94 MAD_FLAG_MPEG_2_5_EXT = 0x4000/* MPEG 2.5 (unofficial) extension */ 96 MAD_FLAG_MPEG_2_5_EXT = 0x4000/* MPEG 2.5 (unofficial) extension */
95}; 97};
96 98
97enum { 99enum {
98 MAD_PRIVATE_HEADER = 0x0100,/* header private bit */ 100 MAD_PRIVATE_HEADER = 0x0100,/* header private bit */
99 MAD_PRIVATE_III = 0x001f/* Layer III private bits (up to 5) */ 101 MAD_PRIVATE_III = 0x001f/* Layer III private bits (up to 5) */
100}; 102};
101 103
102void mad_header_init(struct mad_header *); 104void mad_header_init(struct mad_header *);