sinkCaps = __makeVideoDefaultEncodedCaps(ini);
if (sinkCaps) {
+ std::string encoderName = GST_ELEMENT_NAME(encoder);
+ if (encoderName.find("v4l2h264enc") != std::string::npos)
+ gst_caps_set_simple(sinkCaps, "level", G_TYPE_STRING, "3", NULL);
+
gst::_printCaps(sinkCaps, ELEMENT_NAME_ENCODE_CAPSFILTER);
g_object_set(G_OBJECT(capsfilter2), "caps", sinkCaps, NULL);
gst_caps_unref(sinkCaps);
vInfo.frameRate, 1, NULL);
if (!gst_caps_is_equal(oldCaps, newCaps)) {
- gst::_printCaps(newCaps, "newCaps");
+ gst::_printCaps(newCaps, "newCaps");
g_object_set(G_OBJECT(element), "caps", newCaps, NULL);
}
RET_IF(!oldCaps, "capsfilter has no caps");
GstCaps* newCaps = gst_caps_copy(oldCaps);
- std::string elementName = GST_ELEMENT_NAME(element);
- if (elementName.find("v4l2h264enc"))
- gst_caps_set_simple(newCaps, "level", G_TYPE_STRING, "3", NULL);
if (vInfo.width > 0)
gst_caps_set_simple(newCaps, "width", G_TYPE_INT, vInfo.width, NULL);
gst_caps_set_simple(newCaps, "height", G_TYPE_INT, vInfo.height, NULL);
if (!gst_caps_is_equal(oldCaps, newCaps)) {
- gst::_printCaps(newCaps, "Change newCaps");
+ gst::_printCaps(newCaps, "Change newCaps");
g_object_set(G_OBJECT(element), "caps", newCaps, NULL);
}