diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-02-13 13:23:52 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-02-13 13:23:52 +0100 |
commit | 31eab17a63b92f738bcaa74a7355a345f9919378 (patch) | |
tree | 929b764c8efac3b88f797e0230b4e0ca54146200 | |
parent | 7b70d5201c08e37df21de0ac5152d7da6b85d4a9 (diff) | |
download | mediapointer-dvb-s2-31eab17a63b92f738bcaa74a7355a345f9919378.tar.gz mediapointer-dvb-s2-31eab17a63b92f738bcaa74a7355a345f9919378.tar.bz2 |
v4l2-apps: rename capture_example to capture-example
From: Hans Verkuil <hverkuil@xs4all.nl>
Follow the existing naming conventions.
Also did a few small cleanups in this source.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r-- | .hgignore | 2 | ||||
-rw-r--r-- | v4l2-apps/test/Makefile | 2 | ||||
-rw-r--r-- | v4l2-apps/test/capture-example.c (renamed from v4l2-apps/test/capture_example.c) | 10 | ||||
-rw-r--r-- | v4l2-spec/Makefile | 4 |
4 files changed, 8 insertions, 10 deletions
@@ -35,7 +35,7 @@ v4l2-apps/test/ioctl-test$ v4l2-apps/test/sliced-vbi-detect$ v4l2-apps/test/sliced-vbi-test$ v4l2-apps/test/vbi-test$ -v4l2-apps/test/capture_example$ +v4l2-apps/test/capture-example$ v4l2-apps/test/pixfmt-test$ v4l2-apps/util/v4l2-dbg$ v4l2-apps/util/v4l2-chipids.cpp$ diff --git a/v4l2-apps/test/Makefile b/v4l2-apps/test/Makefile index 554940edd..d118b9210 100644 --- a/v4l2-apps/test/Makefile +++ b/v4l2-apps/test/Makefile @@ -10,7 +10,7 @@ binaries = ioctl-test \ driver-test \ pixfmt-test \ stress-buffer \ - capture_example + capture-example .PHONY: all clean install diff --git a/v4l2-apps/test/capture_example.c b/v4l2-apps/test/capture-example.c index 0cd129885..9d5b0d6ce 100644 --- a/v4l2-apps/test/capture_example.c +++ b/v4l2-apps/test/capture-example.c @@ -23,17 +23,15 @@ #include <sys/mman.h> #include <sys/ioctl.h> -#include <asm/types.h> /* for videodev2.h */ - #include <linux/videodev2.h> #define CLEAR(x) memset(&(x), 0, sizeof(x)) -typedef enum { +enum io_method { IO_METHOD_READ, IO_METHOD_MMAP, IO_METHOD_USERPTR, -} io_method; +}; struct buffer { void *start; @@ -41,7 +39,7 @@ struct buffer { }; static char *dev_name; -static io_method io = IO_METHOD_MMAP; +static enum io_method io = IO_METHOD_MMAP; static int fd = -1; struct buffer *buffers; static unsigned int n_buffers; @@ -570,7 +568,7 @@ static void usage(FILE *fp, int argc, char **argv) "-f | --format Force format to 640x480 YUYV\n" "-c | --count Number of frames to grab [%i]\n" "", - argv[0],dev_name,frame_count ); + argv[0], dev_name, frame_count); } static const char short_options[] = "d:hmruofc:"; diff --git a/v4l2-spec/Makefile b/v4l2-spec/Makefile index 9a13c9171..d0dde12f4 100644 --- a/v4l2-spec/Makefile +++ b/v4l2-spec/Makefile @@ -320,7 +320,7 @@ DOCUMENTED = \ -e "s/\(V4L2_PIX_FMT_[A-Z0-9_]\+\) /<link linkend=\"\1\">\1<\/link> /g" \ -e ":a;s/\(linkend=\".*\)_\(.*\">\)/\1-\2/;ta" -capture.c.sgml: ../v4l2-apps/test/capture_example.c Makefile +capture.c.sgml: ../v4l2-apps/test/capture-example.c Makefile echo "<programlisting>" > $@ expand --tabs=8 < $< | \ sed $(ESCAPE) $(DOCUMENTED) | \ @@ -478,7 +478,7 @@ pdf-build.stamp: Makefile checks $(SGMLS) $(PDFPICS) touch pdf-build.stamp # Example. -capture: ../v4l2-apps/test/capture_example.c +capture: ../v4l2-apps/test/capture-example.c gcc $^ -o $@ distclean clean: |