[libcamera-devel] [RFC 7/7] libcamera: pipeline: uvcvideo: add camera start and stop

Niklas Söderlund niklas.soderlund at ragnatech.se
Tue Feb 5 01:07:02 CET 2019


Expand the stubs to actually start and stop the UVC video device.

Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
 src/libcamera/pipeline/uvcvideo.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp
index 632a4b4b09189240..8c0d2c09aafa5f37 100644
--- a/src/libcamera/pipeline/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo.cpp
@@ -116,13 +116,16 @@ int PipelineHandlerUVC::freeBuffers(Camera *camera)
 
 int PipelineHandlerUVC::start(const Camera *camera)
 {
-	LOG(UVC, Error) << "TODO: start camera";
-	return 0;
+	LOG(UVC, Debug) << "Stream On";
+
+	return video_->streamOn();
 }
 
 void PipelineHandlerUVC::stop(const Camera *camera)
 {
-	LOG(UVC, Error) << "TODO: stop camera";
+	LOG(UVC, Debug) << "Stream Off";
+
+	video_->streamOff();
 }
 
 int PipelineHandlerUVC::queueRequest(const Camera *camera, Request *request)
-- 
2.20.1



More information about the libcamera-devel mailing list