Hi
Am modifying a plugin code. Am getting the following warning which i need to fix . I know the program compiles with warnings but i assume it can create problems at the later stage and want to fix it but am absolutely clueless for why am getting this. Am posting the code piece and warning message. 1 GstBuffer *buf; 2 GstQueue3 *buffer; 3 buf = GST_BUFFER_DATA(buffer->buffer); where , "GstQueue3" is a structure having an element as " GstBuffer *buffer" within. The purpose of this line 3 is to copy data from buffer->buffer to buf; line 3 : warning : assignment from incompatible pointer type I know why do we get this warning in C but since am new to GStreamer am unable to figure it out. I have seen many plug-in codes using the macro this way. can any body help me ? The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi ,
Actually GST_BUFFER_DATA api will return guint8* type of data , but here you are attempting to get GstBuffer* type of data that is not possible , because GstBuffer* is a main buffer structure which has data pointer in it of guint8* type which holds the actual data of GstBuffer .
So if u do like following it will not give u any warning ,
1 guint8* buf;
2 GstQueue3 *buffer; 3 buf = GST_BUFFER_DATA(buffer->buffer->data); for more information about GstBuffer , see this http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer .
On Wed, Oct 1, 2008 at 11:30 AM, arnabsamanta <[hidden email]> wrote: Hi -- Regards, Sudarshan Bisht ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by arnabsamanta
Hi,
GST_BUFFER_DATA(buf) points to to the actual data location. GstBuffer is a structure that contains pointer to the allocated memory. GstBuffer* buf = GST_BUFFER(buffer->buffer) or guint8* ptr = GST_BUFFER_DATA(buffer->buffer) Ved On Wed, Oct 1, 2008 at 11:30 AM, arnabsamanta <[hidden email]> wrote: > Hi > Am modifying a plugin code. > Am getting the following warning which i need to fix . I know the program > compiles with warnings but i assume it can create problems at the later > stage and want to fix it but am absolutely clueless for why am getting this. > > Am posting the code piece and warning message. > > 1 GstBuffer *buf; > 2 GstQueue3 *buffer; > > 3 buf = GST_BUFFER_DATA(buffer->buffer); > > where , > "GstQueue3" is a structure having an element as " GstBuffer *buffer" > within. > The purpose of this line 3 is to copy data from buffer->buffer to buf; > > line 3 : warning : assignment from incompatible pointer type > > I know why do we get this warning in C but since am new to GStreamer am > unable to figure it out. > I have seen many plug-in codes using the macro this way. > can any body help me ? > > > > > > > The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi
Sudarshan: I guess you meant, buf = GST_BUFFER_DATA(buffer->buffer), **NOT** buf = GST_BUFFER_DATA(buffer->buffer->data); Ved On Wed, Oct 1, 2008 at 12:02 PM, ved kpl <[hidden email]> wrote: > Hi, > > GST_BUFFER_DATA(buf) points to to the actual data location. GstBuffer > is a structure that contains pointer to the allocated memory. > > GstBuffer* buf = GST_BUFFER(buffer->buffer) or > guint8* ptr = GST_BUFFER_DATA(buffer->buffer) > > Ved > > On Wed, Oct 1, 2008 at 11:30 AM, arnabsamanta > <[hidden email]> wrote: >> Hi >> Am modifying a plugin code. >> Am getting the following warning which i need to fix . I know the program >> compiles with warnings but i assume it can create problems at the later >> stage and want to fix it but am absolutely clueless for why am getting this. >> >> Am posting the code piece and warning message. >> >> 1 GstBuffer *buf; >> 2 GstQueue3 *buffer; >> >> 3 buf = GST_BUFFER_DATA(buffer->buffer); >> >> where , >> "GstQueue3" is a structure having an element as " GstBuffer *buffer" >> within. >> The purpose of this line 3 is to copy data from buffer->buffer to buf; >> >> line 3 : warning : assignment from incompatible pointer type >> >> I know why do we get this warning in C but since am new to GStreamer am >> unable to figure it out. >> I have seen many plug-in codes using the macro this way. >> can any body help me ? >> >> >> >> >> >> >> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> gstreamer-devel mailing list >> [hidden email] >> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel >> > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by ved kpl
Hi ,
sorry it should be like this , i missed it .
3 buf = GST_BUFFER_DATA(buffer->buffer);
Thanks Ved for correcting it .
On Wed, Oct 1, 2008 at 12:02 PM, ved kpl <[hidden email]> wrote: Hi, -- Regards, Sudarshan Bisht ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by ved kpl
Hi Ved ,
Yes exactly , it should be buf = GST_BUFFER_DATA(buffer->buffer) .
On Wed, Oct 1, 2008 at 12:11 PM, ved kpl <[hidden email]> wrote: Hi -- Regards, Sudarshan Bisht ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |