mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
androidmedia: Add support for VP9
This commit is contained in:
parent
eca6c35601
commit
5619690ae1
3 changed files with 13 additions and 0 deletions
|
@ -3870,6 +3870,13 @@ 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/x-vnd.on2.vp9") == 0) {
|
||||
tmp = gst_structure_new ("video/x-vp9",
|
||||
"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",
|
||||
|
|
|
@ -328,6 +328,8 @@ caps_to_mime (GstCaps * caps)
|
|||
return "video/hevc";
|
||||
} else if (strcmp (name, "video/x-vp8") == 0) {
|
||||
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-divx") == 0) {
|
||||
return "video/mp4v-es";
|
||||
}
|
||||
|
|
|
@ -210,6 +210,8 @@ create_amc_format (GstAmcVideoEnc * encoder, GstVideoCodecState * input_state,
|
|||
}
|
||||
} else if (strcmp (name, "video/x-vp8") == 0) {
|
||||
mime = "video/x-vnd.on2.vp8";
|
||||
} else if (strcmp (name, "video/x-vp9") == 0) {
|
||||
mime = "video/x-vnd.on2.vp9";
|
||||
} else {
|
||||
GST_ERROR_OBJECT (encoder, "Failed to convert caps(%s/...) to any mime",
|
||||
name);
|
||||
|
@ -397,6 +399,8 @@ caps_from_amc_format (GstAmcFormat * amc_format)
|
|||
}
|
||||
} else if (strcmp (mime, "video/x-vnd.on2.vp8") == 0) {
|
||||
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");
|
||||
}
|
||||
|
||||
gst_caps_set_simple (caps, "width", G_TYPE_INT, width,
|
||||
|
|
Loading…
Reference in a new issue