hi stefan,<br><br>when i did ldd ie .<br><br>kaps@kapil:~/gstreamer$ ldd /usr/local/lib/gstreamer-0.10/libgstmad.so<br> linux-gate.so.1 => (0xffffe000)<br> libgstreamer-0.10.so.0 => /usr/local/lib/libgstreamer-
0.10.so.0 (0xb7eeb000)<br> libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb7e9d000)<br> libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb7e9a000)<br> libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7e97000)
<br> libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb7e93000)<br> libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb7d84000)<br> libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb7cff000)<br>
libgsttag-0.10.so.0 => /usr/local/lib/libgsttag-0.10.so.0 (0xb7cf8000)<br> libmad.so.0 => /usr/lib/libmad.so.0 (0xb7ce1000)<br> libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7cbf000)<br>
libid3tag.so.0 => /usr/lib/libid3tag.so.0 (0xb7caf000)<br> libz.so.1 => /usr/lib/libz.so.1 (0xb7c9b000)<br> libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7c88000)<br> libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7b59000)
<br> /lib/ld-linux.so.2 (0x80000000)<br><br>when i use mad plugin in command line app ie along <span style="font-weight: bold;">with gst-launch</span>, it works properly. Even <span style="font-weight: bold;">gst-inspect mad
</span> gives me proper result ie .<br><br>------------------------------------------------------------------------------------------------------------------------------<br>kaps@kapil:~/gstreamer$ gst-inspect mad<br>Factory Details:
<br> Long name: mad mp3 decoder<br> Class: Codec/Decoder/Audio<br> Description: Uses mad code to decode mp3 streams<br> Author(s): Wim Taymans <<a href="mailto:wim@fluendo.com">wim@fluendo.com</a>>
<br> Rank: secondary (128)<br><br>Plugin Details:<br> Name: mad<br> Description: id3 tag manipulation and mp3 decoding based on the mad library<br> Filename: /usr/local/lib/gstreamer-
0.10/libgstmad.so<br> Version: 0.10.4<br> License: GPL<br> Source module: gst-plugins-ugly<br> Binary package: GStreamer Ugly Plug-ins source release<br> Origin URL: Unknown package origin
<br><br>GObject<br> +----GstObject<br> +----GstElement<br> +----GstMad<br><br>Pad Templates:<br> SINK template: 'sink'<br> Availability: Always<br> Capabilities:<br> audio/mpeg<br> mpegversion: 1
<br> layer: [ 1, 3 ]<br> rate: { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }<br> channels: [ 1, 2 ]<br><br> SRC template: 'src'<br> Availability: Always
<br> Capabilities:<br> audio/x-raw-int<br> endianness: 1234<br> signed: true<br> width: 32<br> depth: 32<br> rate: { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }
<br> channels: [ 1, 2 ]<br><br><br>Element Flags:<br> no flags set<br><br>Element Implementation:<br> No loopfunc(), must be chain-based or not configured yet<br> Has change_state() function: 0xb7a23b0d<br>
Has custom save_thyself() function: gst_element_save_thyself<br> Has custom restore_thyself() function: gst_element_restore_thyself<br><br>Element has no clocking capabilities.<br>Indexing capabilities:<br> element can do indexing
<br><br>Pads:<br> SRC: 'src'<br> Implementation:<br> Has custom eventfunc(): gst_mad_src_event<br> Has custom queryfunc(): gst_mad_src_query<br> Provides query types:<br> (1): position (Current position)
<br> (2): duration (Total duration)<br> (8): convert (Converting between formats)<br> Pad Template: 'src'<br> SINK: 'sink'<br> Implementation:<br> Has chainfunc(): gst_mad_chain
<br> Has custom eventfunc(): gst_mad_sink_event<br> Pad Template: 'sink'<br><br>Element Properties:<br> name : The name of the object<br> flags: readable, writable<br> String. Default: null Current: "mad0"
<br> half : Generate PCM at 1/2 sample rate<br> flags: readable, writable<br> Boolean. Default: false Current: false<br> ignore-crc : Ignore CRC errors
<br> flags: readable, writable<br> Boolean. Default: true Current: true<br>-----------------------------------------------------------------------------------------------------------
<br><br>regards<br>-kapil<br><br><br><br><div><span class="gmail_quote">On 11/10/06, <b class="gmail_sendername">Stefan Kost</b> <<a href="mailto:ensonic@hora-obscura.de">ensonic@hora-obscura.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hi,<br><br>Kapil Agrawal wrote:<br>> i am using 0.10 version.<br>><br>> yes i am using my own plugin too , but even if i remove that i get the<br>> same error of Decoder or output could<br>> > not be found - check your install . I had verified it using gdb also
<br>> . The gst_element_factory_make call to mad returns NULL.<br>then it can't load the mad plugin. what does<br>ldd /usr/lib/gstreamer-0.10/libgstmad.so<br>gives you?<br>><br>> i ran my app with GST_DEBUG="GST_REGISTRY:4,GST_PLUGIN_LOADING:4"
<br>> ./my-app 2>debug.log . In the log while there is no enty of mad anywhere.<br>Was there any output in the file at all? gstreamer (core) has to be<br>build using --enable-gst-debug to activate logging<br><br>Stefan
<br>><br>> -kapil<br>><br>> On 11/7/06, *ensonic* <<a href="mailto:ensonic@hora-obscura.de">ensonic@hora-obscura.de</a><br>> <mailto:<a href="mailto:ensonic@hora-obscura.de">ensonic@hora-obscura.de</a>
>> wrote:<br>><br>> Hi,<br>><br>> from the path it looks like you use gstreamer-0.10 (because of<br>> gst-plugins-ugly-0.10.4). That means you don't need gst-register<br>> anymore.<br>
> Can you please post the gstreamer versions that you use?<br>><br>> If you still have a gstreamer-0.9 around, you should remove it (make<br>> uninstall).<br>><br>> You definitely do not need to load plgins, if you use the
<br>> gst-registry. You<br>> only need to manually load the plugins if you build gstreamer with<br>> --disable-gst-registry.<br>><br>> In your sample you try to load the mad-plugin bt below it looks
<br>> like its is<br>> your own filter that does not work. Try running your application as:<br>> GST_DEBUG="GST_REGISTRY:4,GST_PLUGIN_LOADING:4" ./my-app 2> debug.log<br>><br>> and then search the
debg.log file for your plugin name. The you'll<br>> see if<br>> your plgin gets loaded properly. If it get loaded, you should be<br>> able to<br>> instantiate it by its name ( via gst_element_factory_make() )
<br>><br>> Stefan<br>><br>><br>> On 8:10:30 am 07/11/2006 "Kapil Agrawal" <<a href="mailto:kapil.agl@gmail.com">kapil.agl@gmail.com</a><br>> <mailto:<a href="mailto:kapil.agl@gmail.com">
kapil.agl@gmail.com</a>>> wrote:<br>> ><br>> ><br>> ><br>> > ---------- Forwarded message ----------<br>> > From: Kapil Agrawal<br>> > Date: Nov 7, 2006 12:33 PM
<br>> > Subject: Re: [gst-devel] no such element factory<br>> > To: Benoit Fouet<br>> ><br>> > i added the above mentioned code but still i am getting the error.<br>> > if i use
<br>> gst_plugin_load_file(&quot;../gstreamer/gst-plugins-ugly-0.10<br>> > .4/ext/mad/libgstmad.la&quot;,&amp;error); it give me error as<br>> &quot; ER<br>> > ROR loading plug-in: Opening module failed&quot;.
<br>> ><br>> > and if use<br>> gst_plugin_load_file(&quot;../../../usr/local/lib/gstreamer<br>> > -0.10/libgst/libgstmad.so&quot;,&amp;error); it gives me error<br>> as &quot;
<br>> > ERROR loading plug-in: Problem accessing file<br>> ../../../usr/local/lib/gst<br>> > reamer-0.10/libgst/libgstmad.so: No such file or directory&quot;.<br>> ><br>> > in both cases the path is correct and the files are present.
<br>> > following is my code.<br>> ><br>> > /***************************************************/<br>> > #include<br>> ><br>> > GstElement *pipeline, *filesrc, *decoder, *filter, *sink;
<br>> > static gboolean<br>> > bus_call (GstBus *bus,<br>> > GstMessage *msg,<br>> > gpointer data)<br>> > {<br>> > GMainLoop *loop = data;
<br>> > switch (GST_MESSAGE_TYPE (msg)) {<br>> > case GST_MESSAGE_EOS:<br>> > g_print (&quot;End-of-stream\n&quot;);<br>> > g_main_loop_quit (loop);
<br>> > break;<br>> > case GST_MESSAGE_ERROR: {<br>> > gchar *debug;<br>> > GError *err;
<br>> ><br>> gst_message_parse_erro<br>> > r (msg, &amp;err, &amp;debug);<br>> > g_free (debug);<br>> > g_print
<br>> (&quot;Error:<br>> > %s\n&quot;, err->message);<br>> > g_error_free (err);<br>> > g_main_loop_quit (loop);<br>> > break; }
<br>> > default:<br>> > break;<br>> > }<br>> > return TRUE;}<br>> ><br>> > gint<br>> > main (gint argc,
<br>> > gchar *argv[])<br>> > {<br>> > GstPlugin* load_plugin;<br>> > GError* error= NULL;<br>> ><br>> > GMainLoop *loop;
<br>> > /* initialization */<br>> > gst_init (&amp;argc, &amp;argv);<br>> > loop = g_main_loop_new (NULL, FALSE);<br>> > if (argc != 2) {<br>
> > g_print (&quot;Usage: %s \n&quot;, argv[0]);<br>> > return 01;<br>> > }<br>> > /* create elements */<br>> > pipeline = gst_pipeline_new (&quot;my_pipeline&quot;);
<br>> > gst_bus_add_watch (gst_pipeline_get_bus (GST_PIPELINE<br>> > (pipeline)), bus_call, loop);<br>> ><br>> ><br>> //gst_plugin_load_file(&quot;../gstreamer/gst-
plugins-ugly-0.1<br>> > 0.4/ext/mad/libgstmad.la&quot;,&amp;error);<br>> ><br>> gst_plugin_load_file(&quot;../../../usr/local/lib/gstreamer-0.<br>> > 10/libgst/libgstmad.so&quot;,&amp;error);
<br>> > if (error)<br>> > {<br>> > g_print (&quot;ERROR loading plug-in: %s\n&quot;,<br>> > error->message); g_free (error);
<br>> > return -1;<br>> > }<br>> > filesrc = gst_element_factory_make (&quot;filesrc&quot;,<br>> > &quot;my_filesource&quot;); decoder =
<br>> gst_element_factory_make<br>> > (&quot;mad&quot;, &quot;my_decoder&quot;);<br>> > filter = gst_element_factory_make (&quot;myelement&quot;,<br>> > &quot;my_filter&quot;); sink = gst_element_factory_make
<br>> > (&quot;alsasink&quot;, &quot;audiosink&quot;); if (!sink ||<br>> > !decoder) { g_print (&quot;Decoder or output could<br>> > not be found - check your install\n&quot;);
<br>> return -1;<br>> > } else if (!filter) {<br>> > g_print (&quot;Your self-written filter could not be<br>> > found. Make sure it &quot; &quot;is
<br>> > installed correctly in $(libdir)/gstreamer-0.9/ and that &quot;<br>> > &quot;you've ran gst-register-0.9 to<br>> register<br>> > it. Check availability &quot;
<br>> > &quot;of the plugin afterwards using \&quot;gst- inspect-0.9<br>> > my_filter\&quot;&quot;); return -1;<br>> > }<br>> > g_object_set (G_OBJECT (filesrc), &quot;location&quot;,
<br>> > argv[1], NULL); /* link everything together */<br>> > gst_element_link_many (filesrc, decoder, filter, sink,<br>> NULL);<br>> > gst_bin_add_many (GST_BIN (pipeline), filesrc, decoder,
<br>> > filter, sink, NULL); /* run */<br>> > gst_element_set_state (pipeline, GST_STATE_PLAYING);<br>> > g_main_loop_run (loop);<br>> > /* clean up */
<br>> > gst_element_set_state (pipeline, GST_STATE_NULL);<br>> > gst_object_unref (GST_OBJECT (pipeline));<br>> > return 0;<br>> > }<br>> ><br>> >
<br>> > /***************************************************/<br>> ><br>> ><br>> > On 11/6/06, Benoit Fouet wrote:Kapil Agrawal wrote:<br>> > > thanks for your reply.
<br>> > > Actually i had installed the mad plugin , and i am getting the<br>> > > above mentioned error using it. so do we need to use<br>> > > gst_plugin_load_file api whenever we add a new plugin, and can u
<br>> > > plz brief on this api further, since no enough description is<br>> > > given abt it .<br>> > you have to load the library in which your plugin is...<br>> > for instance:
<br>> > /* ........ */<br>> > GError *error;<br>> ><br>> > /* ....... */<br>> ><br>> > gst_plugin_load_file (&quot;lib_mylib.so&quot;, &amp;error);<br>
> > if (error)<br>> > {<br>> > g_print (&quot;ERROR loading plug-in: %s\n&quot;, error->message);<br>> > g_free (error);<br>> > return -1;<br>> > }
<br>> ><br>> > /* here you can call gst_element_factory_make() */<br>> ><br>> > /* ...... */<br>> ><br>> > -- Ben<br>> ><br>> > > -kapil<br>
> > ><br>> > > On 11/6/06, *Benoit Fouet* > wrote:<br>> > ><br>> > > Kapil Agrawal wrote:<br>> > > > hi ,<br>> > > ><br>
> > > > when i installed a new plugin , and used that in my .c file<br>> > > > for an application, while calling<br>> gst_element_factory_make()<br>> > > for that plugin
<br>> > > > its give me an error &quot;no such element factory<br>> > > &quot;plugin&quot; &quot;. But when i<br>> > > > use the same plugin at command line , ie gst-launch ..|
<br>> > > > plugin | .....|...... it works properly. also when i did a<br>> > > gst-inspect plugin,<br>> > > > its properties are show. even the<br>> ~/.gstreamer/registry.*.xm
<br>> > l<br>> > > has the<br>> > > > plugin entry. I am unable to find the reason, can someone<br>> > > give me some<br>> > > > pointers what ned to be done?
<br>> > > ><br>> > > > tahnks<br>> > > ><br>> > > > -kapil<br>> > > do you also load the library where the plugin is before
<br>> trying<br>> > > to call<br>> > > gst_element_factory_make() ?<br>> > > (by using gst_plugin_load_file)<br>> > ><br>> > > hope that helps
<br>> > ><br>> > > -- Ben<br>> > ><br>> > > ><br>> ><br>> > ---------------------------------------------------------------<br>> > ---------
<br>> > > ><br>> > > ><br>> ><br>> > ---------------------------------------------------------------<br>> > ----------<br>> > ><br>> > > > Using Tomcat but need to do more? Need to support web
<br>> > > services, security?<br>> > > > Get stuff done quickly with pre-integrated technology<br>> to make<br>> > > your job easier<br>> > > > Download IBM WebSphere Application Server
v.1.0.1 based on<br>> > > Apache Geronimo<br>> > > ><br>> ><br>> > <a href="http://sel.as-us.falkag.net/sel?cmd=lnk&amp;kid=120709&amp;bid=">http://sel.as-us.falkag.net/sel?cmd=lnk&amp;kid=120709&amp;bid=
</a><br>> <<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&amp;kid=120709&amp;bid=">http://sel.as-us.falkag.net/sel?cmd=lnk&amp;kid=120709&amp;bid=</a>><br>> > 263057&amp;dat=121642
<br>> > ><br>> > > ><br>> ><br>> > ---------------------------------------------------------------<br>> > ---------<br>> > > ><br>> > > > _______________________________________________
<br>> > > > gstreamer-devel mailing list<br>> > > > <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>> <mailto:<a href="mailto:gstreamer-devel@lists.sourceforge.net">
gstreamer-devel@lists.sourceforge.net</a>><br>> > ><br>> > > ><br>> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
</a><br>> > > ><br>><br>><br>> -------------------------------------------------------------------------<br>> Using Tomcat but need to do more? Need to support web services,<br>> security?
<br>> Get stuff done quickly with pre-integrated technology to make your<br>> job easier<br>> Download IBM WebSphere Application Server v.1.0.1 based on Apache<br>> Geronimo<br>> <a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642">
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642</a><br>> <<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
</a>><br>> _______________________________________________<br>> gstreamer-devel mailing list<br>> <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
> <mailto:<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a>><br>> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
</a><br>><br>><br>> ------------------------------------------------------------------------<br>><br>> -------------------------------------------------------------------------<br>> Using Tomcat but need to do more? Need to support web services, security?
<br>> Get stuff done quickly with pre-integrated technology to make your job easier<br>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo<br>> <a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642">
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642</a><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________
<br>> gstreamer-devel mailing list<br>> <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel">
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>><br><br></blockquote></div><br>