mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
ksvideosrc: don't timestamp buffers for muxed streams
This commit is contained in:
parent
20e5a4a498
commit
1991b5bb6f
3 changed files with 18 additions and 0 deletions
|
@ -1224,3 +1224,11 @@ gst_ks_video_device_cancel_stop (GstKsVideoDevice * self)
|
||||||
|
|
||||||
ResetEvent (priv->cancel_event);
|
ResetEvent (priv->cancel_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gst_ks_video_device_stream_is_muxed (GstKsVideoDevice * self)
|
||||||
|
{
|
||||||
|
GstKsVideoDevicePrivate *priv = GST_KS_VIDEO_DEVICE_GET_PRIVATE (self);
|
||||||
|
|
||||||
|
return priv->is_muxed;
|
||||||
|
}
|
||||||
|
|
|
@ -81,6 +81,8 @@ gboolean gst_ks_video_device_postprocess_frame (GstKsVideoDevice * self, GstBuff
|
||||||
void gst_ks_video_device_cancel (GstKsVideoDevice * self);
|
void gst_ks_video_device_cancel (GstKsVideoDevice * self);
|
||||||
void gst_ks_video_device_cancel_stop (GstKsVideoDevice * self);
|
void gst_ks_video_device_cancel_stop (GstKsVideoDevice * self);
|
||||||
|
|
||||||
|
gboolean gst_ks_video_device_stream_is_muxed (GstKsVideoDevice * self);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_KS_VIDEO_DEVICE_H__ */
|
#endif /* __GST_KS_VIDEO_DEVICE_H__ */
|
||||||
|
|
|
@ -815,6 +815,13 @@ gst_ks_video_src_timestamp_buffer (GstKsVideoSrc * self, GstBuffer * buf,
|
||||||
GstClock *clock;
|
GstClock *clock;
|
||||||
GstClockTime timestamp;
|
GstClockTime timestamp;
|
||||||
|
|
||||||
|
/* Don't timestamp muxed strams */
|
||||||
|
if (!gst_ks_video_device_stream_is_muxed (priv->device)) {
|
||||||
|
duration = timestamp = GST_CLOCK_TIME_NONE;
|
||||||
|
priv->offset++;
|
||||||
|
goto timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
duration = gst_ks_video_device_get_duration (priv->device);
|
duration = gst_ks_video_device_get_duration (priv->device);
|
||||||
|
|
||||||
GST_OBJECT_LOCK (self);
|
GST_OBJECT_LOCK (self);
|
||||||
|
@ -900,6 +907,7 @@ gst_ks_video_src_timestamp_buffer (GstKsVideoSrc * self, GstBuffer * buf,
|
||||||
priv->prev_ts = timestamp;
|
priv->prev_ts = timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
timestamp:
|
||||||
GST_BUFFER_OFFSET (buf) = priv->offset;
|
GST_BUFFER_OFFSET (buf) = priv->offset;
|
||||||
GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_OFFSET (buf) + 1;
|
GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_OFFSET (buf) + 1;
|
||||||
GST_BUFFER_PTS (buf) = timestamp;
|
GST_BUFFER_PTS (buf) = timestamp;
|
||||||
|
|
Loading…
Reference in a new issue