How to sync rtspsrc, appsrc and filesink
Yuniesky Vasconcelo
yvasconcelo at gmail.com
Mon Sep 4 21:53:46 UTC 2017
Hi. Thanks in advance.
I want to record a video from an rtsp video camera and at the same time
process the video frame obtained from appsink throught new-sample signal.
Then, in a separate application I read the video and show the information
related to the frames.
I have this pipeline:
rtspsrc location=rtsp://10.0.0.1:554/video.sdp latency=100 ! rtph264depay !
tee name=t
! queue ! vaapidecodebin ! vaapipostproc format=rgba ! appsink
name=appsink t.
! queue ! h264parse ! mp4mux ! filesink sync=false name=filer
location=/home/VideoDB/2017-09-04_16:33:46.mp4
GstFlowReturn GstVideoSourcePrivate::newSample(GstAppSink* sink, gpointer
user_data)
{
....
GstSample* sinkSample =
gst_app_sink_pull_sample(GST_APP_SINK(sink));
if (sinkSample) {
GstBuffer* buffer = gst_sample_get_buffer(sinkSample);
// I need this position to be the same as the recorded video
GstClockTime pos;
gst_element_query_position(self->pipeline(), GST_FORMAT_TIME,
&pos);
...
}
...
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170904/40258d52/attachment.html>
More information about the gstreamer-devel
mailing list