[gst-devel] get target / parent of a proxypad

ericcardmanNo3 daniel.kuhne at yahoo.de
Wed Mar 17 16:18:09 CET 2010


Sorry, but i need help on this (comment HELP NEEDED HERE):

i do:

	GstPad *pP = gst_pad_get_peer(avi->sinkpad);
	GstElement* pDEC = (GstElement*) gst_pad_get_parent_element (avi->sinkpad);
	GstElement *pEE = gst_bin_get_by_name(GST_ELEMENT_PARENT(pDEC),"filesrc");
	g_print("§§§§ GST_ELEMENT_PARENT is 0x%x pEE is 0x%x
\n",GST_ELEMENT_PARENT(pDEC),pEE);
	g_object_get(pDEC,"name",&fb_fd,NULL);
	g_print("### pP is 0x%x (pDEC is 0x%x [%s])\n",pP,pDEC,fb_fd);

	const char *pName;
	pElement = (GstElement*) gst_pad_get_parent_element (pP);
	g_object_get(pElement,"name",&fb_fd,NULL);
	g_print("### name is %s\n",fb_fd);

	GstPad *pPp = gst_element_get_pad (pElement,"sink");
	pElement1 = (GstElement*) gst_pad_get_parent_element (pPp);
	fb_fd = 0;
	g_object_get(pElement1,"name",&fb_fd,NULL);
	g_print("### name is %s\n",fb_fd);

	GstPad *pProxyPad = gst_pad_get_peer(pPp);
	g_print("### pProxyPad is 0x%x
(%s)\n",pProxyPad,gst_pad_get_name(GST_PAD(pProxyPad)));

/* HELP NEEDED HERE */
	GstIterator *pI = gst_pad_iterate_internal_links(pProxyPad);
	gpointer pElem;
	GstIteratorResult res;
	do
	{
		res = gst_iterator_next (pI,&pElem);
		g_print("§§§§ res is %u (pElem = 0x%x) \n",res,pElem);
	}while(res != GST_ITERATOR_DONE || res == GST_ITERATOR_ERROR);

	fb_fd=0;
	g_object_get(pElem,"name",&fb_fd,NULL);
	g_print("### pElem(name) is %s\n",fb_fd);

OUTPUT IS:

???? GST_ELEMENT_PARENT is 0xf4040 pEE is 0x0
### pP is 0xaad80 (pDEC is 0x1652d0 [pm6h264decoder0])
### name is typefind
### name is typefind
### pProxyPad is 0x931e0 (proxypad2)
???? res is 0 (pElem = 0x697a8)

(<unknown>:1473): GLib-GObject-CRITICAL **: g_object_get: assertion
`G_IS_OBJECT (object)' failed
### pElem(name) is (null)


Thx.

-- 
View this message in context: http://n4.nabble.com/get-target-parent-of-a-proxypad-tp1596448p1596582.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list