ggstreamer正确的方法来获取幽灵垫元素按名称

问题描述 投票:0回答:1

GST1.11

我创建了一个幽灵垫,并确认它正在通过以下

gchar *ghost_pad_1_name = NULL; ghost_pad_1_name = "myGhostPad"; ghost_pad_1 = gst_ghost_pad_new (ghost_pad_1_name, pad_src_1); if(GST_PAD_DIRECTION(ghost_pad_1) == GST_PAD_SRC){ printf("Ghost is SRC -> correct\n"); // Correct } printf("Ghost Pad Name = %s\n",GST_ELEMENT_NAME(ghost_pad_1)); // myGhostPad

尝试通过使用以下返回null
来获取元素

GstElement *TestGhostPad = gst_bin_get_by_name (ghost_pad_1_name); if (!TestGhostPad){ printf("Ghost Pad is NULL\n"); // This is called } if (TestGhostPad){ printf("Ghost Pad is NOT NULL\n"); }

am i正确使用此功能?还有另一种方法来获取幽灵垫。
thanksart

	

name

c gstreamer gstreamer-1.0
1个回答
2
投票
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.