[gst-devel] Size of output buffer

sudarshan bisht bisht.sudarshan at gmail.com
Tue Oct 21 13:23:23 CEST 2008


HI Irfan ,
              You are trying to write a ASF Parser plugin which will be used
after ffmux_asf in pipeline .
 Now you want to parse data packets and send them to next element .

   The buffer you get from ffmux_asf is already allocated so you dont need
to allocated a separate buffer for that .
   To know the size of input buffer in your ASF Parser plugin you can use
GST_BUFFER_SIZE(buffer) .
     So now you have to parse data part of this buffer , because data part
of the buffer have the actual data .
     For your outgoing packets allocate one more GstBuffer and copy the
required number of bytes of data from received buffer to this buffer and
push this buffer to next element.

 You can use adapter APIs also to make it simpler . Read GstBuffer APIs
thoroughly for good practice.



On Tue, Oct 21, 2008 at 3:59 PM, Irfan Shaikh
<irfanshaikh at tataelxsi.co.in>wrote:

>
>
>
>  -----Original Message-----
> From: sudarshan bisht [mailto:bisht.sudarshan at gmail.com<bisht.sudarshan at gmail.com>
> ]
> Sent: Tue 10/21/2008 2:25 PM
> To: Discussion of the development of GStreamer
> Subject: Re: [gst-devel] Size of output buffer
>
>  Hi
>
>  "gst_pad_push_event" function pushes only events ( EOS , new segment etc )
> not buffer , in order to push buffer use "gst_pad_push"  api .
>
> On Tue, Oct 21, 2008 at 1:58 PM, Irfan Shaikh
> <irfanshaikh at tataelxsi.co.in>wrote:
>
> >
> > Hi Julien,
> >
> >      Thanks for your reply..
> >
> >      For ffmux_asf plug-in in gstffmpegmux.c.
> >
> >      Is "gst_pad_push_event" is the fuction which pushes the buffer which
> > has ASF data into sink pad of next elemnt ?
> >      i.e. gst_pad_push_event (ffmpegmux->srcpad, gst_event_new_eos ());
> > When i checked the sise of buffer its variable in size.
> >
> >
> >       I need to allocate buffer for the next module to "ffmux_asf". Which
> > is an asf parse. i need to allocate buffer in asf parser plugin. I wanted
> to
> > know what size of buffer should i allocate for ASF parser plug-in to take
> > i/p from ffmux_asf
> >
> > I checked the buffer size in ffmux_asf in gst_ffmpegmux_collected
> > (GstCollectPads * pads, gpointer user_data)
> >
> > But it shows variable part. Tell me whether i am right ??
> >
> > Size of buf:5757
> > Size of buf:7134
> > Size of buf:6927
> > Size of buf:5670
> > Size of buf:4989
> > Size of buf:4004
> > Size of buf:3615
> > Size of buf:3188
> > Size of buf:3022
> > Size of buf:2703
> >
> > Thanks and regards,
> > Irfan
> >
> >
> >
> > -----Original Message-----
>  > From: Julien Puydt [mailto:jpuydt at free.fr <jpuydt at free.fr> <
> jpuydt at free.fr>]
> > Sent: Mon 10/20/2008 3:29 PM
> > To: Discussion of the development of GStreamer
> > Subject: Re: [gst-devel] Size of output buffer
> >
> > irfanshaikh a écrit :
> > >         How can i find size of output buffer in "ffmux_asf" which is
> > pushed
> > > to the sink pad of next element ?
> >
> > GST_BUFFER_SIZE (buffer) ?
> >
> > Snark on #gstreamer
> >
> > -------------------------------------------------------------------------
> > 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
> > gstreamer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >
> >  This message (including any attachment) is confidential and may be
> > legally privileged. Access to this message by anyone other than the
> intended
> > recipient(s) listed above is unauthorized. If you are not the intended
> > recipient you are hereby notified that any disclosure, copying, or
> > distribution of the message, or any action taken or omission of action by
> > you in reliance upon it, is prohibited and may be unlawful. Please
> > immediately notify the sender by reply e-mail and permanently delete all
> > copies of the message if you have received this message in error.
> >
> > -------------------------------------------------------------------------
> > 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
> > gstreamer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >
> >
>
>
> --
> Regards,
>
> Sudarshan Bisht
>
>
> Hi sudarshan/Ved,
>
>       In gstffmpegmux.c {gst-ffmpeg-0.10.5/ext/ffmpeg} i do not see any
> "gst_pad_push" function.
>
> I understand we need a function something like "gst_pad_push
> (asfmux->srcpad, buf)", so as to push the buffer to the sink pad of next
> module.
>
> But i do not find any such api in gstffmpegmux.c.
>
> So i am unable to find the size of output buffer which is send to the next
> module.So i got confused with "gst_pad_push_event"
>
> Please can you help me regarding this issue.
>
> I need all this information to allocate buffer size for my module "ASF
> parser" which is built from scratch in C. rite know i am reading from file.
>
> I need to do same processing in ASF parser when i use ffmux_asf as input
> module for ASF parser.
>
> Please help me regarding this.
>
>
> Regards,
> Irfan
>
>  This message (including any attachment) is confidential and may be
> legally privileged. Access to this message by anyone other than the intended
> recipient(s) listed above is unauthorized. If you are not the intended
> recipient you are hereby notified that any disclosure, copying, or
> distribution of the message, or any action taken or omission of action by
> you in reliance upon it, is prohibited and may be unlawful. Please
> immediately notify the sender by reply e-mail and permanently delete all
> copies of the message if you have received this message in error.
>
> -------------------------------------------------------------------------
> 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
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>


-- 
Regards,

Sudarshan Bisht
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081021/bf63ffaf/attachment.htm>


More information about the gstreamer-devel mailing list