[gst-devel] !GST_IS_OBJECT Problem

Erwan Masson masson.erwan1 at gmail.com
Thu Apr 12 15:52:28 CEST 2007


Thank you for the tips.
Unfortunately, if I remplace by this:

> if (!GST_IS_MINI_OBJECT(mini_obj))
>                          g_print("mini_obj is not an object T_T");
>                      else{
>                         g_print(" name object miniobject %s
> |",gst_object_get_name(mini_obj));
>                         g_print("name object pad %s |",
> gst_object_get_name(pad));
> }
>
I got theses errors:

>  (test:23555): GStreamer-CRITICAL **: gst_object_get_name: assertion
> `GST_IS_OBJECT (object)' failed
>  name object miniobject (null) |name object pad sink |
>
>
So the mini_obj is a miniobject, but if I try to use it, I got theses error.
If I use the pointer, I got a segmentation fault.

After a few test, It seems all my callbacks have the same problem: the
second parameter is wrong, whereas the first parameter and third parameter
is good(notify::caps, have-type, handoffs, have-data).

2007/4/12, Tim Müller <t.i.m at zen.co.uk>:
>
> On Thu, 2007-04-12 at 14:51 +0200, Erwan Masson wrote:
>
> > I got a big problem: The callback for have-data and handoffs did not
> > work.
> > Here is my code for the have-data cb:
>
>
> >                  if(!mini_obj){
> >                  }else{
> >                      if (mini_obj==NULL){
> >                      }else{
>
> Don't these two checks check for the same thing? :)
>
> >                          if (video_frames == 25){
> >                              g_print("\n  have data video\n");
> >                              if (!GST_IS_OBJECT (mini_obj))
> >                                  g_print("mini_obj is not an object");
> >                              else
> >                                  g_print(" name object miniobject %s
> >         |",gst_object_get_name(mini_obj));
>
> ...
>
> > And I always get on output "mini_obj is not an object".
> > I got the same error with my handoff signal, the GstBuffer * is not a
> > gstBuffer.
>
> You should check with GST_IS_MINI_OBJECT(), GST_IS_BUFFER(),
> GST_IS_EVENT() etc.
>
> GstObject is a proper GObject that derives from GObject. A GstMiniObject
> is a new and completely different fundamental type that doesn't derive
> from either GObject or GstObject.
>
> Hope this helps.
>
> Cheers
> -Tim
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070412/b1b5ed65/attachment.htm>


More information about the gstreamer-devel mailing list