aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Wolowiec <bartek.wolowiec@gmail.com>2008-03-28 20:42:55 +0000
committerBartlomiej Wolowiec <bartek.wolowiec@gmail.com>2008-03-28 20:42:55 +0000
commit79b25a27b823f8ca7c21b00e5ec381507a3ba4a0 (patch)
tree55d3b1ef9e90cc59314727e3aa4ec0957cfc408c
parentbe1e2a2bfa592ff14355c6b97e90c530e2c0fcc0 (diff)
downloadffmpeg-79b25a27b823f8ca7c21b00e5ec381507a3ba4a0.tar.gz
change name from stream type to frame type in AC3 code
Originally committed as revision 12623 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/ac3.h12
-rw-r--r--libavcodec/ac3_parser.c16
-rw-r--r--libavcodec/ac3_parser.h2
-rw-r--r--libavcodec/ac3dec.c4
4 files changed, 17 insertions, 17 deletions
diff --git a/libavcodec/ac3.h b/libavcodec/ac3.h
index 7c2e3d9cbb..0d1a850c9e 100644
--- a/libavcodec/ac3.h
+++ b/libavcodec/ac3.h
@@ -84,7 +84,7 @@ typedef struct {
uint8_t bitstream_id;
uint8_t channel_mode;
uint8_t lfe_on;
- uint8_t stream_type;
+ uint8_t frame_type;
/** @} */
/** @defgroup derived Derived values
@@ -99,11 +99,11 @@ typedef struct {
} AC3HeaderInfo;
typedef enum {
- EAC3_STREAM_TYPE_INDEPENDENT = 0,
- EAC3_STREAM_TYPE_DEPENDENT,
- EAC3_STREAM_TYPE_AC3_CONVERT,
- EAC3_STREAM_TYPE_RESERVED
-} EAC3StreamType;
+ EAC3_FRAME_TYPE_INDEPENDENT = 0,
+ EAC3_FRAME_TYPE_DEPENDENT,
+ EAC3_FRAME_TYPE_AC3_CONVERT,
+ EAC3_FRAME_TYPE_RESERVED
+} EAC3FrameType;
void ac3_common_init(void);
diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c
index ea7f592082..d0a22b9950 100644
--- a/libavcodec/ac3_parser.c
+++ b/libavcodec/ac3_parser.c
@@ -84,13 +84,13 @@ int ff_ac3_parse_header(const uint8_t buf[7], AC3HeaderInfo *hdr)
hdr->bit_rate = (ff_ac3_bitrate_tab[frame_size_code>>1] * 1000) >> hdr->sr_shift;
hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on;
hdr->frame_size = ff_ac3_frame_size_tab[frame_size_code][hdr->sr_code] * 2;
- hdr->stream_type = EAC3_STREAM_TYPE_INDEPENDENT;
+ hdr->frame_type = EAC3_FRAME_TYPE_INDEPENDENT;
} else {
/* Enhanced AC-3 */
hdr->crc1 = 0;
- hdr->stream_type = get_bits(&gbc, 2);
- if(hdr->stream_type == EAC3_STREAM_TYPE_RESERVED)
- return AC3_PARSE_ERROR_STREAM_TYPE;
+ hdr->frame_type = get_bits(&gbc, 2);
+ if(hdr->frame_type == EAC3_FRAME_TYPE_RESERVED)
+ return AC3_PARSE_ERROR_FRAME_TYPE;
skip_bits(&gbc, 3); // skip substream id
@@ -138,14 +138,14 @@ static int ac3_sync(AACAC3ParseContext *hdr_info, AACAC3FrameFlag *flag)
hdr_info->channels = hdr.channels;
hdr_info->samples = AC3_FRAME_SIZE;
- switch(hdr.stream_type){
- case EAC3_STREAM_TYPE_INDEPENDENT:
+ switch(hdr.frame_type){
+ case EAC3_FRAME_TYPE_INDEPENDENT:
*flag = FRAME_START;
break;
- case EAC3_STREAM_TYPE_DEPENDENT:
+ case EAC3_FRAME_TYPE_DEPENDENT:
*flag = FRAME_CONTINUATION;
break;
- case EAC3_STREAM_TYPE_AC3_CONVERT:
+ case EAC3_FRAME_TYPE_AC3_CONVERT:
*flag = FRAME_COMPLETE;
break;
}
diff --git a/libavcodec/ac3_parser.h b/libavcodec/ac3_parser.h
index f82be029fb..1e512bf2b6 100644
--- a/libavcodec/ac3_parser.h
+++ b/libavcodec/ac3_parser.h
@@ -30,7 +30,7 @@ typedef enum {
AC3_PARSE_ERROR_BSID = -2,
AC3_PARSE_ERROR_SAMPLE_RATE = -3,
AC3_PARSE_ERROR_FRAME_SIZE = -4,
- AC3_PARSE_ERROR_STREAM_TYPE = -5,
+ AC3_PARSE_ERROR_FRAME_TYPE = -5,
} AC3ParseError;
/**
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index a1bbef256c..fc12f347fb 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1169,8 +1169,8 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
case AC3_PARSE_ERROR_FRAME_SIZE:
av_log(avctx, AV_LOG_ERROR, "invalid frame size\n");
break;
- case AC3_PARSE_ERROR_STREAM_TYPE:
- av_log(avctx, AV_LOG_ERROR, "invalid stream type\n");
+ case AC3_PARSE_ERROR_FRAME_TYPE:
+ av_log(avctx, AV_LOG_ERROR, "invalid frame type\n");
break;
default:
av_log(avctx, AV_LOG_ERROR, "invalid header\n");