gst-libav: Update codec mapping for FFVHuff video

Replaces the ad-hoc type string 'video/x-gst-av-ffvhuff' with
'video/x-ffvhuff' for the avdec_ffvhuff and avenc_ffvhuff elements.

Related to #2389.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4250>
This commit is contained in:
Tobias Rapp 2023-03-22 15:48:18 +01:00 committed by GStreamer Marge Bot
parent c467ac0869
commit b30f982cf5
2 changed files with 15 additions and 3 deletions

View file

@ -8357,7 +8357,7 @@
"long-name": "libav Huffyuv FFmpeg variant decoder", "long-name": "libav Huffyuv FFmpeg variant decoder",
"pad-templates": { "pad-templates": {
"sink": { "sink": {
"caps": "video/x-gst-av-ffvhuff:\n", "caps": "video/x-ffvhuff:\n",
"direction": "sink", "direction": "sink",
"presence": "always" "presence": "always"
}, },
@ -58625,7 +58625,7 @@
"presence": "always" "presence": "always"
}, },
"src": { "src": {
"caps": "video/x-gst-av-ffvhuff:\n", "caps": "video/x-ffvhuff:\n",
"direction": "src", "direction": "src",
"presence": "always" "presence": "always"
} }

View file

@ -1271,6 +1271,16 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
} }
break; break;
case AV_CODEC_ID_FFVHUFF:
caps =
gst_ff_vid_caps_new (context, NULL, codec_id, encode,
"video/x-ffvhuff", NULL);
if (context) {
gst_caps_set_simple (caps,
"bpp", G_TYPE_INT, context->bits_per_coded_sample, NULL);
}
break;
case AV_CODEC_ID_CYUV: case AV_CODEC_ID_CYUV:
caps = caps =
gst_ff_vid_caps_new (context, NULL, codec_id, encode, gst_ff_vid_caps_new (context, NULL, codec_id, encode,
@ -1909,7 +1919,6 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
case AV_CODEC_ID_VIXL: case AV_CODEC_ID_VIXL:
case AV_CODEC_ID_QPEG: case AV_CODEC_ID_QPEG:
case AV_CODEC_ID_PGMYUV: case AV_CODEC_ID_PGMYUV:
case AV_CODEC_ID_FFVHUFF:
case AV_CODEC_ID_WNV1: case AV_CODEC_ID_WNV1:
case AV_CODEC_ID_MP3ADU: case AV_CODEC_ID_MP3ADU:
case AV_CODEC_ID_MP3ON4: case AV_CODEC_ID_MP3ON4:
@ -4092,6 +4101,9 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
} else if (!strcmp (mimetype, "video/x-huffyuv")) { } else if (!strcmp (mimetype, "video/x-huffyuv")) {
id = AV_CODEC_ID_HUFFYUV; id = AV_CODEC_ID_HUFFYUV;
video = TRUE; video = TRUE;
} else if (!strcmp (mimetype, "video/x-ffvhuff")) {
id = AV_CODEC_ID_FFVHUFF;
video = TRUE;
} else if (!strcmp (mimetype, "audio/x-mace")) { } else if (!strcmp (mimetype, "audio/x-mace")) {
gint maceversion = 0; gint maceversion = 0;