mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
avcodecmap: Add support for SpeedHQ video codec
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/79>
This commit is contained in:
parent
e1928898c8
commit
f7371f8691
2 changed files with 31 additions and 1 deletions
|
@ -19166,7 +19166,7 @@
|
|||
"long-name": "libav NewTek SpeedHQ decoder",
|
||||
"pad-templates": {
|
||||
"sink": {
|
||||
"caps": "unknown/unknown:\n",
|
||||
"caps": "video/x-speedhq:\n",
|
||||
"direction": "sink",
|
||||
"presence": "always"
|
||||
},
|
||||
|
|
|
@ -1413,6 +1413,21 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
|
|||
"video/x-cineform", NULL);
|
||||
break;
|
||||
|
||||
case AV_CODEC_ID_SPEEDHQ:
|
||||
if (context && context->codec_tag) {
|
||||
gchar *variant = g_strdup_printf ("%" GST_FOURCC_FORMAT,
|
||||
GST_FOURCC_ARGS (context->codec_tag));
|
||||
caps =
|
||||
gst_ff_vid_caps_new (context, NULL, codec_id, encode,
|
||||
"video/x-speedhq", "variant", G_TYPE_STRING, variant, NULL);
|
||||
g_free (variant);
|
||||
} else {
|
||||
caps =
|
||||
gst_ff_vid_caps_new (context, NULL, codec_id, encode,
|
||||
"video/x-speedhq", NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
case AV_CODEC_ID_AAC:
|
||||
{
|
||||
caps =
|
||||
|
@ -3415,6 +3430,18 @@ gst_ffmpeg_caps_with_codecid (enum AVCodecID codec_id,
|
|||
}
|
||||
break;
|
||||
}
|
||||
case AV_CODEC_ID_SPEEDHQ:
|
||||
{
|
||||
const gchar *variant;
|
||||
|
||||
if (context && (variant = gst_structure_get_string (str, "variant"))
|
||||
&& strlen (variant) == 4) {
|
||||
|
||||
context->codec_tag =
|
||||
GST_MAKE_FOURCC (variant[0], variant[1], variant[2], variant[3]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -4070,6 +4097,9 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
|
|||
} else if (!strcmp (mimetype, "video/x-cineform")) {
|
||||
id = AV_CODEC_ID_CFHD;
|
||||
video = TRUE;
|
||||
} else if (!strcmp (mimetype, "video/x-speedhq")) {
|
||||
id = AV_CODEC_ID_SPEEDHQ;
|
||||
video = TRUE;
|
||||
} else if (!strcmp (mimetype, "video/x-indeo")) {
|
||||
gint indeoversion = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue