勿回,给搜索的人用的,大陆局域网内搜不到:
也许有人会要找怎么写格式转换的 “format”吧,如下:
g_object_set( G_OBJECT( geFltGray ),"caps",
gst_caps_new_simple("video/x-raw-gray",
"width",G_TYPE_INT,1000,
"height",G_TYPE_INT,720,
"bpp",G_TYPE_INT,8,
"depth",G_TYPE_INT,8,
"framerate",GST_TYPE_FRACTION,1,1,//帧率,根据自己情况修改
NULL
),NULL);
g_object_set( G_OBJECT( geFltI420 ),"caps",
gst_caps_new_simple("video/x-raw-yuv",
"format",GST_TYPE_FOURCC,GST_MAKE_FOURCC( 'I','4','2','0' ),
"width",G_TYPE_INT,1000,
"height",G_TYPE_INT,720,
"framerate",GST_TYPE_FRACTION,1,1,
NULL
),NULL); |