瑞芯微Rockchip开发者社区
直播中

笑过就走

9年用户 914经验值
擅长:可编程逻辑 电源/新能源 MEMS/传感技术
私信 关注
[问答]

求大佬分享gstreamer的库?

  • 我想搞一个基于gstreamer的应用,类似gst-launch-1.0,有对应的库吗?还是需要自己移植?

回帖(1)

毛雅清

2022-1-6 10:32:56

  • #include


  • int main (int argc, char *argv[])
  • {
  •   GstElementFactory *factory;
  •   GstElement * element;


  •   /* init GStreamer */
  •   gst_init (&argc, &argv);


  •   /* create element, method #2 */
  •   factory = gst_element_factory_find ("fakesrc");
  •   if (!factory) {
  •     g_print ("Failed to find factory of type 'fakesrc'n");
  •     return -1;
  •   }
  •   element = gst_element_factory_create (factory, "source");
  •   if (!element) {
  •     g_print ("Failed to create element, even though its factory exists!n");
  •     return -1;
  •   }
  •   
  •   /* get name */
  •   g_object_get (G_OBJECT (element), "name", &name, NULL);
  •   g_print ("The name of the element is '%s'.n", name);
  •   g_free (name);
  •   
  •   gst_object_unref (GST_OBJECT (element));
  •   gst_object_unref (GST_OBJECT (factory));


  •   return 0;
  • }



举报

更多回帖

发帖
×
20
完善资料,
赚取积分