AW: Regarding preevent
Thornton, Keith
keith.thornton at zeiss.com
Mon Mar 17 04:55:22 PDT 2014
I did something similar with a queue and a valve. In c it looked like this
m_delayQueue = gst_element_factory_make("queue", "DelayQueue");
gst_object_ref(GST_OBJECT(m_delayQueue));
g_object_set(G_OBJECT(m_delayQueue), "min-threshold-buffers", 30, (char *)NULL);
g_object_set(G_OBJECT(m_delayQueue), "min-threshold-bytes", 0, (char *)NULL);
g_object_set(G_OBJECT(m_delayQueue), "min-threshold-time", (gint64)0, (char *)NULL);
g_object_set(G_OBJECT(m_delayQueue), "max-size-buffers", 31, (char *)NULL);
g_object_set(G_OBJECT(m_delayQueue), "max-size-bytes", 0, (char *)NULL);
g_object_set(G_OBJECT(m_delayQueue), "max-size-time", (gint64)0, (char *)NULL);
m_delayValve = gst_element_factory_make("valve", "DelayValve");
gst_object_ref(GST_OBJECT(m_delayValve));
g_object_set(G_OBJECT(m_delayValve), "drop", TRUE, (char *)NULL);
initially I stored 30 seconds of video (30 GOPS) and then started to drop the oldest.
I then switched it into athe file by re-configuring the following
g_object_set(G_OBJECT(m_delayValve), "drop", FALSE, (char *)NULL);
g_object_set(G_OBJECT(m_delayQueue), "min-threshold-buffers", 0, (char *)NULL);
-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] Im Auftrag von Shilpa Chandrappa
Gesendet: Montag, 17. März 2014 12:34
An: gstreamer-devel at lists.freedesktop.org
Betreff: Regarding preevent
Hi,
Is it possible to implement circluar buffer in gstreamer to store 60 seconds video data continuously. During an event trigger I need to prepend the circular buffer data with the incoming video data and store in a file.
I saw a thread which mentions using 'queue' we can achieve this. So I tried below approach.
gst_parse_launch ("rtspsrc location=rtsp://172.22.75.2/live.sdp name=rtsp !
*queue min-threshold-time=60000000000 name=que12 ! valve drop=true
name=val12* ! rtph264depay ! video/x-h264, width=1920, height=1080,
framerate=30/1 ! avimux name=avi ! filesink location=*rtsp.avi*", &error);
During an event trigger I am setting the below properties.
g_object_set (G_OBJECT (val2), "drop",false, NULL); g_object_set (G_OBJECT (que2), "min-threshold-time",(gint64)0, NULL);
With this approach I am *not able* to see creation of preevent video of
60seconds(prepended) in the recorded file rtsp.avi.
Is there anything which I am missing ?
I request you to provide inputs on how to achieve this.
Regards,
Shilpa
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Regarding-preevent-tp4665983.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
---------------
This message is intended for a particular addressee only and may contain business or company secrets.
If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted.
More information about the gstreamer-devel
mailing list