[gst-devel] !GST_IS_OBJECT Problem

Edward Hervey bilboed at gmail.com
Thu Apr 12 15:54:47 CEST 2007


On 4/12/07, Erwan Masson <masson.erwan1 at gmail.com> wrote:
> 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));

  As Tim said, GstMiniObjects are NOT GstObjects/GObject, you can
therefore NOT use any g_object_*/gst_object_* methods on them. You
want to check the gst_mini_object_* methods instead.

   Edward

> > }
> >
> 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
> >
> >
> >
> >
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>


-- 
Edward Hervey
Multimedia editing developer / Fluendo S.A.
http://www.pitivi.org/


More information about the gstreamer-devel mailing list