diff options
Diffstat (limited to 'src/libcamera/pipeline/uvcvideo.cpp')
-rw-r--r-- | src/libcamera/pipeline/uvcvideo.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp index d2d3a1ed..821e4c21 100644 --- a/src/libcamera/pipeline/uvcvideo.cpp +++ b/src/libcamera/pipeline/uvcvideo.cpp @@ -24,6 +24,12 @@ public: PipelineHandlerUVC(CameraManager *manager); ~PipelineHandlerUVC(); + std::map<Stream *, StreamConfiguration> + streamConfiguration(Camera *camera, + std::vector<Stream *> &streams) override; + int configureStreams(Camera *camera, + std::map<Stream *, StreamConfiguration> &config) override; + bool match(DeviceEnumerator *enumerator); private: @@ -46,6 +52,32 @@ PipelineHandlerUVC::~PipelineHandlerUVC() media_->release(); } +std::map<Stream *, StreamConfiguration> +PipelineHandlerUVC::streamConfiguration(Camera *camera, + std::vector<Stream *> &streams) +{ + std::map<Stream *, StreamConfiguration> configs; + + StreamConfiguration config{}; + + LOG(UVC, Info) << "TODO: Return a good default format"; + + configs[&stream_] = config; + + return configs; +} + +int PipelineHandlerUVC::configureStreams(Camera *camera, + std::map<Stream *, StreamConfiguration> &config) +{ + StreamConfiguration *cfg = &config[&stream_]; + + LOG(UVC, Info) << "TODO: Configure the camera for resolution " + << cfg->width << "x" << cfg->height; + + return 0; +} + bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator) { DeviceMatch dm("uvcvideo"); |