appsrc element creation error

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

appsrc element creation error

arnabsamanta
Hello All,

I am facing error in creation of the appsrc element.

The pipeline is like this.
appsrc ! encoder ! filesink

when am creating  the appsrc element as follows
     src = gst_element_factory_make("appsrc", "testsource")

am getting the following error :-
    (appsrc:21208): GLib-GObject-CRITICAL **: g_object_set: assertion
`G_IS_OBJECT (object)' failed
    ./appsrc: symbol lookup error: /lib/libgstapp-0.10.so.0: undefined
symbol: g_once_init_enter_impl

Can somebody please tell me what this error is all about  ?

I am using gst-plugins-bad-0.10.14.tar.gz.

Regards,
Arnab






------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: appsrc element creation error

Tim-Philipp Müller-2
On Fri, 2010-02-26 at 14:55 +0530, arnabsamanta wrote:

>     ./appsrc: symbol lookup error: /lib/libgstapp-0.10.so.0: undefined
> symbol: g_once_init_enter_impl
>
> Can somebody please tell me what this error is all about  ?

This means that your GLib is too old (and older than the version that
libgstapp was compiled against).

> I am using gst-plugins-bad-0.10.14.tar.gz.

appsrc has been in gst-plugins-base for some time. You should probably
use newer versions of things.

Cheers
 -Tim



------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: appsrc element creation error

Wim Taymans
In reply to this post by arnabsamanta
On Fri, 2010-02-26 at 14:55 +0530, arnabsamanta wrote:

> Hello All,
>
> I am facing error in creation of the appsrc element.
>
> The pipeline is like this.
> appsrc ! encoder ! filesink
>
> when am creating  the appsrc element as follows
>      src = gst_element_factory_make("appsrc", "testsource")
>
> am getting the following error :-
>     (appsrc:21208): GLib-GObject-CRITICAL **: g_object_set: assertion
> `G_IS_OBJECT (object)' failed
>     ./appsrc: symbol lookup error: /lib/libgstapp-0.10.so.0: undefined
> symbol: g_once_init_enter_impl
>
> Can somebody please tell me what this error is all about  ?

You seem to have a broken installation. Likely it is using a too old
glib version.

Wim

>
> I am using gst-plugins-bad-0.10.14.tar.gz.
>
> Regards,
> Arnab
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: appsrc element creation error

arnabsamanta
Thanks Wim and Tim.


Now I have installed the new glib, gstreamer and gts-plugin-base versions
as follows
glib - glib-2.22.4
gstreamer - gstreamer-0.10.26
gst-plugin-base - gst-plugins-base-0.10.26

Still I am getting the error as follows

GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)'
failed
GStreamer-CRITICAL **: gst_bin_add_many: assertion `GST_IS_ELEMENT
(element_1)' failed
GStreamer-CRITICAL **: gst_element_link_many: assertion `GST_IS_ELEMENT
(element_1)' failed
symbol lookup error: /lib/libgstapp-0.10.so.0: undefined symbol:
g_once_init_enter_impl

However when I am creating the pipeline
gst-launch appsrc name=testsource ! jpegenc ! fakesink

the pipeline states are setting as follows
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

The same through the application is giving the errors as mentioned above.

Please suggest if I am doing any thing wrong still.
And thanks in advance for going through this long mail.

For reference, I am attaching the application below

__________________________________/* start of  application */

int main(int argc, char *argv[])
{
        /* Initialize Gstreamer */
        gst_init(&argc, &argv);

        /* Declare elements and variables */
        GstElement *pipeline = NULL;
        GstElement *src = NULL ;
        GstElement *sink = NULL;
        GstElement *encoder = NULL;
        char *data = NULL;
        FILE *fp = NULL;
        int FileSize = 0;

        /* Create elements */
        pipeline = gst_pipeline_new("testing appsrc");
        if(!pipeline){
                g_printf("pipeline could not be created\n");
        }
        src = gst_element_factory_make("appsrc", "testsource");
        if(!src){
                g_printf("source element could not be created\n");
        }
        sink = gst_element_factory_make("filesink", "file sink");
        if(!sink){
                g_printf("source element could not be created\n");
        }
        encoder = gst_element_factory_make("jpegenc", "jpeg encoder");
        if(!encoder){
                g_printf("source element could not be created\n");
        }

        /*set properties of the elements */
        g_object_set(G_OBJECT(src), "caps", "ANY", NULL);
        g_object_set(G_OBJECT(sink), "location", "/root/image01.jpg", NULL);

        /* link the elements */
        gst_bin_add_many(GST_BIN(pipeline), src, encoder, sink, NULL);
        gst_element_link_many(src, encoder, sink, NULL);

        /* set them to play */
        gst_element_set_state(pipeline, GST_STATE_PLAYING);

        /* create buffer */
        data = XXX;

        /* pass the buffer */
        send_buffer_to_application(pipeline, data, FileSize);

        /* stop the pipeline */
        gst_element_set_state(pipeline, GST_STATE_NULL);

        g_object_unref(pipeline);

        return 0;
}
_______________________________/* end of application */

regards,
Arnab





------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
ab
Reply | Threaded
Open this post in threaded view
|

Re: appsrc element creation error

ab
This post has NOT been accepted by the mailing list yet.
In reply to this post by Tim-Philipp Müller-2
I am getting the same problem in my Ubuntu machine.

when I launch the plugin as
$gst-launch -v playbin2 uri=file:/home/student/GStreamer/practice/Hello.ogg   it is working fine. But when I am trying to run my application I am getting the error:

$./prac2 Hello.ogg

(prac2:1870): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(prac2:1870): GStreamer-CRITICAL **: gst_element_set_state: assertion `GST_IS_ELEMENT (element)' failed

I have installed in my Ubuntu machine (Ubuntu 10.04.2 LTS) the following GStreamer plugins :
gstreamer0.10-tools 0.10.28.1
gstreamer0.10-alsa  0.10.28.1
gstreame0.10-ffmpeg  0.10.10.1
gstreamer-plugin-base          0.10.28.1
gstreamer-plugin-good        0.10.21
gstreamer-plugin-ugly         0.10.14.1
gstreamer-plugin-ugly-m         0.10.14
gstreamer-plugin-bad           0.10.18          
totem                                2.30.2

Please suggest .what am doing wrong???
Reply | Threaded
Open this post in threaded view
|

Re: appsrc element creation error

Lauraire
This post has NOT been accepted by the mailing list yet.
Hi,

It seems to me that it comes from the setups of your compilation...

Make sure you have edited your PATH correctly in .bashrc :

"export GST_PLUGIN_PATH=/usr/local/lib/gstreamer-0.10
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:usr/local/lib/gstreamer-0.10"

What is going on is that the GstElement you need (playbin2) to build the pipeline is in a lib which is located in /usr/local/lib/gstreamer-0.10.... which has to be precised to your computer during the building of your application. You can check that by a gst-inspect-0.10 playbin2...... it show what library is used.... In your case : libgstplaybin.so....

Tell me if that works!