[gst-devel] Get pointer to elements in pipeline

wl2776 wl2776 at gmail.com
Wed Mar 17 15:37:15 CET 2010



ericcardmanNo3 wrote:
> 
> i can do:
> GstElement* pDEC = (GstElement*) gst_pad_get_parent_element
> (dec->sinkpad);
> g_object_get(pDEC,"name",&valName,NULL);   //valName is then mydecoder0
> 
If dec is your decoder, then now you've got a pad in pDEC.


ericcardmanNo3 wrote:
> 
> But i can not call:
> GstElement *pFS = gst_bin_get_by_name(GST_BIN(pDEC),"filesrc");  
> here the errormsg comes:
> (<unknown>:1196): GLib-GObject-WARNING **: invalid cast from
> `GstMyDecoder' to `GstBin'
> 
Of course, because, pDEC is a pad not a bin.
What do you get, if you call GST_ELEMENT_PARENT(dec) ?
This should be a bin.
-- 
View this message in context: http://n4.nabble.com/Get-pointer-to-elements-in-pipeline-tp1596079p1596490.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list