diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2020-01-27 17:46:22 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-03-07 01:58:08 +0200 |
commit | d1d1348228d559999fc8ec48596fb699ab3563c0 (patch) | |
tree | 90a0dde5a2d8fb9775ea0b41daf55d147f613547 /src/gstreamer/gstlibcamerapad.cpp | |
parent | 5d6db0936ff45338b3135bde1b2310fcb8f32c58 (diff) |
gst: libcamerasrc: Implement initial streaming
With this patch, the element is now able to push buffers to the next
element in the graph. The buffers are currently missing any metadata
like timestamp, sequence number. This will be added in the next commit.
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/gstreamer/gstlibcamerapad.cpp')
-rw-r--r-- | src/gstreamer/gstlibcamerapad.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gstreamer/gstlibcamerapad.cpp b/src/gstreamer/gstlibcamerapad.cpp index 49dd35b8..840f391c 100644 --- a/src/gstreamer/gstlibcamerapad.cpp +++ b/src/gstreamer/gstlibcamerapad.cpp @@ -19,6 +19,7 @@ struct _GstLibcameraPad { StreamRole role; GstLibcameraPool *pool; GQueue pending_buffers; + GstClockTime latency; }; enum { @@ -164,3 +165,11 @@ gst_libcamera_pad_push_pending(GstPad *pad) return gst_pad_push(pad, buffer); } + +bool +gst_libcamera_pad_has_pending(GstPad *pad) +{ + auto *self = GST_LIBCAMERA_PAD(pad); + GLibLocker lock(GST_OBJECT(self)); + return self->pending_buffers.length > 0; +} |