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