mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
CODEC_ID_* -> AV_CODEC_ID_*
This commit is contained in:
parent
4dd36df4f7
commit
068be939cb
8 changed files with 556 additions and 546 deletions
|
@ -695,8 +695,8 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
|
|||
* libavcodec/svq1.c:svq1_decode_frame writes to the given buffer.
|
||||
* libavcodec/svq3.c:svq3_decode_slice_header too.
|
||||
* ffmpeg devs know about it and will fix it (they said). */
|
||||
if (oclass->in_plugin->id == CODEC_ID_SVQ1 ||
|
||||
oclass->in_plugin->id == CODEC_ID_SVQ3) {
|
||||
if (oclass->in_plugin->id == AV_CODEC_ID_SVQ1 ||
|
||||
oclass->in_plugin->id == AV_CODEC_ID_SVQ3) {
|
||||
inbuf = gst_buffer_make_writable (inbuf);
|
||||
}
|
||||
|
||||
|
@ -801,8 +801,8 @@ gst_ffmpegauddec_register (GstPlugin * plugin)
|
|||
}
|
||||
|
||||
/* no quasi-codecs, please */
|
||||
if (in_plugin->id >= CODEC_ID_PCM_S16LE &&
|
||||
in_plugin->id <= CODEC_ID_PCM_BLURAY) {
|
||||
if (in_plugin->id >= AV_CODEC_ID_PCM_S16LE &&
|
||||
in_plugin->id <= AV_CODEC_ID_PCM_BLURAY) {
|
||||
goto next;
|
||||
}
|
||||
|
||||
|
@ -858,17 +858,17 @@ gst_ffmpegauddec_register (GstPlugin * plugin)
|
|||
* msmpeg4v3 same, as it outperforms divxdec for divx3 playback.
|
||||
* VC1/WMV3 are not working and thus unpreferred for now. */
|
||||
switch (in_plugin->id) {
|
||||
case CODEC_ID_RA_144:
|
||||
case CODEC_ID_RA_288:
|
||||
case CODEC_ID_COOK:
|
||||
case AV_CODEC_ID_RA_144:
|
||||
case AV_CODEC_ID_RA_288:
|
||||
case AV_CODEC_ID_COOK:
|
||||
rank = GST_RANK_PRIMARY;
|
||||
break;
|
||||
/* SIPR: decoder should have a higher rank than realaudiodec.
|
||||
*/
|
||||
case CODEC_ID_SIPR:
|
||||
case AV_CODEC_ID_SIPR:
|
||||
rank = GST_RANK_SECONDARY;
|
||||
break;
|
||||
case CODEC_ID_MP3:
|
||||
case AV_CODEC_ID_MP3:
|
||||
rank = GST_RANK_NONE;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -670,8 +670,8 @@ gst_ffmpegaudenc_register (GstPlugin * plugin)
|
|||
goto next;
|
||||
|
||||
/* no quasi codecs, please */
|
||||
if ((in_plugin->id >= CODEC_ID_PCM_S16LE &&
|
||||
in_plugin->id <= CODEC_ID_PCM_BLURAY)) {
|
||||
if ((in_plugin->id >= AV_CODEC_ID_PCM_S16LE &&
|
||||
in_plugin->id <= AV_CODEC_ID_PCM_BLURAY)) {
|
||||
goto next;
|
||||
}
|
||||
|
||||
|
@ -727,7 +727,7 @@ gst_ffmpegaudenc_register (GstPlugin * plugin)
|
|||
|
||||
switch (in_plugin->id) {
|
||||
/* avenc_aac: see https://bugzilla.gnome.org/show_bug.cgi?id=691617 */
|
||||
case CODEC_ID_AAC:
|
||||
case AV_CODEC_ID_AAC:
|
||||
rank = GST_RANK_NONE;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -302,7 +302,7 @@ struct _GParamSpecData
|
|||
/* if TRUE, try to get the default from lavc and ignore the paramspec default */
|
||||
gboolean lavc_default;
|
||||
|
||||
/* these lists are arrays terminated by CODEC_ID_NONE entry:
|
||||
/* these lists are arrays terminated by AV_CODEC_ID_NONE entry:
|
||||
* property applies to a codec if it's not in the exclude_list
|
||||
* and in exclude_list (or the latter is NULL) */
|
||||
gint *include_list;
|
||||
|
@ -346,22 +346,22 @@ G_STMT_START { \
|
|||
/* some typical include and exclude lists; modify and/or add where needed */
|
||||
|
||||
static gint mpeg[] = {
|
||||
CODEC_ID_MPEG4,
|
||||
CODEC_ID_MSMPEG4V1,
|
||||
CODEC_ID_MSMPEG4V2,
|
||||
CODEC_ID_MSMPEG4V3,
|
||||
CODEC_ID_MPEG1VIDEO,
|
||||
CODEC_ID_MPEG2VIDEO,
|
||||
CODEC_ID_H263P,
|
||||
CODEC_ID_FLV1,
|
||||
CODEC_ID_H263,
|
||||
CODEC_ID_NONE
|
||||
AV_CODEC_ID_MPEG4,
|
||||
AV_CODEC_ID_MSMPEG4V1,
|
||||
AV_CODEC_ID_MSMPEG4V2,
|
||||
AV_CODEC_ID_MSMPEG4V3,
|
||||
AV_CODEC_ID_MPEG1VIDEO,
|
||||
AV_CODEC_ID_MPEG2VIDEO,
|
||||
AV_CODEC_ID_H263P,
|
||||
AV_CODEC_ID_FLV1,
|
||||
AV_CODEC_ID_H263,
|
||||
AV_CODEC_ID_NONE
|
||||
};
|
||||
|
||||
static gint huffyuv[] = {
|
||||
CODEC_ID_HUFFYUV,
|
||||
CODEC_ID_FFVHUFF,
|
||||
CODEC_ID_NONE
|
||||
AV_CODEC_ID_HUFFYUV,
|
||||
AV_CODEC_ID_FFVHUFF,
|
||||
AV_CODEC_ID_NONE
|
||||
};
|
||||
|
||||
/* Properties should be added here for registration into the config store.
|
||||
|
@ -707,7 +707,7 @@ gst_ffmpeg_cfg_codec_has_pspec (enum CodecID codec_id, GParamSpec * pspec)
|
|||
|
||||
/* check if excluded first */
|
||||
if ((codec = qdata->exclude_list)) {
|
||||
for (; *codec != CODEC_ID_NONE; ++codec) {
|
||||
for (; *codec != AV_CODEC_ID_NONE; ++codec) {
|
||||
if (*codec == codec_id)
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -715,7 +715,7 @@ gst_ffmpeg_cfg_codec_has_pspec (enum CodecID codec_id, GParamSpec * pspec)
|
|||
|
||||
/* no include list means it is accepted */
|
||||
if ((codec = qdata->include_list)) {
|
||||
for (; *codec != CODEC_ID_NONE; ++codec) {
|
||||
for (; *codec != AV_CODEC_ID_NONE; ++codec) {
|
||||
if (*codec == codec_id)
|
||||
ret = TRUE;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1383,7 +1383,7 @@ gst_ffmpegdemux_loop (GstFFMpegDemux * demux)
|
|||
srcpad = stream->pad;
|
||||
|
||||
rawvideo = (avstream->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
|
||||
avstream->codec->codec_id == CODEC_ID_RAWVIDEO);
|
||||
avstream->codec->codec_id == AV_CODEC_ID_RAWVIDEO);
|
||||
|
||||
if (rawvideo)
|
||||
outsize = gst_ffmpeg_avpicture_get_size (avstream->codec->pix_fmt,
|
||||
|
|
|
@ -442,7 +442,7 @@ gst_ffmpegmux_request_new_pad (GstElement * element,
|
|||
st = avformat_new_stream (ffmpegmux->context, NULL);
|
||||
st->id = collect_pad->padnum;
|
||||
st->codec->codec_type = type;
|
||||
st->codec->codec_id = CODEC_ID_NONE; /* this is a check afterwards */
|
||||
st->codec->codec_id = AV_CODEC_ID_NONE; /* this is a check afterwards */
|
||||
st->codec->bit_rate = bitrate;
|
||||
st->codec->frame_size = framesize;
|
||||
/* we fill in codec during capsnego */
|
||||
|
@ -479,7 +479,7 @@ gst_ffmpegmux_setcaps (GstPad * pad, GstCaps * caps)
|
|||
|
||||
/* for the format-specific guesses, we'll go to
|
||||
* our famous codec mapper */
|
||||
if (gst_ffmpeg_caps_to_codecid (caps, st->codec) == CODEC_ID_NONE)
|
||||
if (gst_ffmpeg_caps_to_codecid (caps, st->codec) == AV_CODEC_ID_NONE)
|
||||
goto not_accepted;
|
||||
|
||||
/* copy over the aspect ratios, ffmpeg expects the stream aspect to match the
|
||||
|
@ -558,7 +558,7 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
|
|||
AVStream *st = ffmpegmux->context->streams[collect_pad->padnum];
|
||||
|
||||
/* check whether the pad has successfully completed capsnego */
|
||||
if (st->codec->codec_id == CODEC_ID_NONE) {
|
||||
if (st->codec->codec_id == AV_CODEC_ID_NONE) {
|
||||
GST_ELEMENT_ERROR (ffmpegmux, CORE, NEGOTIATION, (NULL),
|
||||
("no caps set on stream %d (%s)", collect_pad->padnum,
|
||||
(st->codec->codec_type == AVMEDIA_TYPE_VIDEO) ?
|
||||
|
@ -568,12 +568,12 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
|
|||
/* set framerate for audio */
|
||||
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||
switch (st->codec->codec_id) {
|
||||
case CODEC_ID_PCM_S16LE:
|
||||
case CODEC_ID_PCM_S16BE:
|
||||
case CODEC_ID_PCM_U16LE:
|
||||
case CODEC_ID_PCM_U16BE:
|
||||
case CODEC_ID_PCM_S8:
|
||||
case CODEC_ID_PCM_U8:
|
||||
case AV_CODEC_ID_PCM_S16LE:
|
||||
case AV_CODEC_ID_PCM_S16BE:
|
||||
case AV_CODEC_ID_PCM_U16LE:
|
||||
case AV_CODEC_ID_PCM_U16BE:
|
||||
case AV_CODEC_ID_PCM_S8:
|
||||
case AV_CODEC_ID_PCM_U8:
|
||||
st->codec->frame_size = 1;
|
||||
break;
|
||||
default:
|
||||
|
@ -825,7 +825,7 @@ gst_ffmpegmux_get_id_caps (enum CodecID *id_list)
|
|||
gint i;
|
||||
|
||||
caps = gst_caps_new_empty ();
|
||||
for (i = 0; id_list[i] != CODEC_ID_NONE; i++) {
|
||||
for (i = 0; id_list[i] != AV_CODEC_ID_NONE; i++) {
|
||||
if ((t = gst_ffmpeg_codecid_to_caps (id_list[i], NULL, TRUE)))
|
||||
gst_caps_append (caps, t);
|
||||
}
|
||||
|
|
|
@ -312,10 +312,10 @@ gst_ffmpegviddec_open (GstFFMpegVidDec * ffmpegdec)
|
|||
oclass->in_plugin->name, oclass->in_plugin->id);
|
||||
|
||||
switch (oclass->in_plugin->id) {
|
||||
case CODEC_ID_RV10:
|
||||
case CODEC_ID_RV30:
|
||||
case CODEC_ID_RV20:
|
||||
case CODEC_ID_RV40:
|
||||
case AV_CODEC_ID_RV10:
|
||||
case AV_CODEC_ID_RV30:
|
||||
case AV_CODEC_ID_RV20:
|
||||
case AV_CODEC_ID_RV40:
|
||||
ffmpegdec->is_realvideo = TRUE;
|
||||
break;
|
||||
default:
|
||||
|
@ -375,8 +375,8 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder,
|
|||
|
||||
GST_OBJECT_LOCK (ffmpegdec);
|
||||
/* stupid check for VC1 */
|
||||
if ((oclass->in_plugin->id == CODEC_ID_WMV3) ||
|
||||
(oclass->in_plugin->id == CODEC_ID_VC1))
|
||||
if ((oclass->in_plugin->id == AV_CODEC_ID_WMV3) ||
|
||||
(oclass->in_plugin->id == AV_CODEC_ID_VC1))
|
||||
oclass->in_plugin->id = gst_ffmpeg_caps_to_codecid (state->caps, NULL);
|
||||
|
||||
/* close old session */
|
||||
|
@ -1669,12 +1669,12 @@ gst_ffmpegviddec_register (GstPlugin * plugin)
|
|||
goto next;
|
||||
|
||||
/* no quasi-codecs, please */
|
||||
if (in_plugin->id == CODEC_ID_RAWVIDEO ||
|
||||
in_plugin->id == CODEC_ID_V210 ||
|
||||
in_plugin->id == CODEC_ID_V210X ||
|
||||
in_plugin->id == CODEC_ID_R210 ||
|
||||
(in_plugin->id >= CODEC_ID_PCM_S16LE &&
|
||||
in_plugin->id <= CODEC_ID_PCM_BLURAY)) {
|
||||
if (in_plugin->id == AV_CODEC_ID_RAWVIDEO ||
|
||||
in_plugin->id == AV_CODEC_ID_V210 ||
|
||||
in_plugin->id == AV_CODEC_ID_V210X ||
|
||||
in_plugin->id == AV_CODEC_ID_R210 ||
|
||||
(in_plugin->id >= AV_CODEC_ID_PCM_S16LE &&
|
||||
in_plugin->id <= AV_CODEC_ID_PCM_BLURAY)) {
|
||||
goto next;
|
||||
}
|
||||
|
||||
|
@ -1745,20 +1745,20 @@ gst_ffmpegviddec_register (GstPlugin * plugin)
|
|||
* msmpeg4v3 same, as it outperforms divxdec for divx3 playback.
|
||||
* VC1/WMV3 are not working and thus unpreferred for now. */
|
||||
switch (in_plugin->id) {
|
||||
case CODEC_ID_MPEG4:
|
||||
case CODEC_ID_MSMPEG4V3:
|
||||
case CODEC_ID_H264:
|
||||
case CODEC_ID_RV10:
|
||||
case CODEC_ID_RV20:
|
||||
case CODEC_ID_RV30:
|
||||
case CODEC_ID_RV40:
|
||||
case AV_CODEC_ID_MPEG4:
|
||||
case AV_CODEC_ID_MSMPEG4V3:
|
||||
case AV_CODEC_ID_H264:
|
||||
case AV_CODEC_ID_RV10:
|
||||
case AV_CODEC_ID_RV20:
|
||||
case AV_CODEC_ID_RV30:
|
||||
case AV_CODEC_ID_RV40:
|
||||
rank = GST_RANK_PRIMARY;
|
||||
break;
|
||||
/* DVVIDEO: we have a good dv decoder, fast on both ppc as well as x86.
|
||||
* They say libdv's quality is better though. leave as secondary.
|
||||
* note: if you change this, see the code in gstdv.c in good/ext/dv.
|
||||
*/
|
||||
case CODEC_ID_DVVIDEO:
|
||||
case AV_CODEC_ID_DVVIDEO:
|
||||
rank = GST_RANK_SECONDARY;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -367,7 +367,7 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder,
|
|||
/* fetch pix_fmt, fps, par, width, height... */
|
||||
gst_ffmpeg_videoinfo_to_context (&state->info, ffmpegenc->context);
|
||||
|
||||
if ((oclass->in_plugin->id == CODEC_ID_MPEG4)
|
||||
if ((oclass->in_plugin->id == AV_CODEC_ID_MPEG4)
|
||||
&& (ffmpegenc->context->time_base.den > 65535)) {
|
||||
/* MPEG4 Standards do not support time_base denominator greater than
|
||||
* (1<<16) - 1 . We therefore scale them down.
|
||||
|
@ -856,10 +856,11 @@ gst_ffmpegvidenc_register (GstPlugin * plugin)
|
|||
goto next;
|
||||
|
||||
/* no quasi codecs, please */
|
||||
if (in_plugin->id == CODEC_ID_RAWVIDEO ||
|
||||
in_plugin->id == CODEC_ID_V210 ||
|
||||
in_plugin->id == CODEC_ID_V210X ||
|
||||
in_plugin->id == CODEC_ID_R210 || in_plugin->id == CODEC_ID_ZLIB) {
|
||||
if (in_plugin->id == AV_CODEC_ID_RAWVIDEO ||
|
||||
in_plugin->id == AV_CODEC_ID_V210 ||
|
||||
in_plugin->id == AV_CODEC_ID_V210X ||
|
||||
in_plugin->id == AV_CODEC_ID_R210
|
||||
|| in_plugin->id == AV_CODEC_ID_ZLIB) {
|
||||
goto next;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue