<div>Hi Irfan ,</div>
<div> U r right data is pushed on src pad . <br><br></div>
<div class="gmail_quote">On Tue, Oct 21, 2008 at 6:58 PM, Irfan Shaikh <span dir="ltr"><<a href="mailto:irfanshaikh@tataelxsi.co.in">irfanshaikh@tataelxsi.co.in</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div><br>
<p><font size="2">Thanks a lot Sudarshan....<br><br>The sample code which you have send is really helping me a lot.<br><br>If i am not wrong, I think-------- gst_pad_push(sinkpad, my_buffer) should be like------ gst_pad_push(asfparse->srcpad, my_buffer).<br>
<br>Am i corrrect ?<br><br>Thanks a lot for your help and support,
<div class="Ih2E3d"><br>Regards,<br>Irfan<br><br><br><br>-----Original Message-----<br>From: sudarshan bisht [<a href="mailto:bisht.sudarshan@gmail.com" target="_blank">mailto:bisht.sudarshan@gmail.com</a>]<br></div>
<div class="Ih2E3d">Sent: Tue 10/21/2008 6:44 PM<br>To: Discussion of the development of GStreamer<br>Subject: Re: [gst-devel] Size of output buffer<br><br></div>
<div>
<div></div>
<div class="Wj3C7c">Hi Irfan ,<br><br> I think here no need to use circular buffer , because the buffer<br>which u receive in ur plugin , u have to unref that after properly copying<br>required buffer from that . And the buffer which ul allocate in your plugin<br>
will be sent u next element thus will be unref by the next element .<br><br> I am writing a piece of code , may give u some hint :-<br><br> asf_parser_plugin_chain(GstPad pad, GstBuffer *buffer)<br> {<br><br> gint packet_size=0;<br>
GstBuffer *my_buffer=NULL;<br><br> packet_size = parse_buffer(GST_BUFFER_DATA(buffer) ); // get<br>the packet size<br><br> my_buffer=gst_buffer_new_and_alloc ( packet_size );<br><br><br>memcpy(GST_BUFFER_DATA( my_buffer), GST_BUFFER_DATA(buffer), packet_size<br>
); // can use other APIs also provided by GstBuffer (<br><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html" target="_blank">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html</a><br>
)<br><br> gst_pad_push(sinkpad, my_buffer);<br><br> gst_buffer_unref(buffer) ; // check if u have copied all the data<br><br> return GST_FLOW_OK ;<br> }<br><br><br><br><br><br><br><br><br><br><br>
On Tue, Oct 21, 2008 at 5:13 PM, Irfan Shaikh<br><<a href="mailto:irfanshaikh@tataelxsi.co.in" target="_blank">irfanshaikh@tataelxsi.co.in</a>>wrote:<br><br>> Hi sudarshan,<br>><br>> Thanks a lot for your reply. I am pretty clear now.<br>
><br>> Earlier i had decided some other appoach as follows:<br>> SO now i think i should not use A circular buffer, directly i can<br>> use the existing Gstreamer buffer ritee ??<br>><br>> Thanks for your reply.<br>
><br>> Regarding my query :<br>> 1)I have written an ASF parser code which reads an ASF file from a<br>> file location path.<br>> 2)It uses fseek and fread to read the data from file in a temperory<br>
> buffer<br>> 3)It uses the temporary buffer to parse the ASf headers<br>> 4)Lastly collect the ASF data packets after parsing the headers into<br>> another temperory bufffer (tempbuf).<br>> 5) When i make ASF parser as gstreamer plugin, i will use<br>
> gst_pad_push (asfparse->srcpad, tempbuf);<br>><br>> I am clear about the output interface when i make the ASF parser as<br>> gstreamer plug-in.<br>><br>> Actual scenario:<br>><br>> 1) Input module to ASF parser plug-in is output from "ffmux_asf"<br>
> which will be in form of data buffers.<br>> 2) I will need some buffer to collect these data buffers<br>> 3) I thought of having a "Circular buffer" to take input from<br>> ffmux_asf.{Is it feasible to use a normal buffer like uint8_t *Newbuf to<br>
> collect<br>> data buffers from ffmux_asf ?? {If YES. How much memory should i<br>> allocate for NewBuf}}<br>> 4) Since my application is related to Live Streaming the buffer<br>> NewBuf size can be huge.<br>
> 5) Circular buffer would have been useful.Since i will free the<br>> memory as soon as i read the Circular buffer.<br>> 6) I can use pointer operations similar to file operations<br>><br>> In gstreamer i have GstBuffer *buf, If i use circular buffer how can i use<br>
> the existing "buf".<br>><br>> Regards,<br>> Irfan.<br>><br>><br>><br>><br>><br>><br>><br>><br>><br>><br>><br>><br>><br>><br>><br>><br>><br>><br>
><br>><br>> -----Original Message-----<br></div></div>
<div>
<div></div>
<div class="Wj3C7c">> From: sudarshan bisht [<a href="mailto:bisht.sudarshan@gmail.com" target="_blank">mailto:bisht.sudarshan@gmail.com</a><<a href="mailto:bisht.sudarshan@gmail.com" target="_blank">bisht.sudarshan@gmail.com</a>><br>
> ]<br>> Sent: Tue 10/21/2008 4:53 PM<br>> To: Discussion of the development of GStreamer<br>> Subject: Re: [gst-devel] Size of output buffer<br>><br>> HI Irfan ,<br>> You are trying to write a ASF Parser plugin which will be<br>
> used<br>> after ffmux_asf in pipeline .<br>> Now you want to parse data packets and send them to next element .<br>><br>> The buffer you get from ffmux_asf is already allocated so you dont need<br>> to allocated a separate buffer for that .<br>
> To know the size of input buffer in your ASF Parser plugin you can use<br>> GST_BUFFER_SIZE(buffer) .<br>> So now you have to parse data part of this buffer , because data part<br>> of the buffer have the actual data .<br>
> For your outgoing packets allocate one more GstBuffer and copy the<br>> required number of bytes of data from received buffer to this buffer and<br>> push this buffer to next element.<br>><br>> You can use adapter APIs also to make it simpler . Read GstBuffer APIs<br>
> thoroughly for good practice.<br>><br>><br>><br>> On Tue, Oct 21, 2008 at 3:59 PM, Irfan Shaikh<br>> <<a href="mailto:irfanshaikh@tataelxsi.co.in" target="_blank">irfanshaikh@tataelxsi.co.in</a>>wrote:<br>
><br>> ><br>> ><br>> ><br>> > -----Original Message-----<br>> > From: sudarshan bisht [<a href="mailto:bisht.sudarshan@gmail.com" target="_blank">mailto:bisht.sudarshan@gmail.com</a><<a href="mailto:bisht.sudarshan@gmail.com" target="_blank">bisht.sudarshan@gmail.com</a>><br>
> <<a href="mailto:bisht.sudarshan@gmail.com" target="_blank">bisht.sudarshan@gmail.com</a>><br>> > ]<br>> > Sent: Tue 10/21/2008 2:25 PM<br>> > To: Discussion of the development of GStreamer<br>
> > Subject: Re: [gst-devel] Size of output buffer<br>> ><br>> > Hi<br>> ><br>> > "gst_pad_push_event" function pushes only events ( EOS , new segment etc<br>> )<br>> > not buffer , in order to push buffer use "gst_pad_push" api .<br>
> ><br>> > On Tue, Oct 21, 2008 at 1:58 PM, Irfan Shaikh<br>> > <<a href="mailto:irfanshaikh@tataelxsi.co.in" target="_blank">irfanshaikh@tataelxsi.co.in</a>>wrote:<br>> ><br>> > ><br>
> > > Hi Julien,<br>> > ><br>> > > Thanks for your reply..<br>> > ><br>> > > For ffmux_asf plug-in in gstffmpegmux.c.<br>> > ><br>> > > Is "gst_pad_push_event" is the fuction which pushes the buffer<br>
> which<br>> > > has ASF data into sink pad of next elemnt ?<br>> > > i.e. gst_pad_push_event (ffmpegmux->srcpad, gst_event_new_eos ());<br>> > > When i checked the sise of buffer its variable in size.<br>
> > ><br>> > ><br>> > > I need to allocate buffer for the next module to "ffmux_asf".<br>> Which<br>> > > is an asf parse. i need to allocate buffer in asf parser plugin. I<br>
> wanted<br>> > to<br>> > > know what size of buffer should i allocate for ASF parser plug-in to<br>> take<br>> > > i/p from ffmux_asf<br>> > ><br>> > > I checked the buffer size in ffmux_asf in gst_ffmpegmux_collected<br>
> > > (GstCollectPads * pads, gpointer user_data)<br>> > ><br>> > > But it shows variable part. Tell me whether i am right ??<br>> > ><br>> > > Size of buf:5757<br>> > > Size of buf:7134<br>
> > > Size of buf:6927<br>> > > Size of buf:5670<br>> > > Size of buf:4989<br>> > > Size of buf:4004<br>> > > Size of buf:3615<br>> > > Size of buf:3188<br>> > > Size of buf:3022<br>
> > > Size of buf:2703<br>> > ><br>> > > Thanks and regards,<br>> > > Irfan<br>> > ><br>> > ><br>> > ><br>> > > -----Original Message-----<br>> > > From: Julien Puydt [<a href="mailto:jpuydt@free.fr" target="_blank">mailto:jpuydt@free.fr</a> <<a href="mailto:jpuydt@free.fr" target="_blank">jpuydt@free.fr</a>> <<br>
> <a href="mailto:jpuydt@free.fr" target="_blank">jpuydt@free.fr</a>> <<br>> > <a href="mailto:jpuydt@free.fr" target="_blank">jpuydt@free.fr</a>>]<br>> > > Sent: Mon 10/20/2008 3:29 PM<br>> > > To: Discussion of the development of GStreamer<br>
> > > Subject: Re: [gst-devel] Size of output buffer<br>> > ><br>> > > irfanshaikh a écrit :<br>> > > > How can i find size of output buffer in "ffmux_asf" which is<br>
> > > pushed<br>> > > > to the sink pad of next element ?<br>> > ><br>> > > GST_BUFFER_SIZE (buffer) ?<br>> > ><br>> > > Snark on #gstreamer<br>> > ><br>> > ><br>
> -------------------------------------------------------------------------<br>> > > This SF.Net email is sponsored by the Moblin Your Move Developer's<br>> > > challenge<br>> > > Build the coolest Linux based applications with Moblin SDK & win great<br>
> > > prizes<br>> > > Grand prize is a trip for two to an Open Source event anywhere in the<br>> > world<br>> > > <a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a><br>
> > > _______________________________________________<br>> > > gstreamer-devel mailing list<br>> > > <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
> > > <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>> > ><br>> > > This message (including any attachment) is confidential and may be<br>
> > > legally privileged. Access to this message by anyone other than the<br>> > intended<br>> > > recipient(s) listed above is unauthorized. If you are not the intended<br>> > > recipient you are hereby notified that any disclosure, copying, or<br>
> > > distribution of the message, or any action taken or omission of action<br>> by<br>> > > you in reliance upon it, is prohibited and may be unlawful. Please<br>> > > immediately notify the sender by reply e-mail and permanently delete<br>
> all<br>> > > copies of the message if you have received this message in error.<br>> > ><br>> > ><br>> -------------------------------------------------------------------------<br>> > > This SF.Net email is sponsored by the Moblin Your Move Developer's<br>
> > > challenge<br>> > > Build the coolest Linux based applications with Moblin SDK & win great<br>> > > prizes<br>> > > Grand prize is a trip for two to an Open Source event anywhere in the<br>
> > world<br>> > > <a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a><br>> > > _______________________________________________<br>
> > > gstreamer-devel mailing list<br>> > > <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>> > > <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
> > ><br>> > ><br>> ><br>> ><br>> > --<br>> > Regards,<br>> ><br>> > Sudarshan Bisht<br>> ><br>> ><br>> > Hi sudarshan/Ved,<br>> ><br>> > In gstffmpegmux.c {gst-ffmpeg-0.10.5/ext/ffmpeg} i do not see any<br>
> > "gst_pad_push" function.<br>> ><br>> > I understand we need a function something like "gst_pad_push<br>> > (asfmux->srcpad, buf)", so as to push the buffer to the sink pad of next<br>
> > module.<br>> ><br>> > But i do not find any such api in gstffmpegmux.c.<br>> ><br>> > So i am unable to find the size of output buffer which is send to the<br>> next<br>> > module.So i got confused with "gst_pad_push_event"<br>
> ><br>> > Please can you help me regarding this issue.<br>> ><br>> > I need all this information to allocate buffer size for my module "ASF<br>> > parser" which is built from scratch in C. rite know i am reading from<br>
> file.<br>> ><br>> > I need to do same processing in ASF parser when i use ffmux_asf as input<br>> > module for ASF parser.<br>> ><br>> > Please help me regarding this.<br>> ><br>> ><br>
> > Regards,<br>> > Irfan<br>> ><br>> > This message (including any attachment) is confidential and may be<br>> > legally privileged. Access to this message by anyone other than the<br>> intended<br>
> > recipient(s) listed above is unauthorized. If you are not the intended<br>> > recipient you are hereby notified that any disclosure, copying, or<br>> > distribution of the message, or any action taken or omission of action by<br>
> > you in reliance upon it, is prohibited and may be unlawful. Please<br>> > immediately notify the sender by reply e-mail and permanently delete all<br>> > copies of the message if you have received this message in error.<br>
> ><br>> > -------------------------------------------------------------------------<br>> > This SF.Net email is sponsored by the Moblin Your Move Developer's<br>> > challenge<br>> > Build the coolest Linux based applications with Moblin SDK & win great<br>
> > prizes<br>> > Grand prize is a trip for two to an Open Source event anywhere in the<br>> world<br>> > <a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a><br>
> > _______________________________________________<br>> > gstreamer-devel mailing list<br>> > <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
> > <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>> ><br>> ><br>><br>><br>> --<br>> Regards,<br>
><br>> Sudarshan Bisht<br>><br>> This message (including any attachment) is confidential and may be<br>> legally privileged. Access to this message by anyone other than the intended<br>> recipient(s) listed above is unauthorized. If you are not the intended<br>
> recipient you are hereby notified that any disclosure, copying, or<br>> distribution of the message, or any action taken or omission of action by<br>> you in reliance upon it, is prohibited and may be unlawful. Please<br>
> immediately notify the sender by reply e-mail and permanently delete all<br>> copies of the message if you have received this message in error.<br>><br>> -------------------------------------------------------------------------<br>
> This SF.Net email is sponsored by the Moblin Your Move Developer's<br>> challenge<br>> Build the coolest Linux based applications with Moblin SDK & win great<br>> prizes<br>> Grand prize is a trip for two to an Open Source event anywhere in the world<br>
> <a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a><br>> _______________________________________________<br>> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
><br>><br><br><br>--<br>Regards,<br><br>Sudarshan Bisht<br><br></div></div></font>
<p></p>
<div>
<div></div>
<div class="Wj3C7c">
<p>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.</p>
</div></div></p></div><br>-------------------------------------------------------------------------<br>This SF.Net email is sponsored by the Moblin Your Move Developer's challenge<br>Build the coolest Linux based applications with Moblin SDK & win great prizes<br>
Grand prize is a trip for two to an Open Source event anywhere in the world<br><a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a><br>
_______________________________________________<br>gstreamer-devel mailing list<br><a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br><br>Sudarshan Bisht<br>