[gst-devel] Query regarding usage of GST_BUFFER_DATA

irfanshaikh irfanshaikh at tataelxsi.co.in
Wed Oct 29 16:06:26 CET 2008


Hi all,

         I want to fill the tempbuf bellow after some processing as i have
explained below. Once the tempbuf is full i need to pass its base adres to
another function.
I just wanted to ask can i use 2 buffer poiters such as *data_one and
*data_two
         1. data_one :- For filling tempbuf
         2. data_two :- to send base address of buffer, to some fuction Y.

Please tell me if i can use it this way  and i am correct ...


Whether *data_two is pointing to initial position of data in tempbuf...And
tempbuf is filled properly with help of  *data_one...Can i use *data_one to
pass in function_Y...so as itz serving the purpose


    _chain(GstBuffer buf)
  {
        GstBuffer tmpbuf;
        guint8 *data_one, *data_two;
        tempbuf=gst_buffer_new_and_alloc(300*sizeof(guint8));
        data_one=GST_BUFFER_DATA(tempbuf);

        function_X()
        {
             memcpy(tempbufdata, buf, 100);
             tempbufdata += 100;

             /*Do some processing*/
             memcpy(tempbufdata, buf, 100);

             /*Do some procesing*/
             memcpy(tempbufdata, buf, 100);

            data_two=GST_BUFFER_DATA(tempbuf);

            function_Y(data_two);

        }
  }


Regards,
Irfan


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.




More information about the gstreamer-devel mailing list