linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking
@ 2019-01-13 23:38 james.hilliard1
  2019-01-13 23:38 ` [PATCH zbar 2/5] Fix function protoype to be compatible with recent libjpeg james.hilliard1
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: james.hilliard1 @ 2019-01-13 23:38 UTC (permalink / raw)
  To: mchehab+samsung; +Cc: linux-media, Thomas Petazzoni, James Hilliard

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index a03d10e..6476a20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ m4_ifndef([AC_LANG_DEFINES_PROVIDED],
           [m4_define([AC_LANG_DEFINES_PROVIDED])])
 AC_CONFIG_AUX_DIR(config)
 AC_CONFIG_MACRO_DIR(config)
-AM_INIT_AUTOMAKE([1.13 -Werror foreign subdir-objects std-options dist-bzip2])
+AM_INIT_AUTOMAKE([1.13 foreign subdir-objects std-options dist-bzip2])
 m4_pattern_allow([AM_PROG_AR])
 AC_CONFIG_HEADERS([include/config.h])
 AC_CONFIG_SRCDIR(zbar/scanner.c)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH zbar 2/5] Fix function protoype to be compatible with recent libjpeg
  2019-01-13 23:38 [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking james.hilliard1
@ 2019-01-13 23:38 ` james.hilliard1
  2019-01-13 23:38 ` [PATCH zbar 3/5] Add --disable-doc configure option to disable building docs james.hilliard1
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: james.hilliard1 @ 2019-01-13 23:38 UTC (permalink / raw)
  To: mchehab+samsung
  Cc: linux-media, Viacheslav Volkov, Thomas Petazzoni, James Hilliard

From: Viacheslav Volkov <sv99@inbox.ru>

Signed-off-by: Viacheslav Volkov <sv99@inbox.ru>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 zbar/jpeg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zbar/jpeg.c b/zbar/jpeg.c
index 972bfea..fdd1619 100644
--- a/zbar/jpeg.c
+++ b/zbar/jpeg.c
@@ -68,7 +68,7 @@ void init_source (j_decompress_ptr cinfo)
     cinfo->src->bytes_in_buffer = img->datalen;
 }
 
-int fill_input_buffer (j_decompress_ptr cinfo)
+boolean fill_input_buffer (j_decompress_ptr cinfo)
 {
     /* buffer underrun error case */
     cinfo->src->next_input_byte = fake_eoi;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH zbar 3/5] Add --disable-doc configure option to disable building docs
  2019-01-13 23:38 [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking james.hilliard1
  2019-01-13 23:38 ` [PATCH zbar 2/5] Fix function protoype to be compatible with recent libjpeg james.hilliard1
@ 2019-01-13 23:38 ` james.hilliard1
  2019-01-13 23:38 ` [PATCH zbar 4/5] Ignore ENOTTY errors when calling VIDIOC_S_CROP james.hilliard1
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: james.hilliard1 @ 2019-01-13 23:38 UTC (permalink / raw)
  To: mchehab+samsung; +Cc: linux-media, James Hilliard

From: James Hilliard <james.hilliard1@gmail.com>

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 Makefile.am  |  2 ++
 configure.ac | 10 ++++++++++
 2 files changed, 12 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index df3d79d..b4cae8a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,7 +45,9 @@ if HAVE_NPAPI
 include $(srcdir)/plugin/Makefile.am.inc
 endif
 include $(srcdir)/test/Makefile.am.inc
+if HAVE_DOC
 include $(srcdir)/doc/Makefile.am.inc
+endif
 
 EXTRA_DIST += zbar.ico zbar.nsi
 
diff --git a/configure.ac b/configure.ac
index 6476a20..afccc3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -177,6 +177,15 @@ or configure --disable-pthread to skip threaded support.])])
    AC_DEFINE([__USE_UNIX98], [1], [used only for pthread debug attributes])
 ])
 
+dnl doc
+AC_ARG_ENABLE([doc],
+  [AS_HELP_STRING([--disable-doc],
+    [disable building docs])],
+  [],
+  [enable_doc="yes"])
+
+AM_CONDITIONAL([HAVE_DOC], [test "x$enable_doc" != "xno"])
+
 dnl video
 AC_ARG_ENABLE([video],
   [AS_HELP_STRING([--disable-video],
@@ -602,6 +611,7 @@ echo "please verify that the detected configuration matches your expectations:"
 echo "------------------------------------------------------------------------"
 echo "X                 --with-x=$have_x"
 echo "pthreads          --enable-pthread=$enable_pthread"
+echo "doc               --enable-doc=$enable_doc"
 echo "v4l               --enable-video=$enable_video"
 AS_IF([test "x$enable_video" != "xyes"],
   [echo "        => zbarcam video scanner will *NOT* be built"])
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH zbar 4/5] Ignore ENOTTY errors when calling VIDIOC_S_CROP
  2019-01-13 23:38 [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking james.hilliard1
  2019-01-13 23:38 ` [PATCH zbar 2/5] Fix function protoype to be compatible with recent libjpeg james.hilliard1
  2019-01-13 23:38 ` [PATCH zbar 3/5] Add --disable-doc configure option to disable building docs james.hilliard1
@ 2019-01-13 23:38 ` james.hilliard1
  2019-01-13 23:38 ` [PATCH zbar 5/5] release video buffers after probing and request them again when needed james.hilliard1
  2019-01-14 11:00 ` [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking Mauro Carvalho Chehab
  4 siblings, 0 replies; 8+ messages in thread
From: james.hilliard1 @ 2019-01-13 23:38 UTC (permalink / raw)
  To: mchehab+samsung; +Cc: linux-media, James Hilliard

From: James Hilliard <james.hilliard1@gmail.com>

Silences this error:
ERROR: zbar video in v4l2_reset_crop():
    system error: setting default crop window (VIDIOC_S_CROP): Inappropriate ioctl for device (25)

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 zbar/video/v4l2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zbar/video/v4l2.c b/zbar/video/v4l2.c
index 1d685e9..ad6adf4 100644
--- a/zbar/video/v4l2.c
+++ b/zbar/video/v4l2.c
@@ -569,7 +569,7 @@ static inline int v4l2_reset_crop (zbar_video_t *vdo)
     memset(&crop, 0, sizeof(crop));
     crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
     crop.c = ccap.defrect;
-    if(v4l2_ioctl(vdo->fd, VIDIOC_S_CROP, &crop) < 0 && errno != EINVAL)
+    if(v4l2_ioctl(vdo->fd, VIDIOC_S_CROP, &crop) < 0 && errno != EINVAL && errno != ENOTTY)
         return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
                            "setting default crop window (VIDIOC_S_CROP)"));
     return(0);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH zbar 5/5] release video buffers after probing and request them again when needed
  2019-01-13 23:38 [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking james.hilliard1
                   ` (2 preceding siblings ...)
  2019-01-13 23:38 ` [PATCH zbar 4/5] Ignore ENOTTY errors when calling VIDIOC_S_CROP james.hilliard1
@ 2019-01-13 23:38 ` james.hilliard1
  2019-01-14 11:00 ` [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking Mauro Carvalho Chehab
  4 siblings, 0 replies; 8+ messages in thread
From: james.hilliard1 @ 2019-01-13 23:38 UTC (permalink / raw)
  To: mchehab+samsung; +Cc: linux-media, James Hilliard

From: James Hilliard <james.hilliard1@gmail.com>

Patch adapted from https://bugs.archlinux.org/task/44091

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 zbar/video/v4l2.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/zbar/video/v4l2.c b/zbar/video/v4l2.c
index ad6adf4..ca52e4c 100644
--- a/zbar/video/v4l2.c
+++ b/zbar/video/v4l2.c
@@ -243,6 +243,21 @@ static int v4l2_mmap_buffers (zbar_video_t *vdo)
     return(0);
 }
 
+static int v4l2_request_buffers (zbar_video_t *vdo)
+{
+    struct v4l2_requestbuffers rb;
+    memset(&rb, 0, sizeof(rb));
+    rb.count = vdo->num_images;
+    rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+    rb.memory = V4L2_MEMORY_USERPTR;
+    if(v4l2_ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
+        return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
+                           "requesting video frame buffers (VIDIOC_REQBUFS)"));
+    if(rb.count)
+        vdo->num_images = rb.count;
+    return(0);
+}
+
 static int v4l2_set_format (zbar_video_t *vdo,
                             uint32_t fmt)
 {
@@ -334,6 +349,8 @@ static int v4l2_init (zbar_video_t *vdo,
 
     if(vdo->iomode == VIDEO_MMAP)
         return(v4l2_mmap_buffers(vdo));
+    if(vdo->iomode == VIDEO_USERPTR)
+        return(v4l2_request_buffers(vdo));
     return(0);
 }
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking
  2019-01-13 23:38 [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking james.hilliard1
                   ` (3 preceding siblings ...)
  2019-01-13 23:38 ` [PATCH zbar 5/5] release video buffers after probing and request them again when needed james.hilliard1
@ 2019-01-14 11:00 ` Mauro Carvalho Chehab
  2019-01-14 12:26   ` James Hilliard
  4 siblings, 1 reply; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2019-01-14 11:00 UTC (permalink / raw)
  To: james.hilliard1; +Cc: linux-media, Thomas Petazzoni

Hi James,

Em Mon, 14 Jan 2019 07:38:25 +0800
james.hilliard1@gmail.com escreveu:

> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 

Please add description to the patches. It helps reviewing them, and,
if we need to revert it for whatever reason in the future, the git log
will help to take into account the rationale about why the change was
needed in the first place.

> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index a03d10e..6476a20 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -5,7 +5,7 @@ m4_ifndef([AC_LANG_DEFINES_PROVIDED],
>            [m4_define([AC_LANG_DEFINES_PROVIDED])])
>  AC_CONFIG_AUX_DIR(config)
>  AC_CONFIG_MACRO_DIR(config)
> -AM_INIT_AUTOMAKE([1.13 -Werror foreign subdir-objects std-options dist-bzip2])
> +AM_INIT_AUTOMAKE([1.13 foreign subdir-objects std-options dist-bzip2])
>  m4_pattern_allow([AM_PROG_AR])
>  AC_CONFIG_HEADERS([include/config.h])
>  AC_CONFIG_SRCDIR(zbar/scanner.c)

I applied patches 2 to 5 of this series, but I would prefer to keep the
-Werror here, as it helps to identify and fix potential issues. 

Here (Fedora 29), everything builds fine, but I haven't test on other
distros that could have newer packages.

Why is this patch needed?

Regards,
Mauro

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking
  2019-01-14 11:00 ` [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking Mauro Carvalho Chehab
@ 2019-01-14 12:26   ` James Hilliard
  2019-01-14 12:43     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 8+ messages in thread
From: James Hilliard @ 2019-01-14 12:26 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media, Thomas Petazzoni

On Mon, Jan 14, 2019 at 4:00 AM Mauro Carvalho Chehab
<mchehab+samsung@kernel.org> wrote:
>
> Hi James,
>
> Em Mon, 14 Jan 2019 07:38:25 +0800
> james.hilliard1@gmail.com escreveu:
>
> > From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> >
>
> Please add description to the patches. It helps reviewing them, and,
> if we need to revert it for whatever reason in the future, the git log
> will help to take into account the rationale about why the change was
> needed in the first place.
>
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > ---
> >  configure.ac | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index a03d10e..6476a20 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -5,7 +5,7 @@ m4_ifndef([AC_LANG_DEFINES_PROVIDED],
> >            [m4_define([AC_LANG_DEFINES_PROVIDED])])
> >  AC_CONFIG_AUX_DIR(config)
> >  AC_CONFIG_MACRO_DIR(config)
> > -AM_INIT_AUTOMAKE([1.13 -Werror foreign subdir-objects std-options dist-bzip2])
> > +AM_INIT_AUTOMAKE([1.13 foreign subdir-objects std-options dist-bzip2])
> >  m4_pattern_allow([AM_PROG_AR])
> >  AC_CONFIG_HEADERS([include/config.h])
> >  AC_CONFIG_SRCDIR(zbar/scanner.c)
>
> I applied patches 2 to 5 of this series, but I would prefer to keep the
> -Werror here, as it helps to identify and fix potential issues.
>
> Here (Fedora 29), everything builds fine, but I haven't test on other
> distros that could have newer packages.
>
> Why is this patch needed?
It was part of buildroot's zbar patches, not sure if it's needed though anymore.
>
> Regards,
> Mauro
>
> Thanks,
> Mauro

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking
  2019-01-14 12:26   ` James Hilliard
@ 2019-01-14 12:43     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2019-01-14 12:43 UTC (permalink / raw)
  To: James Hilliard; +Cc: linux-media, Thomas Petazzoni

Em Mon, 14 Jan 2019 05:26:42 -0700
James Hilliard <james.hilliard1@gmail.com> escreveu:

> On Mon, Jan 14, 2019 at 4:00 AM Mauro Carvalho Chehab
> <mchehab+samsung@kernel.org> wrote:
> >
> > Hi James,
> >
> > Em Mon, 14 Jan 2019 07:38:25 +0800
> > james.hilliard1@gmail.com escreveu:
> >  
> > > From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > >  
> >
> > Please add description to the patches. It helps reviewing them, and,
> > if we need to revert it for whatever reason in the future, the git log
> > will help to take into account the rationale about why the change was
> > needed in the first place.
> >  
> > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > > ---
> > >  configure.ac | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/configure.ac b/configure.ac
> > > index a03d10e..6476a20 100644
> > > --- a/configure.ac
> > > +++ b/configure.ac
> > > @@ -5,7 +5,7 @@ m4_ifndef([AC_LANG_DEFINES_PROVIDED],
> > >            [m4_define([AC_LANG_DEFINES_PROVIDED])])
> > >  AC_CONFIG_AUX_DIR(config)
> > >  AC_CONFIG_MACRO_DIR(config)
> > > -AM_INIT_AUTOMAKE([1.13 -Werror foreign subdir-objects std-options dist-bzip2])
> > > +AM_INIT_AUTOMAKE([1.13 foreign subdir-objects std-options dist-bzip2])
> > >  m4_pattern_allow([AM_PROG_AR])
> > >  AC_CONFIG_HEADERS([include/config.h])
> > >  AC_CONFIG_SRCDIR(zbar/scanner.c)  
> >
> > I applied patches 2 to 5 of this series, but I would prefer to keep the
> > -Werror here, as it helps to identify and fix potential issues.
> >
> > Here (Fedora 29), everything builds fine, but I haven't test on other
> > distros that could have newer packages.
> >
> > Why is this patch needed?  
> It was part of buildroot's zbar patches, not sure if it's needed though anymore.

Ok. Let's keep it without this patch. If you find any warning causing
buildroot to fail, feel free to send us a patch fixing it.

Thanks!
Mauro

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-01-14 12:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-13 23:38 [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking james.hilliard1
2019-01-13 23:38 ` [PATCH zbar 2/5] Fix function protoype to be compatible with recent libjpeg james.hilliard1
2019-01-13 23:38 ` [PATCH zbar 3/5] Add --disable-doc configure option to disable building docs james.hilliard1
2019-01-13 23:38 ` [PATCH zbar 4/5] Ignore ENOTTY errors when calling VIDIOC_S_CROP james.hilliard1
2019-01-13 23:38 ` [PATCH zbar 5/5] release video buffers after probing and request them again when needed james.hilliard1
2019-01-14 11:00 ` [PATCH zbar 1/5] Fix autoreconf by reducing the warning/error checking Mauro Carvalho Chehab
2019-01-14 12:26   ` James Hilliard
2019-01-14 12:43     ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).