Sunday 15 May 2011

GStreamer - Sample Plugin -


I am a newbie in gstreamer and am trying to develop a sample plugin for caption decoding.

I have downloaded the GSTimer plugin template: based on the information.

When I launch the plugin from the command line it is working fine.

I wrote a sample app to verify the plugin But now, I'm having trouble determining the pipeline position to play Below is the code snippet < / P>

Any information will be very helpful.

Thank you in advance, Revolution


  gst_init (NULL, NULL); Loop = g_main_loop_new (tap, true); G_print ("\ nGstreamer startup and loop is created"); Pipeline = gst_pipeline_new ("pipeline"); Source = gst_element_factory_make ("filesrc", "source"); Filter = gst_element_factory_make ("myfilter", "testfilter"); Sync = gst_element_factory_make ("fakesink", "sync"); If ({zero! = Pipeline) & amp; amp; (NULL! = Source) & amp; amp; (NULL! = Filter) & amp; (Null! = Sync)) {g_print ("\ n Successfully Factory Elements" ); G_object_set (G_OBJECT (source), "location", filename, null); G_print ("Set file name \ n"); G_object_set (G_OBJECT (filter), "silent", 1, faucet); G_print ("set \ nshort type \ n"); / We add a message handler * / bus = GSTPPline_get_bus (GSTPPEN (pipeline)); Bus_watch_id = gst_bus_add_watch (bus, bus trap, loop); Gst_object_unref (bus); G_print ("\ n Monitor to view and view just"); Gst_bin_add_many (GST_BIN (pipeline), source, filter, sync, faucet); Gst_element_link_many (source, filter, sync); G_print ("\ n Factory elements are added and linked"); G_signal_connect (filter, "pad-added", G_CALLBACK (on_pad_added), filter); G_print ("Read Now:% s \ n", "test.txt"); G_print ("establish pipeline state to play"); Ret = gst_element_set_state (pipeline, GST_STATE_PLAYING); If (ret == GST_STATE_CHANGE_FAILURE) {g_print ("\ n Failed to set pipeline position to play \ n"); } Else {g_print ("\ nTo set the pipeline state successfully \ n"); }} And {g_print ("failure to create factory elements"); }   

After trying some examples on gstreamer elements, the problem was found .

In addition to the filric, filter, faxink: If I also add the decoder element to the pipeline, then I want to change the game

but why it is necessary - I'm still trying to understand it

And sometimes, the name is also causing problems to make the pipeline: gst_pipeline_new (" Pipeline

No comments:

Post a Comment