|
List Info
Thread: !GST_IS_OBJECT Problem
|
|
| !GST_IS_OBJECT Problem |

|
2007-04-12 07:51:03 |
|
Hello again,
I got a big problem: The callback for have-data and handoffs did not work.
Here is my code for the have-data cb:
static gboolean cb_have_data_video (GstPad *pad, GstMiniObject *mini_obj, gpointer user_data)
{
video_frames++;
if (video_frames == 0){
}
if(!mini_obj){
}else{
if (mini_obj==NULL){
}else{
if (video_frames == 25){
g_print("n have data videon");
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));
g_print("name object pad %s ", gst_object_get_name(pad));
}
}
}
return TRUE;
}
I connect to a pad my cb :
gst_pad_add_buffer_probe (pad, G_CALLBACK (cb_have_data_video), NULL);
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.
Why this is bugged?
Thanks for your help,
Erwan Masson
---------- Forwarded message ---------- From: Erwan Masson < masson.erwan1 gmail.com">masson.erwan1 gmail.com>
Date: 6 avr. 2007 16:33 Subject: Taking a frame To: gstreamer-devel lists.sourceforge.net">gstreamer-devel lists.sourceforge.net
Hello, I am trying Gstreamer since a few weeks, and I would like to grab some info on raw video frames.
First
I try to use pngenc to grab frame, but I only be able to grab the first
frame, and with a notify-caps signal, I took some info(width, height,
framerate).
After a few search, I find typefind Element, which help me to find some info, with have-type signal.
But now, I am not able to retrieve any frame. How I do to retrieve frame please?
Thanks for your help.
Erwan Masson
|
| Re: !GST_IS_OBJECT Problem |
  United Kingdom |
2007-04-12 07:58:22 |
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 videon");
> 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 lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
|
|
| Re: !GST_IS_OBJECT Problem |

|
2007-04-12 08:52:28 |
|
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)39; 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 zen.co.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">t.i.m 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 videon"); > 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
|
| Re: !GST_IS_OBJECT Problem |

|
2007-04-12 08:54:47 |
On 4/12/07, Erwan Masson <masson.erwan1 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 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
> videon");
> > > 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 lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
>
>
--
Edward Hervey
Multimedia editing developer / Fluendo S.A.
http://www.pitivi.org/
------------------------------------------------------------
-------------
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 lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
|
|
[1-4]
|
|