Thank you for the tips.<br>Unfortunately, if I remplace by this:<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">if (!GST_IS_MINI_OBJECT(mini_obj))
<br> g_print("mini_obj is not an object T_T");<br> else{<br> g_print(" name object miniobject %s |",gst_object_get_name(mini_obj));<br>
g_print("name object pad %s |", gst_object_get_name(pad));<br>}<br></blockquote>I got theses errors:<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
(test:23555): GStreamer-CRITICAL **: gst_object_get_name: assertion `GST_IS_OBJECT (object)' failed<br> name object miniobject (null) |name object pad sink |<br><br></blockquote><br>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.
<br><br>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).<br><br><div>
<span class="gmail_quote">2007/4/12, Tim Müller <<a href="mailto:t.i.m@zen.co.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">t.i.m@zen.co.uk</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Thu, 2007-04-12 at 14:51 +0200, Erwan Masson wrote:<br><br>> I got a big problem: The callback for have-data and handoffs did not<br>> work.<br>> Here is my code for the have-data cb:<br><br><br>> if(!mini_obj){
<br>> }else{<br>> if (mini_obj==NULL){<br>> }else{<br><br>Don't these two checks check for the same thing? :)<br><br>> if (video_frames == 25){
<br>> g_print("\n have data video\n");<br>> if (!GST_IS_OBJECT (mini_obj))<br>> g_print("mini_obj is not an object");
<br>> else<br>> g_print(" name object miniobject %s<br>> |",gst_object_get_name(mini_obj));<br><br>...<br><br>> And I always get on output "mini_obj is not an object".
<br>> I got the same error with my handoff signal, the GstBuffer * is not a<br>> gstBuffer.<br><br>You should check with GST_IS_MINI_OBJECT(), GST_IS_BUFFER(),<br>GST_IS_EVENT() etc.<br><br>GstObject is a proper GObject that derives from GObject. A GstMiniObject
<br>is a new and completely different fundamental type that doesn't derive<br>from either GObject or GstObject.<br><br>Hope this helps.<br><br>Cheers<br> -Tim<br><br><br><br></blockquote></div><br>