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

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

Commit Message

Vedant Paranjape July 27, 2021, 7:47 p.m. UTC
Change format specifier %s to %u in request pad template

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

Comments

Laurent Pinchart July 28, 2021, 7:03 a.m. UTC | #1
Hi Vedant,

Thank you for the patch.

On Wed, Jul 28, 2021 at 01:17:24AM +0530, Vedant Paranjape wrote:
> Change format specifier %s to %u in request pad template

This is pretty obvious from the patch itself. What isn't obvious,
however, is why, and that's what a commit message body should focus on.
Every commit message needs to answer the "why" question, may explain
"how" when not immediately visible, and could also explain "what" if
it's not obvious.

> Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.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
Vedant Paranjape July 28, 2021, 7:06 a.m. UTC | #2
Thanks for your reply. I'll update the commit message

Regards,
Vedant

On Wed, 28 Jul, 2021, 12:33 Laurent Pinchart, <
laurent.pinchart@ideasonboard.com> wrote:

> Hi Vedant,
>
> Thank you for the patch.
>
> On Wed, Jul 28, 2021 at 01:17:24AM +0530, Vedant Paranjape wrote:
> > Change format specifier %s to %u in request pad template
>
> This is pretty obvious from the patch itself. What isn't obvious,
> however, is why, and that's what a commit message body should focus on.
> Every commit message needs to answer the "why" question, may explain
> "how" when not immediately visible, and could also explain "what" if
> it's not obvious.
>
> > Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.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
>
> --
> Regards,
>
> Laurent Pinchart
>
Nicolas Dufresne July 30, 2021, 8:20 p.m. UTC | #3
Le mercredi 28 juillet 2021 à 10:03 +0300, Laurent Pinchart a écrit :
> Hi Vedant,
> 
> Thank you for the patch.
> 
> On Wed, Jul 28, 2021 at 01:17:24AM +0530, Vedant Paranjape wrote:
> > Change format specifier %s to %u in request pad template
> 
> This is pretty obvious from the patch itself. What isn't obvious,
> however, is why, and that's what a commit message body should focus on.
> Every commit message needs to answer the "why" question, may explain
> "how" when not immediately visible, and could also explain "what" if
> it's not obvious.
> 
> > Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.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

For the code change your got my:

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

So whenever the commit is fine with Laurent, this is ready to go in. See you all
in two weeks !

> >  };
> >  
> >  void
>

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