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

Message ID 20190205000702.15370-8-niklas.soderlund@ragnatech.se
State Superseded
Delegated to: Niklas Söderlund
Headers show
Series
  • libcamera: extend camera and pipeline to support requests
Related show

Commit Message

Niklas Söderlund Feb. 5, 2019, 12:07 a.m. UTC
Expand the stubs to actually start and stop the UVC video device.

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

Patch

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)