comparison avisynth.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 33a244b7ca65
children
comparison
equal deleted inserted replaced
5909:b8041f85c327 5910:536e5527c1e0
83 LONG struct_size = sizeof(WAVEFORMATEX); 83 LONG struct_size = sizeof(WAVEFORMATEX);
84 if (AVIStreamReadFormat(stream->handle, 0, &wvfmt, &struct_size) != S_OK) 84 if (AVIStreamReadFormat(stream->handle, 0, &wvfmt, &struct_size) != S_OK)
85 continue; 85 continue;
86 86
87 st = av_new_stream(s, id); 87 st = av_new_stream(s, id);
88 st->codec->codec_type = CODEC_TYPE_AUDIO; 88 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
89 89
90 st->codec->block_align = wvfmt.nBlockAlign; 90 st->codec->block_align = wvfmt.nBlockAlign;
91 st->codec->channels = wvfmt.nChannels; 91 st->codec->channels = wvfmt.nChannels;
92 st->codec->sample_rate = wvfmt.nSamplesPerSec; 92 st->codec->sample_rate = wvfmt.nSamplesPerSec;
93 st->codec->bit_rate = wvfmt.nAvgBytesPerSec * 8; 93 st->codec->bit_rate = wvfmt.nAvgBytesPerSec * 8;
109 109
110 if (AVIStreamReadFormat(stream->handle, 0, &imgfmt, &struct_size) != S_OK) 110 if (AVIStreamReadFormat(stream->handle, 0, &imgfmt, &struct_size) != S_OK)
111 continue; 111 continue;
112 112
113 st = av_new_stream(s, id); 113 st = av_new_stream(s, id);
114 st->codec->codec_type = CODEC_TYPE_VIDEO; 114 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
115 st->r_frame_rate.num = stream->info.dwRate; 115 st->r_frame_rate.num = stream->info.dwRate;
116 st->r_frame_rate.den = stream->info.dwScale; 116 st->r_frame_rate.den = stream->info.dwScale;
117 117
118 st->codec->width = imgfmt.bmiHeader.biWidth; 118 st->codec->width = imgfmt.bmiHeader.biWidth;
119 st->codec->height = imgfmt.bmiHeader.biHeight; 119 st->codec->height = imgfmt.bmiHeader.biHeight;