[libcamera-devel,4/4] cam: Allow cameras with more then one stream

Message ID 20190402005406.25097-5-niklas.soderlund@ragnatech.se
State Superseded
Delegated to: Niklas Söderlund
Headers show
Series
  • cam: Add support to specify multiple stream configurations with hints
Related show

Commit Message

Niklas Söderlund April 2, 2019, 12:54 a.m. UTC
The libcamera API and the cam tool is now ready to make use of cameras
with more then one stream. Remove the limitation in the tool which
disallows cameras which provides more then one stream.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 src/cam/main.cpp | 8 --------
 1 file changed, 8 deletions(-)

Comments

Laurent Pinchart April 2, 2019, 3:53 p.m. UTC | #1
Hi Niklas,

Thank you for the patch.

On Tue, Apr 02, 2019 at 02:54:06AM +0200, Niklas Söderlund wrote:
> The libcamera API and the cam tool is now ready to make use of cameras

s/is now/are now/

> with more then one stream. Remove the limitation in the tool which

s/then/than/

> disallows cameras which provides more then one stream.

s/which provides/that provide/
s/then/than/

http://grammartips.homestead.com/than.html

> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/cam/main.cpp | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/src/cam/main.cpp b/src/cam/main.cpp
> index 6aed4073f70d37a2..9fb29fc8995001f6 100644
> --- a/src/cam/main.cpp
> +++ b/src/cam/main.cpp
> @@ -317,14 +317,6 @@ int main(int argc, char **argv)
>  			goto out;
>  		}
>  
> -		const std::set<Stream *> &streams = camera->streams();
> -		if (streams.size() != 1) {
> -			std::cout << "Camera has " << streams.size()
> -				  << " streams, only 1 is supported"
> -				  << std::endl;
> -			goto out;
> -		}
> -
>  		if (camera->acquire()) {
>  			std::cout << "Failed to acquire camera" << std::endl;
>  			goto out;

Patch

diff --git a/src/cam/main.cpp b/src/cam/main.cpp
index 6aed4073f70d37a2..9fb29fc8995001f6 100644
--- a/src/cam/main.cpp
+++ b/src/cam/main.cpp
@@ -317,14 +317,6 @@  int main(int argc, char **argv)
 			goto out;
 		}
 
-		const std::set<Stream *> &streams = camera->streams();
-		if (streams.size() != 1) {
-			std::cout << "Camera has " << streams.size()
-				  << " streams, only 1 is supported"
-				  << std::endl;
-			goto out;
-		}
-
 		if (camera->acquire()) {
 			std::cout << "Failed to acquire camera" << std::endl;
 			goto out;