mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
androidmedia: Add support for AV1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4156>
This commit is contained in:
parent
bf903a05f4
commit
fe580cacb8
3 changed files with 17 additions and 0 deletions
|
@ -2405,6 +2405,15 @@ gst_amc_codec_info_to_caps (const GstAmcCodecInfo * codec_info,
|
|||
"height", GST_TYPE_INT_RANGE, 16, 4096,
|
||||
"framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
|
||||
|
||||
encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
|
||||
} else if (strcmp (type->mime, "video/av01") == 0) {
|
||||
tmp = gst_structure_new ("video/x-av1",
|
||||
"stream-format", G_TYPE_STRING, "obu-stream",
|
||||
"alignment", G_TYPE_STRING, "tu",
|
||||
"width", GST_TYPE_INT_RANGE, 16, 4096,
|
||||
"height", GST_TYPE_INT_RANGE, 16, 4096,
|
||||
"framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
|
||||
|
||||
encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
|
||||
} else if (strcmp (type->mime, "video/mpeg2") == 0) {
|
||||
tmp = gst_structure_new ("video/mpeg",
|
||||
|
|
|
@ -323,6 +323,8 @@ caps_to_mime (GstCaps * caps)
|
|||
return "video/x-vnd.on2.vp8";
|
||||
} else if (strcmp (name, "video/x-vp9") == 0) {
|
||||
return "video/x-vnd.on2.vp9";
|
||||
} else if (strcmp (name, "video/x-av1") == 0) {
|
||||
return "video/av01";
|
||||
} else if (strcmp (name, "video/x-divx") == 0) {
|
||||
return "video/mp4v-es";
|
||||
}
|
||||
|
|
|
@ -232,6 +232,8 @@ create_amc_format (GstAmcVideoEnc * encoder, GstVideoCodecState * input_state,
|
|||
mime = "video/x-vnd.on2.vp8";
|
||||
} else if (strcmp (name, "video/x-vp9") == 0) {
|
||||
mime = "video/x-vnd.on2.vp9";
|
||||
} else if (strcmp (name, "video/x-av1") == 0) {
|
||||
mime = "video/av01";
|
||||
} else {
|
||||
GST_ERROR_OBJECT (encoder, "Failed to convert caps(%s/...) to any mime",
|
||||
name);
|
||||
|
@ -459,6 +461,10 @@ caps_from_amc_format (GstAmcFormat * amc_format)
|
|||
caps = gst_caps_new_empty_simple ("video/x-vp8");
|
||||
} else if (strcmp (mime, "video/x-vnd.on2.vp9") == 0) {
|
||||
caps = gst_caps_new_empty_simple ("video/x-vp9");
|
||||
} else if (strcmp (mime, "video/av01") == 0) {
|
||||
caps = gst_caps_new_simple ("video/x-av1",
|
||||
"stream-format", G_TYPE_STRING, "obu-stream",
|
||||
"alignment", G_TYPE_STRING, "tu", NULL);
|
||||
}
|
||||
|
||||
gst_caps_set_simple (caps, "width", G_TYPE_INT, width,
|
||||
|
|
Loading…
Reference in a new issue