camera: Add camera flip config
This commit is contained in:
@@ -17,10 +17,11 @@ void RegisterFactory(const std::string& name, std::unique_ptr<CameraFactory> fac
|
||||
factories[name] = std::move(factory);
|
||||
}
|
||||
|
||||
std::unique_ptr<CameraInterface> CreateCamera(const std::string& name, const std::string& config) {
|
||||
std::unique_ptr<CameraInterface> CreateCamera(const std::string& name, const std::string& config,
|
||||
const Service::CAM::Flip& flip) {
|
||||
auto pair = factories.find(name);
|
||||
if (pair != factories.end()) {
|
||||
return pair->second->Create(config);
|
||||
return pair->second->Create(config, flip);
|
||||
}
|
||||
|
||||
if (name != "blank") {
|
||||
@@ -31,10 +32,10 @@ std::unique_ptr<CameraInterface> CreateCamera(const std::string& name, const std
|
||||
|
||||
std::unique_ptr<CameraInterface> CreateCameraPreview(const std::string& name,
|
||||
const std::string& config, int width,
|
||||
int height) {
|
||||
int height, const Service::CAM::Flip& flip) {
|
||||
auto pair = factories.find(name);
|
||||
if (pair != factories.end()) {
|
||||
return pair->second->CreatePreview(config, width, height);
|
||||
return pair->second->CreatePreview(config, width, height, flip);
|
||||
}
|
||||
|
||||
if (name != "blank") {
|
||||
|
||||
Reference in New Issue
Block a user