mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
Replace deprecated CODEC_TYPE_AUDIO and CODEC_TYPE_VIDEO with the
corresponding AVMEDIA_TYPE_* symbols. Originally committed as revision 25201 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2c1da681b8
commit
b9f9e59afc
@ -424,7 +424,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
|
||||
|
||||
AVCodec ansi_decoder = {
|
||||
.name = "ansi",
|
||||
.type = CODEC_TYPE_VIDEO,
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = CODEC_ID_ANSI,
|
||||
.priv_data_size = sizeof(AnsiContext),
|
||||
.init = decode_init,
|
||||
|
@ -338,7 +338,7 @@ static av_cold int XAVS_init(AVCodecContext *avctx)
|
||||
|
||||
AVCodec libxavs_encoder = {
|
||||
.name = "libxavs",
|
||||
.type = CODEC_TYPE_VIDEO,
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = CODEC_ID_CAVS,
|
||||
.priv_data_size = sizeof(XavsContext),
|
||||
.init = XAVS_init,
|
||||
|
@ -239,7 +239,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
||||
|
||||
AVCodec pictor_decoder = {
|
||||
"pictor",
|
||||
CODEC_TYPE_VIDEO,
|
||||
AVMEDIA_TYPE_VIDEO,
|
||||
CODEC_ID_PICTOR,
|
||||
sizeof(PicContext),
|
||||
NULL,
|
||||
|
@ -502,7 +502,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, uint8_t *frame,
|
||||
AVCodec ra_144_encoder =
|
||||
{
|
||||
"real_144",
|
||||
CODEC_TYPE_AUDIO,
|
||||
AVMEDIA_TYPE_AUDIO,
|
||||
CODEC_ID_RA_144,
|
||||
sizeof(RA144Context),
|
||||
ra144_encode_init,
|
||||
|
@ -456,7 +456,7 @@ AVFilter avfilter_vsrc_color = {
|
||||
.inputs = (AVFilterPad[]) {{ .name = NULL}},
|
||||
|
||||
.outputs = (AVFilterPad[]) {{ .name = "default",
|
||||
.type = CODEC_TYPE_VIDEO,
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.request_frame = color_request_frame,
|
||||
.config_props = color_config_props },
|
||||
{ .name = NULL}},
|
||||
|
@ -639,7 +639,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
||||
av_reduce(&st->sample_aspect_ratio.num,
|
||||
&st->sample_aspect_ratio.den,
|
||||
dar[i].num, dar[i].den, INT_MAX);
|
||||
} else if ((dar[0].num > 0) && (dar[0].den > 0) && (st->codec->codec_type==CODEC_TYPE_VIDEO)) // Use ASF container value if the stream doesn't AR set.
|
||||
} else if ((dar[0].num > 0) && (dar[0].den > 0) && (st->codec->codec_type==AVMEDIA_TYPE_VIDEO)) // Use ASF container value if the stream doesn't AR set.
|
||||
av_reduce(&st->sample_aspect_ratio.num,
|
||||
&st->sample_aspect_ratio.den,
|
||||
dar[0].num, dar[0].den, INT_MAX);
|
||||
|
@ -152,7 +152,7 @@ static int flic_read_header(AVFormatContext *s,
|
||||
|
||||
/* all audio frames are the same size, so use the size of the first chunk for block_align */
|
||||
ast->codec->block_align = AV_RL32(&preamble[0]);
|
||||
ast->codec->codec_type = CODEC_TYPE_AUDIO;
|
||||
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
ast->codec->codec_id = CODEC_ID_PCM_U8;
|
||||
ast->codec->codec_tag = 0;
|
||||
ast->codec->sample_rate = FLIC_TFTD_SAMPLE_RATE;
|
||||
|
@ -337,7 +337,7 @@ static int flv_write_trailer(AVFormatContext *s)
|
||||
/* Add EOS tag */
|
||||
for (i = 0; i < s->nb_streams; i++) {
|
||||
AVCodecContext *enc = s->streams[i]->codec;
|
||||
if (enc->codec_type == CODEC_TYPE_VIDEO &&
|
||||
if (enc->codec_type == AVMEDIA_TYPE_VIDEO &&
|
||||
enc->codec_id == CODEC_ID_H264) {
|
||||
put_avc_eos_tag(pb, flv->last_video_ts);
|
||||
}
|
||||
@ -405,7 +405,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
}
|
||||
|
||||
ts = pkt->dts + flv->delay; // add delay to force positive dts
|
||||
if (enc->codec_type == CODEC_TYPE_VIDEO) {
|
||||
if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
if (flv->last_video_ts < ts)
|
||||
flv->last_video_ts = ts;
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ static void qdm2_extradata_free(PayloadContext *qdm)
|
||||
|
||||
RTPDynamicProtocolHandler ff_qdm2_dynamic_handler = {
|
||||
"X-QDM",
|
||||
CODEC_TYPE_AUDIO,
|
||||
AVMEDIA_TYPE_AUDIO,
|
||||
CODEC_ID_NONE,
|
||||
NULL,
|
||||
qdm2_extradata_new,
|
||||
|
@ -129,7 +129,7 @@ static void svq3_extradata_free(PayloadContext *sv)
|
||||
|
||||
RTPDynamicProtocolHandler ff_svq3_dynamic_handler = {
|
||||
"X-SV3V-ES",
|
||||
CODEC_TYPE_VIDEO,
|
||||
AVMEDIA_TYPE_VIDEO,
|
||||
CODEC_ID_NONE, // see if (config_packet) above
|
||||
NULL, // parse sdp line
|
||||
svq3_extradata_new,
|
||||
|
@ -75,7 +75,7 @@ static int read_header(AVFormatContext *avctx,
|
||||
if (!st)
|
||||
return AVERROR(ENOMEM);
|
||||
st->codec->codec_tag = 0;
|
||||
st->codec->codec_type = CODEC_TYPE_VIDEO;
|
||||
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
|
||||
st->codec->codec_id = CODEC_ID_ANSI;
|
||||
if (ap->width) st->codec->width = ap->width;
|
||||
if (ap->height) st->codec->height = ap->height;
|
||||
|
Loading…
Reference in New Issue
Block a user