Mercurial > libavformat.hg
comparison mvi.c @ 5910:536e5527c1e0 libavformat
Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.
author | stefano |
---|---|
date | Tue, 30 Mar 2010 23:30:55 +0000 |
parents | f84f69fc9d08 |
children |
comparison
equal
deleted
inserted
replaced
5909:b8041f85c327 | 5910:536e5527c1e0 |
---|---|
75 av_log(s, AV_LOG_ERROR, "unhandled version (%d,%d)\n", version, player_version); | 75 av_log(s, AV_LOG_ERROR, "unhandled version (%d,%d)\n", version, player_version); |
76 return AVERROR_INVALIDDATA; | 76 return AVERROR_INVALIDDATA; |
77 } | 77 } |
78 | 78 |
79 av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); | 79 av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); |
80 ast->codec->codec_type = CODEC_TYPE_AUDIO; | 80 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
81 ast->codec->codec_id = CODEC_ID_PCM_U8; | 81 ast->codec->codec_id = CODEC_ID_PCM_U8; |
82 ast->codec->channels = 1; | 82 ast->codec->channels = 1; |
83 ast->codec->bits_per_coded_sample = 8; | 83 ast->codec->bits_per_coded_sample = 8; |
84 ast->codec->bit_rate = ast->codec->sample_rate * 8; | 84 ast->codec->bit_rate = ast->codec->sample_rate * 8; |
85 | 85 |
86 av_set_pts_info(vst, 64, msecs_per_frame, 1000000); | 86 av_set_pts_info(vst, 64, msecs_per_frame, 1000000); |
87 vst->codec->codec_type = CODEC_TYPE_VIDEO; | 87 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
88 vst->codec->codec_id = CODEC_ID_MOTIONPIXELS; | 88 vst->codec->codec_id = CODEC_ID_MOTIONPIXELS; |
89 | 89 |
90 mvi->get_int = (vst->codec->width * vst->codec->height < (1 << 16)) ? get_le16 : get_le24; | 90 mvi->get_int = (vst->codec->width * vst->codec->height < (1 << 16)) ? get_le16 : get_le24; |
91 | 91 |
92 mvi->audio_frame_size = ((uint64_t)mvi->audio_data_size << MVI_FRAC_BITS) / frames_count; | 92 mvi->audio_frame_size = ((uint64_t)mvi->audio_data_size << MVI_FRAC_BITS) / frames_count; |