[gst-devel] !GST_IS_OBJECT Problem
Tim Müller
t.i.m at zen.co.uk
Thu Apr 12 14:58:22 CEST 2007
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
More information about the gstreamer-devel
mailing list