[libcamera-devel,2/4] libcamera: mediadevice: Make getEntityByName() public

Message ID 20190101212328.18361-2-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • [libcamera-devel,1/4] libcamera: mediadevice: Fix graph parsing error handling
Related show

Commit Message

Laurent Pinchart Jan. 1, 2019, 9:23 p.m. UTC
The function is useful as a public API, make it public.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/include/media_device.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Kieran Bingham Jan. 1, 2019, 9:53 p.m. UTC | #1
Hi Laurent,

On 01/01/2019 21:23, Laurent Pinchart wrote:
> The function is useful as a public API, make it public.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Not really my code here, but seem reasonable to me.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  src/libcamera/include/media_device.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/include/media_device.h b/src/libcamera/include/media_device.h
> index 74a67c81398a..fd1e12d1bbcb 100644
> --- a/src/libcamera/include/media_device.h
> +++ b/src/libcamera/include/media_device.h
> @@ -32,7 +32,9 @@ public:
>  
>  	const std::string driver() const { return driver_; }
>  	const std::string devnode() const { return devnode_; }
> +
>  	const std::vector<MediaEntity *> &entities() const { return entities_; }
> +	MediaEntity *getEntityByName(const std::string &name);
>  
>  private:
>  	std::string driver_;
> @@ -46,7 +48,6 @@ private:
>  	void clear();
>  
>  	std::vector<MediaEntity *> entities_;
> -	MediaEntity *getEntityByName(const std::string &name);
>  
>  	bool populateEntities(const struct media_v2_topology &topology);
>  	bool populatePads(const struct media_v2_topology &topology);
>

Patch

diff --git a/src/libcamera/include/media_device.h b/src/libcamera/include/media_device.h
index 74a67c81398a..fd1e12d1bbcb 100644
--- a/src/libcamera/include/media_device.h
+++ b/src/libcamera/include/media_device.h
@@ -32,7 +32,9 @@  public:
 
 	const std::string driver() const { return driver_; }
 	const std::string devnode() const { return devnode_; }
+
 	const std::vector<MediaEntity *> &entities() const { return entities_; }
+	MediaEntity *getEntityByName(const std::string &name);
 
 private:
 	std::string driver_;
@@ -46,7 +48,6 @@  private:
 	void clear();
 
 	std::vector<MediaEntity *> entities_;
-	MediaEntity *getEntityByName(const std::string &name);
 
 	bool populateEntities(const struct media_v2_topology &topology);
 	bool populatePads(const struct media_v2_topology &topology);