Example code for muxing klv (meta/x-klv) with mpegtsmux (plugins-bad) and GStreamer 1.8.3

Nicolas Dufresne nicolas at ndufresne.ca
Tue Oct 3 15:52:12 UTC 2017


Le jeudi 28 septembre 2017 à 00:21 +0000, Jean-Sébastien Bilodeau a
écrit :
> Then I added appsrc to the call of gst_bin_add_many: gst_bin_add_many
> (GST_BIN (pipeline), src, appsrc, ....
> 
> What should I check in relation to the PTS buffer? (The buffer PTS
> refers to the timestamp when the buffer content should be presented
> to the user and is not always monotonically increasing.)

For the "received" PTS, you need to also track the segment (if you use
the GstSample, the segment is contained, gst_sample_get_segment ()).
You can then transform the PTS into running-time, using
gst_segment_to_running_time(). This will give you some monotonic time,
that starts from 0, and correlate with the pipeline clock. The Pipeline
base_time (gst_element_get_base_time()) which is available on any
active GstElement matches the clock time at running time 0.

Nicolas


More information about the gstreamer-devel mailing list