comparison tmv.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 bbdbcaf1e6f2
children 11bb10c37225
comparison
equal deleted inserted replaced
5909:b8041f85c327 5910:536e5527c1e0
107 av_log(s, AV_LOG_ERROR, "unsupported features 0x%02x\n", 107 av_log(s, AV_LOG_ERROR, "unsupported features 0x%02x\n",
108 features & ~(TMV_PADDING | TMV_STEREO)); 108 features & ~(TMV_PADDING | TMV_STEREO));
109 return -1; 109 return -1;
110 } 110 }
111 111
112 ast->codec->codec_type = CODEC_TYPE_AUDIO; 112 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
113 ast->codec->codec_id = CODEC_ID_PCM_U8; 113 ast->codec->codec_id = CODEC_ID_PCM_U8;
114 ast->codec->channels = features & TMV_STEREO ? 2 : 1; 114 ast->codec->channels = features & TMV_STEREO ? 2 : 1;
115 ast->codec->bits_per_coded_sample = 8; 115 ast->codec->bits_per_coded_sample = 8;
116 ast->codec->bit_rate = ast->codec->sample_rate * 116 ast->codec->bit_rate = ast->codec->sample_rate *
117 ast->codec->bits_per_coded_sample; 117 ast->codec->bits_per_coded_sample;
119 119
120 fps.num = ast->codec->sample_rate * ast->codec->channels; 120 fps.num = ast->codec->sample_rate * ast->codec->channels;
121 fps.den = tmv->audio_chunk_size; 121 fps.den = tmv->audio_chunk_size;
122 av_reduce(&fps.num, &fps.den, fps.num, fps.den, 0xFFFFFFFFLL); 122 av_reduce(&fps.num, &fps.den, fps.num, fps.den, 0xFFFFFFFFLL);
123 123
124 vst->codec->codec_type = CODEC_TYPE_VIDEO; 124 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
125 vst->codec->codec_id = CODEC_ID_TMV; 125 vst->codec->codec_id = CODEC_ID_TMV;
126 vst->codec->pix_fmt = PIX_FMT_PAL8; 126 vst->codec->pix_fmt = PIX_FMT_PAL8;
127 vst->codec->width = char_cols * 8; 127 vst->codec->width = char_cols * 8;
128 vst->codec->height = char_rows * 8; 128 vst->codec->height = char_rows * 8;
129 av_set_pts_info(vst, 32, fps.den, fps.num); 129 av_set_pts_info(vst, 32, fps.den, fps.num);