我正在尝试支持所有相机驱动程序,但是我需要与音频和视频驱动程序分开。所以我需要
来自GstCaps元素的video / x-raw,image / jpeg,但我在互联网上找不到任何内容,该如何从GstCaps中仅获取video / x-raw。
我知道如何从GstCaps获取高度和宽度
gst_structure_get_int(s,“ height”,&height);
gst_structure_get_int(s,“ width”,&width);
但是我不知道如何获取
“视频/ x-raw”,
“图像/ jpeg”,
“应用程序/ x-rtp”
它的作用是什么?
答案 0 :(得分:1)
使用gst_structure_get_name (const GstStructure *structure);
const gchar *media_type = gst_structure_get_name (s);
g_print("media_type is: %s\n", media_type);