diff options
| author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2015-04-29 09:57:52 +0200 |
|---|---|---|
| committer | Andoni Morales Alastruey <ylatuya@gmail.com> | 2015-04-29 21:41:55 +0200 |
| commit | 1991b5bb6f1d575bea60b5c6b8d2050edf39ccfc (patch) | |
| tree | d939380ee3c6ac73964aebbebebae872a68f7b78 /sys/winks | |
| parent | 20e5a4a498a516821e180d81e45016c7b2ad8f57 (diff) | |
ksvideosrc: don't timestamp buffers for muxed streams
Diffstat (limited to 'sys/winks')
| -rw-r--r-- | sys/winks/gstksvideodevice.c | 8 | ||||
| -rw-r--r-- | sys/winks/gstksvideodevice.h | 2 | ||||
| -rw-r--r-- | sys/winks/gstksvideosrc.c | 8 |
3 files changed, 18 insertions, 0 deletions
diff --git a/sys/winks/gstksvideodevice.c b/sys/winks/gstksvideodevice.c index 0e2aa089d..d00b6a756 100644 --- a/sys/winks/gstksvideodevice.c +++ b/sys/winks/gstksvideodevice.c @@ -1224,3 +1224,11 @@ gst_ks_video_device_cancel_stop (GstKsVideoDevice * self) 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; +} diff --git a/sys/winks/gstksvideodevice.h b/sys/winks/gstksvideodevice.h index 105b79da3..649faaa66 100644 --- a/sys/winks/gstksvideodevice.h +++ b/sys/winks/gstksvideodevice.h @@ -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_stop (GstKsVideoDevice * self); +gboolean gst_ks_video_device_stream_is_muxed (GstKsVideoDevice * self); + G_END_DECLS #endif /* __GST_KS_VIDEO_DEVICE_H__ */ diff --git a/sys/winks/gstksvideosrc.c b/sys/winks/gstksvideosrc.c index 859699af9..79cbb7a2f 100644 --- a/sys/winks/gstksvideosrc.c +++ b/sys/winks/gstksvideosrc.c @@ -815,6 +815,13 @@ gst_ks_video_src_timestamp_buffer (GstKsVideoSrc * self, GstBuffer * buf, GstClock *clock; 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); GST_OBJECT_LOCK (self); @@ -900,6 +907,7 @@ gst_ks_video_src_timestamp_buffer (GstKsVideoSrc * self, GstBuffer * buf, priv->prev_ts = timestamp; } +timestamp: GST_BUFFER_OFFSET (buf) = priv->offset; GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_OFFSET (buf) + 1; GST_BUFFER_PTS (buf) = timestamp; |
