[libcamera-devel,v2] gstreamer: Update format specifier in Request Pad template
diff mbox series

Message ID 20210728143737.510546-1-vedantparanjape160201@gmail.com
State Accepted
Commit 0e8d8fbd4e47217c897b410cfe0163b88ae1dade
Headers show
Series
  • [libcamera-devel,v2] gstreamer: Update format specifier in Request Pad template
Related show

Commit Message

Vedant Paranjape July 28, 2021, 2:37 p.m. UTC
Change format specifier %s to %u in name template field of request pad
template.

Pad names are as follows, src_0, src_1, etc. So, instead of using string
format specifier, unsigned integer format specifier is used.

Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>
---
 src/gstreamer/gstlibcamerasrc.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul Elder July 29, 2021, 3:27 a.m. UTC | #1
Hi Vedant,

On Wed, Jul 28, 2021 at 08:07:37PM +0530, Vedant Paranjape wrote:
> Change format specifier %s to %u in name template field of request pad
> template.
> 
> Pad names are as follows, src_0, src_1, etc. So, instead of using string
> format specifier, unsigned integer format specifier is used.

", use unsigned integer format specifier."

> 
> Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>

Makes sense.

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> ---
>  src/gstreamer/gstlibcamerasrc.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
> index bb8ea07a..553fad02 100644
> --- a/src/gstreamer/gstlibcamerasrc.cpp
> +++ b/src/gstreamer/gstlibcamerasrc.cpp
> @@ -149,7 +149,7 @@ GstStaticPadTemplate src_template = {
>  
>  /* More pads can be requested in state < PAUSED */
>  GstStaticPadTemplate request_src_template = {
> -	"src_%s", GST_PAD_SRC, GST_PAD_REQUEST, TEMPLATE_CAPS
> +	"src_%u", GST_PAD_SRC, GST_PAD_REQUEST, TEMPLATE_CAPS
>  };
>  
>  void
> -- 
> 2.25.1
>

Patch
diff mbox series

diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
index bb8ea07a..553fad02 100644
--- a/src/gstreamer/gstlibcamerasrc.cpp
+++ b/src/gstreamer/gstlibcamerasrc.cpp
@@ -149,7 +149,7 @@  GstStaticPadTemplate src_template = {
 
 /* More pads can be requested in state < PAUSED */
 GstStaticPadTemplate request_src_template = {
-	"src_%s", GST_PAD_SRC, GST_PAD_REQUEST, TEMPLATE_CAPS
+	"src_%u", GST_PAD_SRC, GST_PAD_REQUEST, TEMPLATE_CAPS
 };
 
 void