androidmedia: Add support for VP9

This commit is contained in:
Sebastian Dröge 2017-01-04 20:59:39 +02:00
parent eca6c35601
commit 5619690ae1
3 changed files with 13 additions and 0 deletions

View file

@ -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",

View file

@ -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";
}

View file

@ -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,