RTP timestamps in AppSink
Frederik
devfrederik at gmail.com
Mon Feb 5 07:58:08 UTC 2018
In my reply to Tim, you can read how the setup of the pipelines are.
Here's the appSink code
static GstFlowReturn on_new_buffer(GstElement* object, gpointer user_data)
{
GstAppSink* app_sink = (GstAppSink*)object;
GstSample* sample = gst_app_sink_pull_sample(app_sink);
if (sample)
{
GstBuffer* buffer = gst_sample_get_buffer(sample);
GstClockTime timestamp = GST_BUFFER_PTS(buffer);
//this timestamp is not the same as the RTP timestamp
GstMapInfo map;
gst_buffer_map(buffer, &map, GST_MAP_READ);
PipeContext* context = (PipeContext*)user_data;
context->PublishAppSink(map.data, map.size, timestamp);
gst_buffer_unmap(buffer, &map);
gst_sample_unref(sample);
}
return GST_FLOW_OK;
}
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list