Hi all,
How can i find size of output buffer in "ffmux_asf" which is pushed to the sink pad of next element ? Actually i am developin a plugi-in module ASF parser from scratch. So as to parse the ASF file such that i get o/p of ASF parser as only ASF data packets. I want to allocate memmory of i/p buffer which is comming from ASF muxer. So please can some one help regarding this ? Thanks in advance !!!! 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. ------------------------------------------------------------------------- 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 |
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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hello, Yes. GST_BUFFER_SIZE (buffer) at any stage of the pipeline should give you the size of the buffer being passed on to the upstream/downstream elements of the pipeline. It basically points to the size variable of the "buffer" structure. Regards Ankur -----Original Message----- From: Julien Puydt [mailto:[hidden email]] Sent: Monday, October 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel **************** CAUTION - Disclaimer ***************** This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS******** End of Disclaimer ********INFOSYS*** ------------------------------------------------------------------------- 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 Julien PUYDT
Hi Julien, 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi,
Dont confuse events with buffers. Events are some kind of notifications that flow through the elements in a pipeline. The elements then take the appropriate action if needed or forward it to the next element. Events can flow downstream as well upstream, whereas buffers flow downstream only. I would suggest you understand these differences first before writing a plugin. gst_pad_push_event() pushes events and gst_pad_push() pushes buffers. Ved On Tue, Oct 21, 2008 at 1:58 PM, Irfan Shaikh <[hidden email]> 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:[hidden email]] > 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 > [hidden email] > 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 > [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 Irfan Shaikh-2
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 <[hidden email]> wrote:
-- 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 |
-----Original Message----- 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
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 <[hidden email]> wrote:
-- 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 |
Hi sudarshan, 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi Irfan ,
I think here no need to use circular buffer , because the buffer which u receive in ur plugin , u have to unref that after properly copying required buffer from that . And the buffer which ul allocate in your plugin will be sent u next element thus will be unref by the next element .
I am writing a piece of code , may give u some hint :-
asf_parser_plugin_chain(GstPad pad, GstBuffer *buffer)
{
gint packet_size=0;
GstBuffer *my_buffer=NULL;
packet_size = parse_buffer(GST_BUFFER_DATA(buffer) ); // get the packet size
my_buffer=gst_buffer_new_and_alloc ( packet_size );
memcpy(GST_BUFFER_DATA( my_buffer), GST_BUFFER_DATA(buffer), packet_size ); // can use other APIs also provided by GstBuffer (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html)
gst_pad_push(sinkpad, my_buffer);
gst_buffer_unref(buffer) ; // check if u have copied all the data
return GST_FLOW_OK ;
}
On Tue, Oct 21, 2008 at 5:13 PM, Irfan Shaikh <[hidden email]> wrote:
-- 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 |
Thanks a lot Sudarshan.... 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi Irfan ,
U r right data is pushed on src pad .
On Tue, Oct 21, 2008 at 6:58 PM, Irfan Shaikh <[hidden email]> wrote:
-- 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 |
Hi sudarshan, I have completed the asfparser plug-in code now itz working fine as per requirrement :-) I am only facing a small problem. I want to convey to next Plug-in element. Whether ASF data packet i m sending to next element consists of Key frame or no ? For conveying this information i have thought of using following field of GstBuffer. guint64 offset; I would either SET it or RESET it while pushing the data gst_pad_push(asfparse->srcpad, outputbuf) Is there any other convinent{feasible} way of conveying the above information to next plug-in element {Is there some macro or Some flag that i can use using GstBuffer before pushing outputbuf} So as to convey to next element whether the outputbuf {consisting ASF data packet} has a KEY frame or no ?? Regards, Irfan -----Original Message----- From: sudarshan bisht [mailto:[hidden email]] Sent: Thu 11/6/2008 10:55 AM To: Discussion of the development of GStreamer Subject: Re: [gst-devel] Size of output buffer Hi Irfan , U r right data is pushed on src pad . On Tue, Oct 21, 2008 at 6:58 PM, Irfan Shaikh <[hidden email]>wrote: > > Thanks a lot Sudarshan.... > > The sample code which you have send is really helping me a lot. > > If i am not wrong, I think-------- gst_pad_push(sinkpad, my_buffer) should > be like------ gst_pad_push(asfparse->srcpad, my_buffer). > > Am i corrrect ? > > Thanks a lot for your help and support, > Regards, > Irfan > > > > -----Original Message----- > From: sudarshan bisht [mailto:[hidden email]<[hidden email]> > ] > Sent: Tue 10/21/2008 6:44 PM > To: Discussion of the development of GStreamer > Subject: Re: [gst-devel] Size of output buffer > > Hi Irfan , > > I think here no need to use circular buffer , because the buffer > which u receive in ur plugin , u have to unref that after properly copying > required buffer from that . And the buffer which ul allocate in your > plugin > will be sent u next element thus will be unref by the next element . > > I am writing a piece of code , may give u some hint :- > > asf_parser_plugin_chain(GstPad pad, GstBuffer *buffer) > { > > gint packet_size=0; > GstBuffer *my_buffer=NULL; > > packet_size = parse_buffer(GST_BUFFER_DATA(buffer) ); // get > the packet size > > my_buffer=gst_buffer_new_and_alloc ( packet_size ); > > > memcpy(GST_BUFFER_DATA( my_buffer), GST_BUFFER_DATA(buffer), packet_size > ); // can use other APIs also provided by GstBuffer ( > > http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html > ) > > gst_pad_push(sinkpad, my_buffer); > > gst_buffer_unref(buffer) ; // check if u have copied all the data > > return GST_FLOW_OK ; > } > > > > > > > > > > > On Tue, Oct 21, 2008 at 5:13 PM, Irfan Shaikh > <[hidden email]>wrote: > > > Hi sudarshan, > > > > Thanks a lot for your reply. I am pretty clear now. > > > > Earlier i had decided some other appoach as follows: > > SO now i think i should not use A circular buffer, directly i > can > > use the existing Gstreamer buffer ritee ?? > > > > Thanks for your reply. > > > > Regarding my query : > > 1)I have written an ASF parser code which reads an ASF file from a > > file location path. > > 2)It uses fseek and fread to read the data from file in a temperory > > buffer > > 3)It uses the temporary buffer to parse the ASf headers > > 4)Lastly collect the ASF data packets after parsing the headers > into > > another temperory bufffer (tempbuf). > > 5) When i make ASF parser as gstreamer plugin, i will use > > gst_pad_push (asfparse->srcpad, tempbuf); > > > > I am clear about the output interface when i make the ASF parser as > > gstreamer plug-in. > > > > Actual scenario: > > > > 1) Input module to ASF parser plug-in is output from "ffmux_asf" > > which will be in form of data buffers. > > 2) I will need some buffer to collect these data buffers > > 3) I thought of having a "Circular buffer" to take input from > > ffmux_asf.{Is it feasible to use a normal buffer like uint8_t *Newbuf to > > collect > > data buffers from ffmux_asf ?? {If YES. How much memory should i > > allocate for NewBuf}} > > 4) Since my application is related to Live Streaming the buffer > > NewBuf size can be huge. > > 5) Circular buffer would have been useful.Since i will free the > > memory as soon as i read the Circular buffer. > > 6) I can use pointer operations similar to file operations > > > > In gstreamer i have GstBuffer *buf, If i use circular buffer how can i > use > > the existing "buf". > > > > Regards, > > Irfan. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > From: sudarshan bisht [mailto:[hidden email]<[hidden email]> > <[hidden email]> > > ] > > Sent: Tue 10/21/2008 4:53 PM > > To: Discussion of the development of GStreamer > > Subject: Re: [gst-devel] Size of output buffer > > > > 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 > > <[hidden email]>wrote: > > > > > > > > > > > > > > -----Original Message----- > > > From: sudarshan bisht [mailto:[hidden email]<[hidden email]> > <[hidden email]> > > <[hidden email]> > > > ] > > > 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 > > > <[hidden email]>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:[hidden email] <[hidden email]> < > [hidden email]> < > > [hidden email]> < > > > [hidden email]>] > > > > 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 > > > > [hidden email] > > > > 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 > > > > [hidden email] > > > > 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 > > > [hidden email] > > > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > > > > > > > > > > > > -- > > Regards, > > > > Sudarshan Bisht > > > > 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 > > [hidden email] > > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > > > > > > > -- > Regards, > > Sudarshan Bisht > > 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 > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > > -- Regards, Sudarshan Bisht 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel winmail.dat (11K) Download Attachment |
Hi Irfan ,
Yes this can be done in better way . Use gst_caps_new_simple () to set the flag for key frame . You can see how asfdemux sends extradata to decoder .( see gstasfdemux.c file ) ,
Once you do this , you can receive the same data in decoder or next element . So in order to receive this information next element has to register funtion using gst_pad_set_setcaps_function( ) ( just check some decode's code which gets frame height and width from demuxer in this manner ) .
On Thu, Nov 6, 2008 at 11:23 AM, Irfan Shaikh <[hidden email]> wrote:
-- 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 Irfan Shaikh-2
Hi All, 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi,
On Thu, Nov 6, 2008 at 9:47 AM, Irfan Shaikh <[hidden email]> wrote: > > > Hi All, > > I have completed the asfparser plug-in code now itz working fine as > per requirrement :-) > > I am only facing a small problem. I want to convey to next Plug-in element. > Whether ASF data packet i m sending to next element consists of Key frame or > no ? > > > For conveying this information i have thought of using following field of > GstBuffer. > guint64 offset; > I would either SET it or RESET it while pushing the data > gst_pad_push(asfparse->srcpad, outputbuf) > > > Is there any other convinent{feasible} way of conveying the above > information to next plug-in element {Is there some macro or Some flag that i > can use using GstBuffer before pushing outputbuf} > So as to convey to next element whether the outputbuf {consisting ASF data > packet} has a KEY frame or no ?? There is a GST_BUFFER_FLAG_DELTA_UNIT flag you should set when there is no keyframe in the buffer. Gr, Thijs > Regards, > Irfan > > > -----Original Message----- > From: sudarshan bisht [mailto:[hidden email]] > Sent: Thu 11/6/2008 10:55 AM > To: Discussion of the development of GStreamer > Subject: Re: [gst-devel] Size of output buffer > > Hi Irfan , > U r right data is pushed on src pad . > > On Tue, Oct 21, 2008 at 6:58 PM, Irfan Shaikh > <[hidden email]>wrote: > >> >> Thanks a lot Sudarshan.... >> >> The sample code which you have send is really helping me a lot. >> >> If i am not wrong, I think-------- gst_pad_push(sinkpad, my_buffer) should >> be like------ gst_pad_push(asfparse->srcpad, my_buffer). >> >> Am i corrrect ? >> >> Thanks a lot for your help and support, >> Regards, >> Irfan >> >> >> >> -----Original Message----- >> From: sudarshan bisht >> [mailto:[hidden email]<[hidden email]> >> ] >> Sent: Tue 10/21/2008 6:44 PM >> To: Discussion of the development of GStreamer >> Subject: Re: [gst-devel] Size of output buffer >> >> Hi Irfan , >> >> I think here no need to use circular buffer , because the buffer >> which u receive in ur plugin , u have to unref that after properly copying >> required buffer from that . And the buffer which ul allocate in your >> plugin >> will be sent u next element thus will be unref by the next element . >> >> I am writing a piece of code , may give u some hint :- >> >> asf_parser_plugin_chain(GstPad pad, GstBuffer *buffer) >> { >> >> gint packet_size=0; >> GstBuffer *my_buffer=NULL; >> >> packet_size = parse_buffer(GST_BUFFER_DATA(buffer) ); // get >> the packet size >> >> my_buffer=gst_buffer_new_and_alloc ( packet_size ); >> >> >> memcpy(GST_BUFFER_DATA( my_buffer), GST_BUFFER_DATA(buffer), >> packet_size >> ); // can use other APIs also provided by GstBuffer ( >> >> >> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html >> ) >> >> gst_pad_push(sinkpad, my_buffer); >> >> gst_buffer_unref(buffer) ; // check if u have copied all the data >> >> return GST_FLOW_OK ; >> } >> >> >> >> >> >> >> >> >> >> >> On Tue, Oct 21, 2008 at 5:13 PM, Irfan Shaikh >> <[hidden email]>wrote: >> >> > Hi sudarshan, >> > >> > Thanks a lot for your reply. I am pretty clear now. >> > >> > Earlier i had decided some other appoach as follows: >> > SO now i think i should not use A circular buffer, directly i >> can >> > use the existing Gstreamer buffer ritee ?? >> > >> > Thanks for your reply. >> > >> > Regarding my query : >> > 1)I have written an ASF parser code which reads an ASF file from a >> > file location path. >> > 2)It uses fseek and fread to read the data from file in a >> > temperory >> > buffer >> > 3)It uses the temporary buffer to parse the ASf headers >> > 4)Lastly collect the ASF data packets after parsing the headers >> into >> > another temperory bufffer (tempbuf). >> > 5) When i make ASF parser as gstreamer plugin, i will use >> > gst_pad_push (asfparse->srcpad, tempbuf); >> > >> > I am clear about the output interface when i make the ASF parser as >> > gstreamer plug-in. >> > >> > Actual scenario: >> > >> > 1) Input module to ASF parser plug-in is output from "ffmux_asf" >> > which will be in form of data buffers. >> > 2) I will need some buffer to collect these data buffers >> > 3) I thought of having a "Circular buffer" to take input from >> > ffmux_asf.{Is it feasible to use a normal buffer like uint8_t *Newbuf to >> > collect >> > data buffers from ffmux_asf ?? {If YES. How much memory should >> > i >> > allocate for NewBuf}} >> > 4) Since my application is related to Live Streaming the buffer >> > NewBuf size can be huge. >> > 5) Circular buffer would have been useful.Since i will free the >> > memory as soon as i read the Circular buffer. >> > 6) I can use pointer operations similar to file operations >> > >> > In gstreamer i have GstBuffer *buf, If i use circular buffer how can i >> use >> > the existing "buf". >> > >> > Regards, >> > Irfan. >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > -----Original Message----- >> > From: sudarshan bisht >> [mailto:[hidden email]<[hidden email]> >> <[hidden email]> >> > ] >> > Sent: Tue 10/21/2008 4:53 PM >> > To: Discussion of the development of GStreamer >> > Subject: Re: [gst-devel] Size of output buffer >> > >> > 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 >> > <[hidden email]>wrote: >> > >> > > >> > > >> > > >> > > -----Original Message----- >> > > From: sudarshan bisht >> > [mailto:[hidden email]<[hidden email]> >> <[hidden email]> >> > <[hidden email]> >> > > ] >> > > 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 >> > > <[hidden email]>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:[hidden email] <[hidden email]> < >> [hidden email]> < >> > [hidden email]> < >> > > [hidden email]>] >> > > > 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 >> > > > [hidden email] >> > > > 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 >> > > > [hidden email] >> > > > 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 >> > > [hidden email] >> > > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel >> > > >> > > >> > >> > >> > -- >> > Regards, >> > >> > Sudarshan Bisht >> > >> > 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 >> > [hidden email] >> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel >> > >> > >> >> >> -- >> Regards, >> >> Sudarshan Bisht >> >> 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 >> [hidden email] >> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel >> >> > > > -- > Regards, > > Sudarshan Bisht > > > > > > 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 > [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, 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi,
On Thu, Nov 6, 2008 at 12:33 PM, Irfan Shaikh <[hidden email]> wrote: > > Hi, > > Do you mean 2 say i can use as following > > In gstasfparser.c {Plug-in code developed by me} > > if (key_frame) { > GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT); > } No, you need to set it when there is a delta frame (not a keyframe). > > How does the next plug-in element Access this MACRO, so as to know if the > FLAG is SET or RESET ? with GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_DELTA_UNIT) if there was a delta unit Gr, Thijs you can check with > In gstasfparse.c {Next plug-in module (Under development)} > > > Regards, > Irfan > > > > > > -----Original Message----- > From: Thijs Vermeir [mailto:[hidden email]] > Sent: Thu 11/6/2008 2:31 PM > To: Discussion of the development of GStreamer > Subject: Re: [gst-devel] Is there any way to set FLAG in GstBuffer? > > Hi, > > On Thu, Nov 6, 2008 at 9:47 AM, Irfan Shaikh > <[hidden email]> wrote: >> >> >> Hi All, >> >> I have completed the asfparser plug-in code now itz working fine as >> per requirrement :-) >> >> I am only facing a small problem. I want to convey to next Plug-in >> element. >> Whether ASF data packet i m sending to next element consists of Key frame >> or >> no ? >> >> >> For conveying this information i have thought of using following field of >> GstBuffer. >> guint64 offset; >> I would either SET it or RESET it while pushing the data >> gst_pad_push(asfparse->srcpad, outputbuf) >> >> >> Is there any other convinent{feasible} way of conveying the above >> information to next plug-in element {Is there some macro or Some flag that >> i >> can use using GstBuffer before pushing outputbuf} >> So as to convey to next element whether the outputbuf {consisting ASF data >> packet} has a KEY frame or no ?? > > There is a GST_BUFFER_FLAG_DELTA_UNIT flag you should set when there > is no keyframe in the buffer. > > Gr, > Thijs > >> Regards, >> Irfan >> >> >> -----Original Message----- >> From: sudarshan bisht [mailto:[hidden email]] >> Sent: Thu 11/6/2008 10:55 AM >> To: Discussion of the development of GStreamer >> Subject: Re: [gst-devel] Size of output buffer >> >> Hi Irfan , >> U r right data is pushed on src pad . >> >> On Tue, Oct 21, 2008 at 6:58 PM, Irfan Shaikh >> <[hidden email]>wrote: >> >>> >>> Thanks a lot Sudarshan.... >>> >>> The sample code which you have send is really helping me a lot. >>> >>> If i am not wrong, I think-------- gst_pad_push(sinkpad, my_buffer) >>> should >>> be like------ gst_pad_push(asfparse->srcpad, my_buffer). >>> >>> Am i corrrect ? >>> >>> Thanks a lot for your help and support, >>> Regards, >>> Irfan >>> >>> >>> >>> -----Original Message----- >>> From: sudarshan bisht >>> [mailto:[hidden email]<[hidden email]> >>> ] >>> Sent: Tue 10/21/2008 6:44 PM >>> To: Discussion of the development of GStreamer >>> Subject: Re: [gst-devel] Size of output buffer >>> >>> Hi Irfan , >>> >>> I think here no need to use circular buffer , because the >>> buffer >>> which u receive in ur plugin , u have to unref that after properly >>> copying >>> required buffer from that . And the buffer which ul allocate in your >>> plugin >>> will be sent u next element thus will be unref by the next element . >>> >>> I am writing a piece of code , may give u some hint :- >>> >>> asf_parser_plugin_chain(GstPad pad, GstBuffer *buffer) >>> { >>> >>> gint packet_size=0; >>> GstBuffer *my_buffer=NULL; >>> >>> packet_size = parse_buffer(GST_BUFFER_DATA(buffer) ); // get >>> the packet size >>> >>> my_buffer=gst_buffer_new_and_alloc ( packet_size ); >>> >>> >>> memcpy(GST_BUFFER_DATA( my_buffer), GST_BUFFER_DATA(buffer), >>> packet_size >>> ); // can use other APIs also provided by GstBuffer ( >>> >>> >>> >>> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html >>> ) >>> >>> gst_pad_push(sinkpad, my_buffer); >>> >>> gst_buffer_unref(buffer) ; // check if u have copied all the data >>> >>> return GST_FLOW_OK ; >>> } >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> On Tue, Oct 21, 2008 at 5:13 PM, Irfan Shaikh >>> <[hidden email]>wrote: >>> >>> > Hi sudarshan, >>> > >>> > Thanks a lot for your reply. I am pretty clear now. >>> > >>> > Earlier i had decided some other appoach as follows: >>> > SO now i think i should not use A circular buffer, directly i >>> can >>> > use the existing Gstreamer buffer ritee ?? >>> > >>> > Thanks for your reply. >>> > >>> > Regarding my query : >>> > 1)I have written an ASF parser code which reads an ASF file from >>> > a >>> > file location path. >>> > 2)It uses fseek and fread to read the data from file in a >>> > temperory >>> > buffer >>> > 3)It uses the temporary buffer to parse the ASf headers >>> > 4)Lastly collect the ASF data packets after parsing the headers >>> into >>> > another temperory bufffer (tempbuf). >>> > 5) When i make ASF parser as gstreamer plugin, i will use >>> > gst_pad_push (asfparse->srcpad, tempbuf); >>> > >>> > I am clear about the output interface when i make the ASF parser as >>> > gstreamer plug-in. >>> > >>> > Actual scenario: >>> > >>> > 1) Input module to ASF parser plug-in is output from "ffmux_asf" >>> > which will be in form of data buffers. >>> > 2) I will need some buffer to collect these data buffers >>> > 3) I thought of having a "Circular buffer" to take input from >>> > ffmux_asf.{Is it feasible to use a normal buffer like uint8_t *Newbuf >>> > to >>> > collect >>> > data buffers from ffmux_asf ?? {If YES. How much memory should >>> > i >>> > allocate for NewBuf}} >>> > 4) Since my application is related to Live Streaming the buffer >>> > NewBuf size can be huge. >>> > 5) Circular buffer would have been useful.Since i will free the >>> > memory as soon as i read the Circular buffer. >>> > 6) I can use pointer operations similar to file operations >>> > >>> > In gstreamer i have GstBuffer *buf, If i use circular buffer how can i >>> use >>> > the existing "buf". >>> > >>> > Regards, >>> > Irfan. >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > -----Original Message----- >>> > From: sudarshan bisht >>> [mailto:[hidden email]<[hidden email]> >>> <[hidden email]> >>> > ] >>> > Sent: Tue 10/21/2008 4:53 PM >>> > To: Discussion of the development of GStreamer >>> > Subject: Re: [gst-devel] Size of output buffer >>> > >>> > 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 >>> > <[hidden email]>wrote: >>> > >>> > > >>> > > >>> > > >>> > > -----Original Message----- >>> > > From: sudarshan bisht >>> > [mailto:[hidden email]<[hidden email]> >>> <[hidden email]> >>> > <[hidden email]> >>> > > ] >>> > > 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 >>> > > <[hidden email]>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:[hidden email] <[hidden email]> < >>> [hidden email]> < >>> > [hidden email]> < >>> > > [hidden email]>] >>> > > > 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 >>> > > > [hidden email] >>> > > > 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 >>> > > > [hidden email] >>> > > > 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 >>> > > [hidden email] >>> > > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel >>> > > >>> > > >>> > >>> > >>> > -- >>> > Regards, >>> > >>> > Sudarshan Bisht >>> > >>> > 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 >>> > [hidden email] >>> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel >>> > >>> > >>> >>> >>> -- >>> Regards, >>> >>> Sudarshan Bisht >>> >>> 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 >>> [hidden email] >>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel >>> >>> >> >> >> -- >> Regards, >> >> Sudarshan Bisht >> >> >> >> >> >> 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 >> [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 > > 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 > [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 Sudarshan Bisht
Hi
Sudarshan,
I was
not able to do changes as you suggested to me. Instead i tried the
following. Since i just needed a flag or something which my next plug-in element
should recognize i used following.
for(m=0; m<pkt->payload_count; m++)
{ if(pkt->payloads[m].key_frame == 1) { g_print("Inside IF\n"); GST_BUFFER_OFFSET(outputbuf) = 1; /*Segmentation fault*/ GST_BUFFER_FLAG_SET (outputbuf, GST_BUFFER_FLAG_DELTA_UNIT); /*Segmentation fault*/ GST_BUFFER_DURATION(outputbuf)=(GstClockTime)1; /*Segmentation fault*/ /* At RTP ASF payloader check using... GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_DELTA_UNIT); */ g_print("In Packet Payload %d consists of KEY FRAME\n", m); } } I am
not able to use any of the macros, if i use them i get a segmentation fault. How
shall i avoid Segmentation fault.
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. ------------------------------------------------------------------------- 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 Irfan
Did u check outputbuf is allocated properly as a GstBuffer ?
On Thu, Nov 6, 2008 at 9:02 PM, irfanshaikh <[hidden email]> wrote:
-- 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 |