我目前正在使用使用C的gstreamer开发应用程序。
我包括了所有gstreamer库,包括路径,glib路径,库路径等。当我尝试使用Gstreamer lib构建应用程序以在屏幕上播放原始文件时,一切正常。

但是,我想设置此处描述的videoparse元素的“ framerate”属性:

https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-plugins/html/gst-plugins-bad-plugins-videoparse.html

但是帧速率的类型是GstFraction。但是Gstreamer库中没有GstFraction数据类型。同样从链接中,我无法重定向到GstFraction的描述...(与GstVideoFormat不同,我在标题gst / video / video.h下找到了它)

我搜索了许多Web帖子,它们都是关于gstreamer-sdk的python API的。

最佳答案

这是fraction类型,因此您必须进行如下设置:

g_object_set(videoparser, "framerate", 15, 1, NULL);

关于c - 如何在C中的gstreamer中定义videoparse元素的“帧速率”属性,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/43451360/

10-11 23:03
查看更多