store audio/video into circular buffer

Chris Whittenburg whittenburg at gmail.com
Fri Nov 9 09:05:21 PST 2012


I did this on an omap3730.  I used a queue feeding a valve.

On startup, the queue had it's min-threshold-time set to 30 seconds, and
the valve was set to drop=true.  Thus, 30 seconds of video would build up
in the queue before it would start sending video downstream to the valve.
The valve would just throw everything away.

When I got the signal to start recording, I would set the value to
drop=false, and the min-threshold-time of the queue to zero.  The 30
seconds of video in the queue would then flow on thru to the valve and pass
on to the video codec.  Eventually the system would get entirely caught up,
and be recording live video.

This gave me 30 seconds of pre-event buffer without having to create any
new plugins.

There may be better ways-- I worked this out without any input from anyone,
and I'm not that experienced with gstreamer.

-chris



On Fri, Nov 9, 2012 at 7:43 AM, Randall Scheifele <rjscheif at gmail.com>wrote:

> Hi Damiano,
>
> I am doing a similar thing on the dm368.  I am currently planning on using
> the queue element.  If you read the documentation on the queue element (
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-queue.html)
> you'll see that it has some minimum value properties (buffers/bytes/time).
>  I was planning on setting a minimum value to store enough buffered video
> inside of the queue and installing a buffer probe on the source pad of the
> queue to throw out buffers when I don't want to store them.
>
> If anyone else has a better way of doing this in gstreamer, let me know.
>
> -Randy
>
>
> On Fri, Nov 9, 2012 at 5:39 AM, Damiano Pinarello <
> damiano.pinarello at bticino.it> wrote:
>
>> Hi,
>>
>> I read in a forum that queue can work with live-sources, while queue2
>> can't (right now).
>> But I consider this information old, beacuse the message is dated to
>> 09/2010.
>> Do you have some newest information about it?
>>
>> To better explain my need, I'm working on a IP camera base on dm365 that
>> used
>> gstreamer. The pourpose is this: when an interrupt arrives (for example
>> due to
>> motion detection) I must have a 30 seconds video before it to undestand
>> what
>> have generated the interrupt.
>>
>> I think to do this with a sort of circular buffer before sink element.
>> This new element will continue to store data, and when an interrupt
>> arrives
>> it must reorder the buffer and put the content into a file.
>> After that start to normally send video to sink element.
>>
>> Thanks,
>> Damiano
>>
>> On 15:44 Thu 08 Nov     , Krzysztof Konopko wrote:
>> > Hi Damiano,
>> >
>> > Have you looked at queue2 element? It supports circular buffering in the
>> > file.
>> >
>> > Kris
>> >
>> > On 08/11/12 14:26, Damiano Pinarello wrote:
>> > > Hi,
>> > >
>> > > I need a element that store audio/video into circular buffer, and put
>> > > it in a file
>> > > when a interrupt arrive (maybe from gstreamer bus).
>> > > This element could be seen as a sort of filesink modified, for example
>> > > called "cicbsink".
>> > >
>> > > Which is the right way to problems? Someone have already tryed to
>> > > solve the same need?
>> > > The right way could be to create a new plugin? Or add this new element
>> > > to gstreamer core?
>> > >
>> > > Thanks,
>> > > Damiano
>> > >
>> >
>> > _______________________________________________
>> > gstreamer-devel mailing list
>> > gstreamer-devel at lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>> --
>>
>> ***** Email confidentiality notice *****
>> This message and attachment are confidential and they also are legally
>> privileged in accordance with the NDA.
>> If you have received this message in error, please notify us and remove
>> it from your system.
>>
>> --
>>
>> Damiano PINARELLO
>> Embedded Software Developer
>> Office Phone: +(39) 031 653679 Ext. 4679
>> FAX phone: +(39) 031 653283
>> Street address: Via L. Manara 4, 22036 Erba (CO), Italy
>> Email: damiano.pinarello at bticino.it
>> WebSite: www.bticino.it
>>
>>
>> ------------------------------------------------------------------------------
>>  Please consider your environmental responsibility before printing this
>> Email
>>
>> ------------------------------------------------------------------------------
>> This message is confidential. It may also be privileged or otherwise
>> protected
>> by law or legal rules. Should you have received this email by mistake
>> please
>> let us know by reply and then delete it from your system; you should not
>> copy
>> it or disclose its contents to anyone.
>> All messages sent to and from [Enea] may be monitored to ensure compliance
>> with internal policies and to protect our business. Emails are not secure
>> and cannot be guaranteed to be error free as they can be intercepted,
>> amended,
>> lost or destroyed, or contain viruses. Anyone who communicates with us by
>> email
>> is taken to accept these risks.
>>
>> ------------------------------------------------------------------------------
>>
>>
>> Ce message, ainsi que tous les fichiers joints à ce message,
>> peuvent contenir des informations sensibles et/ ou confidentielles
>> ne devant pas être divulguées. Si vous n'êtes pas le destinataire
>> de ce message (ou que vous recevez ce message par erreur), nous
>> vous remercions de le notifier immédiatement à son expéditeur, et
>> de détruire ce message. Toute copie, divulgation, modification,
>> utilisation ou diffusion, non autorisée, directe ou indirecte, de
>> tout ou partie de ce message, est strictement interdite.
>>
>> This e-mail, and any document attached hereby, may contain
>> confidential and/or privileged information. If you are not the
>> intended recipient (or have received this e-mail in error) please
>> notify the sender immediately and destroy this e-mail. Any
>> unauthorized, direct or indirect, copying, disclosure, distribution
>> or other use of the material or parts thereof is strictly
>> forbidden.
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20121109/0a9d9555/attachment.html>


More information about the gstreamer-devel mailing list