Hi,
I am using a custom element, which I have loaded to Playbin2 (by setting the rank higher). Unfortunately, to make it work correctly I need to set some properties of that element, and I do not know how to do that, please. Thanks a lot |
On 12/07/2011 10:52 AM, JohnJohn wrote:
> Hi, > > I am using a custom element, which I have loaded to Playbin2 (by setting the > rank higher). Unfortunately, to make it work correctly I need to set some > properties of that element, and I do not know how to do that, please. Either iterator over the playbin children recursively until you have your element or use gst_child_proxy_set(playbin2, "path::to::your::element::property", value, NULL); You can do a pipleine dot dump in gst-launch to determine the "path". Stefan > Thanks a lot > > -- > View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Element-properties-on-Playbin2-tp4168370p4168370.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
Thanks a lot for your answer > Either iterator over the playbin children recursively until you have > your element or use > gst_child_proxy_set(playbin2, "path::to::your::element::property", > value, NULL); I tried these but apparently the pipeline is not created yet: My C program in "pseudo-code" is virtually that : int main() { gst_init(); GMainLoop* loop = g_main_loop_new(); //Set rank higher for my custom element //... GstElement* myBin = gst_element_factory_make( "playbin2" , "playbin" ); g_object_set( "uri" , ... ); GstElement* sink = make_my_sink(); g_object_set( "sink" , ... ); g_object_set( "sink" , "fullscreen" , 1 ); gst_element_set_state( myBin , GST_STATE_PLAYING ); g_print( "Running...\n" ); //At this point, the dot file, does not show that my plugin has been loaded, thefore I can't modify it GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(myBin), GST_DEBUG_GRAPH_SHOW_ALL, "myplayer_before"); g_main_loop_run( loop ); //This is after the movie has played, the dot file shows the plugin to be //loaded, but I need to get the element before the file starts } Any ideas? Thanks a lot again. |
On 12/08/2011 12:03 PM, JohnJohn wrote:
> Hi, > Thanks a lot for your answer > >> Either iterator over the playbin children recursively until you have >> your element or use >> gst_child_proxy_set(playbin2, "path::to::your::element::property", >> value, NULL); > I tried these but apparently the pipeline is not created yet: It is quite unusal that a decoder would need parameters in order to work. As you have not told us what kidn of reconfiguration you need to do we can't suggest you potetially easier ways to achive what you want. With the information you gave, you will need to listen to element-added signals on each bin recursively until you have your element. Stefan > My C program in "pseudo-code" is virtually that : > > int main() > { > gst_init(); > GMainLoop* loop = g_main_loop_new(); > > //Set rank higher for my custom element > //... > > GstElement* myBin = gst_element_factory_make( "playbin2" , "playbin" ); > g_object_set( "uri" , ... ); > > GstElement* sink = make_my_sink(); > g_object_set( "sink" , ... ); > g_object_set( "sink" , "fullscreen" , 1 ); > > gst_element_set_state( myBin , GST_STATE_PLAYING ); > g_print( "Running...\n" ); > > //At this point, the dot file, does not show that my plugin has been > loaded, thefore I can't modify it > GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(myBin), GST_DEBUG_GRAPH_SHOW_ALL, > "myplayer_before"); > > g_main_loop_run( loop ); > > //This is after the movie has played, the dot file shows the plugin to > be > //loaded, but I need to get the element before the file starts > > } > > Any ideas? > > Thanks a lot again. > > -- > View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Element-properties-on-Playbin2-tp4168370p4172276.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |