简体   繁体   English

Gstreamer管道中的时间戳记

[英]Timestamping in Gstreamer pipeline

I have created a gstreamer pipeline with my appsrc; 我用我的appsrc创建了一个gstreamer管道; the pipeline is like this 管道是这样的

appsrc name=src ! video/x-h264 ! decodebin ! queue ! autovideosink 

I have written code to run this pipeline; 我已经编写了运行该管道的代码。 I will get h264 frames in my appsrc, and I am pushing it to decodebin. 我将在我的appsrc中获得h264帧,并且将其推入解码器。 I am not receiving any timestamps in my appsrc. 我的appsrc中没有收到任何时间戳。 So I am thinking of feeding timestamps values (such that the fps will be 30fps). 所以我正在考虑提供时间戳值(这样fps将为30fps)。 There are two feilds in the GstBuffer Structure, the timestamp feild and the PTS feild, which one should I set with my timestamp. GstBuffer结构中有两个字段, timestamp字段和PTS字段,我应该在时间戳中设置一个。 And on reference to which clock the render and decoder will check these timestamps ? 并参考渲染器和解码器将检查这些时间戳的时钟?

Currently wht I am doing is creating a baseclock reference from system time, and with respect to that time I am incrementing my timestamps, and it is not working, If I set only the duration feild it plays fine, But I want to implement the timestamp logic so that the decoder can drop some frames if some comes late.. I have very little knowledge about timestamping, so I want to know more about timestamping 目前,我正在从系统时间创建一个基准时钟参考,并且相对于该时间,我正在增加时间戳,并且它不起作用。如果仅设置持续时间,它将很好,但是我想实现时间戳逻辑,以便解码器可以在某些帧迟到时丢弃某些帧。.我对时间戳的了解很少,所以我想了解更多关于时间戳的信息

Are you using GST 1.0or GST 0.10? 您使用的是GST 1.0还是GST 0.10? There is no "timestamp" that is exposed in GST 1.0, whereas in 0.10 there aren't PTS/DTS. GST 1.0中没有公开的“时间戳”,而在0.10中没有PTS / DTS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM