Compare commits

...

109 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
daa6a5f254 release 25.0.1
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-30 16:47:24 +01:00
Enrico Weigelt, metux IT consult
7c7ecbdf70 configure.ac: use new xserver driver build macros
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-30 16:35:41 +01:00
Enrico Weigelt, metux IT consult
3c998c0752 .github: increase xserver dependency
Upcoming changes need a little bit newer xserver SDK.
2026-01-30 15:25:28 +01:00
Enrico Weigelt, metux IT consult
6affbbc248 little formatting cleanup
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-30 13:25:52 +01:00
Enrico Weigelt, metux IT consult
bd0d8b0484 include statement cleanup
Only include what's necessary, and sorting them a little bit.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-30 13:04:16 +01:00
Enrico Weigelt, metux IT consult
ac395bbeca fix int -> pointer typecast warnings
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-30 12:53:23 +01:00
Enrico Weigelt, metux IT consult
9fbe8fbeab fix XF86AttributeRec assignment const issue
Unfortunately this struct is using non-const name field, but actually
may allow const in this case, because nobody's trying to free() these.

Until we've finally got a really clean solution, just do a typecast here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-30 12:49:16 +01:00
Enrico Weigelt, metux IT consult
b224dc8ed6 drop unnecessary include of xf86PciInfo.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-30 12:34:37 +01:00
Enrico Weigelt, metux IT consult
ca2b972365 replace obsolete "pointer" typedef by plain void*
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-07 18:59:30 +01:00
Enrico Weigelt, metux IT consult
9b683bb145 configure.ac: drop obsolete AM_MAINTAINER_MODE
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-30 16:17:15 +01:00
Enrico Weigelt, metux IT consult
0f9e231194 .github: update actions version
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-30 16:16:27 +01:00
Enrico Weigelt, metux IT consult
bf621b6ec5 .github: use new common driver build actions
Using the new driver build actions in X11Libre/actions-build-driver repo,
instead of having lots of duplicated pipeline and script in all the
individual driver repos.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-29 10:05:31 +01:00
Enrico Weigelt, metux IT consult
6582ec2b12 configure.ac: increase minimum xserver version to 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 16:19:55 +01:00
Enrico Weigelt, metux IT consult
0db0e56806 release 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 19:23:19 +01:00
Enrico Weigelt, metux IT consult
e1ae793d44 configure.ac: tiny formatting cleanup
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 17:43:43 +01:00
Enrico Weigelt, metux IT consult
3af49aa1ee drop obsolete #ifdef XFree86LOADER
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 13:50:44 +01:00
Enrico Weigelt, metux IT consult
37fd765aab configure.ac: replace DRIVER_NAME symbol by actual name
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 13:33:42 +01:00
Enrico Weigelt, metux IT consult
d0469938f1 configure.ac: drop obsolete checks for libc functions
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 12:23:15 +01:00
Enrico Weigelt, metux IT consult
bdce886364 drop obsolete .gitlab-ci.yml
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:55:58 +01:00
Enrico Weigelt, metux IT consult
a2e7ab6168 drop obsolete #ifdef HAVE_CONFIG_H
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:19:16 +01:00
Alan Coopersmith
0bc8abada1 Improve man page formatting
More closely follow common style as described on
https://man7.org/linux/man-pages/man7/man-pages.7.html
and fix warnings raised by `mandoc -T lint` and `groff -rCHECKSTYLE=10`

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-v4l/-/merge_requests/7>
2025-12-16 10:50:50 +01:00
Enrico Weigelt, metux IT consult
bf3ce6f067 configure.ac: fix package name and issue tracker URL
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 19:28:15 +01:00
Enrico Weigelt, metux IT consult
6797508c03 bump minimal xorg version to 1.18
1.18 was released a decade ago, so it seems reasonable stop supporting
older ones.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-08 18:35:03 +01:00
b-aaz
b472b97892 configure: Automatically detect the default xorg-module-dir.
The module directory has changed to a per ABI folder in the xlibre-xserver.
Now the default value of `xorg-module-dir` will be detected from the `moduledir` variable in xorg-server.pc.

Signed-off-by: b-aaz <b-aazbsd.proton.me>
2025-07-29 18:40:57 +02:00
Enrico Weigelt, metux IT consult
ebc39b2367 .github: add CI pipeline
This pipeline builds the driver against the latest Xserver stable
release as well as current master.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-29 18:33:39 +02:00
callmetango
7dc032a721 .github: Add issue forms
Add the following forms for issue creation:

* Bug report
* Feature request
* Code change
* Documentation update
* Organizational task

* add issue type selection page on "New Issue" call
* mention Github Discussions and the mailing list where appropriate

Part-of: X11Libre/misc#156
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-07 16:48:33 +02:00
Enrico Weigelt, metux IT consult
eb1e55874c Use asprintf() instead of Xasprintf()
This driver is Linux-only, so it's safe to assume asprintf() here.

It's one of the last few drivers ever using that function, so
blocking its removal from Xorg ABI.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-v4l/-/merge_requests/5>
2025-03-07 09:51:42 +01:00
Alan Coopersmith
36ffdb5239 Fix -Wdiscarded-qualifiers warning in AddV4LEnc()
v4l.c: In function 'AddV4LEnc':
v4l.c:920:16: warning: passing argument 1 of 'sprintf' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  920 |     sprintf(enc->name,"%s-%s",norm,fixname(input));
      |             ~~~^~~~~~
In file included from v4l.c:20:
/usr/include/stdio.h:363:38: note: expected 'char * restrict' but argument is of type 'const char *'
  363 | extern int sprintf (char *__restrict __s,
      |                     ~~~~~~~~~~~~~~~~~^~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-16 13:38:49 -08:00
Alan Coopersmith
7899231c65 Quiet -Wredundant-decls warnings for strlcat and strlcpy
In file included from /usr/include/xorg/misc.h:119,
                 from /usr/include/xorg/xf86str.h:37,
                 from /usr/include/xorg/xf86.h:44,
                 from v4l.c:25:
/usr/include/xorg/os.h:595:1: warning: redundant redeclaration of 'strlcpy'
 [-Wredundant-decls]
  595 | strlcpy(char *dst, const char *src, size_t siz);
      | ^~~~~~~
In file included from v4l.c:19:
/usr/include/string.h:506:15: note: previous declaration of 'strlcpy' with
 type 'size_t(char * restrict, const char * restrict, size_t)' {aka
 'long unsigned int(char * restrict, const char * restrict, long unsigned int)'}
  506 | extern size_t strlcpy (char *__restrict __dest,
      |               ^~~~~~~
/usr/include/xorg/os.h:597:1: warning: redundant redeclaration of 'strlcat'
 [-Wredundant-decls]
  597 | strlcat(char *dst, const char *src, size_t siz);
      | ^~~~~~~
/usr/include/string.h:512:15: note: previous declaration of 'strlcat' with
 type 'size_t(char * restrict, const char * restrict, size_t)' {aka
 'long unsigned int(char * restrict, const char * restrict, long unsigned int)'}
  512 | extern size_t strlcat (char *__restrict __dest,
      |               ^~~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-16 13:30:10 -08:00
Alan Coopersmith
10e0e12fcf Add X.Org's standard C warning flags to AM_CFLAGS
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-16 13:08:07 -08:00
Alan Coopersmith
07871d6be3 configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOL
AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008,
so it's time to rely on it.

Clears autoconf warnings:

configure.ac:45: warning: The macro 'AC_PROG_LIBTOOL' is obsolete.
configure.ac:45: You should run autoupdate.
aclocal.m4:3551: AC_PROG_LIBTOOL is expanded from...
configure.ac:45: the top level

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-16 13:07:35 -08:00
Alan Coopersmith
6367e7e46d gitlab CI: ensure libtool is installed in build container
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-10-07 09:06:39 -07:00
Alan Coopersmith
1f9068a1c8 gitlab CI: stop requiring Signed-off-by in commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09 12:07:00 -08:00
Alan Coopersmith
c5235058aa gitlab CI: add a basic build test
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-29 15:49:27 -08:00
Alan Coopersmith
cb3970480f Fix spelling/wording issues
Found by using:
    codespell --builtin clear,rare,usage,informal,code,names

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-29 15:48:26 -08:00
Alan Coopersmith
a375e88f89 Build xz tarballs instead of bzip2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-29 15:45:50 -08:00
Alan Coopersmith
3df0a355f9 Update configure.ac bug URL for gitlab migration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-12-07 19:18:13 -08:00
Peter Hutterer
b3244827d9 Fix ioctl return value handling
Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2018-10-08 13:16:35 +10:00
Peter Hutterer
3370b6b6a4 Fix handling of realloc failure
Coverity complaint and whatnot

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2018-10-08 13:16:28 +10:00
Peter Hutterer
a020fda02f Ensure the device name is null-terminated
And expand the size to 18, because the stack array we copied this into is 18
bytes long. This covers us for up to 999 (kernel) v4l devices and that is
definitely not a reason to use the "640k ought to be enough" meme.

Found by - you guessed it - coverity!

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2018-10-08 13:10:14 +10:00
Peter Hutterer
3f9022bdfe Remove unused variable osname
Coverity is unhappy and there's enough unhappiness in this world already, so
let's go for the low-hanging fruit.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2018-10-08 13:07:25 +10:00
Adam Jackson
03ff22bd9e v4l 0.3.0
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-08-14 14:58:30 -04:00
Adam Jackson
33c2170e89 Fix distcheck
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-08-14 14:58:18 -04:00
Hans de Goede
bbf9462a4e Fix build post xserver 1.17
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-08-14 14:58:03 -04:00
Adam Jackson
26f1e15569 Revert "v4l 0.3.0"
Doesn't distcheck yet, sigh.

This reverts commit 1eef30fdee.
2018-08-14 14:55:19 -04:00
Adam Jackson
1eef30fdee v4l 0.3.0
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-08-14 14:43:26 -04:00
Adam Jackson
b45bef53fc Remove a bogus memset
We get this warning:

    v4l.c:1154:39: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to remove the addressof? [-Wsizeof-pointer-memaccess]

It's correct enough, but ->cap is already zeroed by the previous memset.
Just remove the bogus one.

Fixes: xorg/driver/xf86-video-v4l#1
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-08-14 14:43:26 -04:00
Mihail Konev
0cbeee8e03 autogen: add default patch prefix
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26 14:00:21 +10:00
Adam Jackson
74d39213b4 Remove call to LoaderGetOS
If you're not using Linux, this isn't likely to build let alone run. And
if it _does_ build on non-Linux, it's probably because someone went out
of their way to try to make it work.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-01-24 09:43:43 -05:00
Cyril Brulebois
95fcc10d96 Bump version for development.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-06-30 12:14:53 -03:00
Mauro Carvalho Chehab
ca09693ba2 Fix standard video size detection
video width/height size can vary not only as a function of the
video standard but also in function of device capabilities. Due
to that, the code were trying to get those info from the hardware.
However, due to a driver bug, the info is not properly filled when
the video standard is changed.

While I intend to fix this inside the drivers, the current logic
doesn't work with the current stable kernels. So, use an alternative
way of getting this info, just using video standards information.

Let's keep the not working code there, in order to make easy to
return, after fixing the drivers. We'll probably need to check for
driver versions after reenabling the correct (not working) code,
or to use the new VIDIOC ioctl's to enumberate the supported
formats.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-02-11 09:24:53 -02:00
Mauro Carvalho Chehab
f7e6dcee73 Fix arguments for v4l_check_yuv
The device name and the file descriptors are wrong at the cal for
v4l_check_yuv(). Due to that, the driver were falling back to work
with RGB formats.

While here, add a code to prevent V4L driver to work if no video
adapter provide Xv overlay method.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-02-11 09:24:53 -02:00
Mauro Carvalho Chehab
6167b289f1 Provide a more consistent message if FBUF fails
Instead of providing an useless info that FBUF fails, print an
error indicating what's the Fourcc format that fails.

Also, on debug mode, prints a message indicating the selection of a
given fourcc. This helps to verify if both the video adapter and the
video capture board were set to the same video format.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-02-11 09:24:53 -02:00
Mauro Carvalho Chehab
362a97d43c Return BadMatch if a Port Attribute is not found
Fix a small non-compliance issue: if a port attribute is not known,
according with Xv specs, it should return BadMatch, and not BadValue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-02-11 09:24:53 -02:00
Mauro Carvalho Chehab
2cca68d701 Fix Get/Set Port Attribute logic
There are several issues at GPA/SPA logic:
  - driver tries to limit minimum/maximum values to -1000/1000;
  - If yuv_format is available, all GPA/SPA are sent to the
    overlay encoder at the video adapter;
  - The most used return condition is an error.

Rework the entire logic to fix the above bugs and clean the
code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-02-11 09:24:53 -02:00
Mauro Carvalho Chehab
f344cb78ef Use the fourcc header instead of redefining it inside the code
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-02-11 09:24:53 -02:00
Mauro Carvalho Chehab
436829a9d6 Coding style Cleanup
It is hard to work on a file that has multiple coding styles. As
we're rewriting the entire file, the better is to remove trailing
spaces and fix all the alignment issues, using 4 spaces for alignment
and not using tab.

No functional changes are made on this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-02-11 09:24:48 -02:00
Mauro Carvalho Chehab
f4ccca1dec Port xf86-video-v4l driver to V4L2
V4L1 API was dropped on kernel 2.6.38. Even the emulation layer
inside kernel was dropped. While it might still be possible to use
X with libv4l and a LD_PRELOADER setup, the proper way is to port
the driver to use the V4L2 API.

This change brings some improvements to the code, as now all
integer/boolean/menu controls are visible, and all video standards.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-02-11 07:55:25 -02:00
Gaetan Nadon
f4a94cfaef config: add comments for main statements 2010-07-22 20:24:42 -04:00
Gaetan Nadon
ecfd000f3e config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-21 16:07:00 -04:00
Gaetan Nadon
e47ceda611 config: replace deprecated AC_HELP_STRING with AS_HELP_STRING
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-21 14:37:42 -04:00
Gaetan Nadon
d1f217447c config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-21 14:05:23 -04:00
Gaetan Nadon
1da8c1e13b config: complete AC_INIT m4 quoting
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-21 09:27:42 -04:00
Gaetan Nadon
d1270c79a4 config: remove unrequired AC_SUBST([XORG_CFLAGS])
This macro is called by PKG_CHECK_MODULES

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-20 21:44:58 -04:00
Gaetan Nadon
c3d768e984 config: remove unrequired AC_HEADER_STDC
Autoconf says:
"This macro is obsolescent, as current systems have conforming
header files. New programs need not use this macro".

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-20 20:24:42 -04:00
Gaetan Nadon
a429958577 config: remove AC_PROG_CC as it overrides AC_PROG_C_C99
XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
AC_PROG_C_C99. This sets gcc with -std=gnu99.
If AC_PROG_CC macro is called afterwards, it resets CC to gcc.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-20 19:41:31 -04:00
Gaetan Nadon
58c08d3906 config: update AC_PREREQ statement to 2.60
Unrelated to the previous patches, the new value simply reflects
the reality that the minimum level for autoconf to configure
all x.org modules is 2.60 dated June 2006.

ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-20 18:45:19 -04:00
Gaetan Nadon
1d6d285a5e config: upgrade to util-macros 1.8 for additional man page support
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
The value of MAN_SUBST is the same for all X.Org packages.
2010-07-20 17:38:00 -04:00
Gaetan Nadon
45a5eb8cab config: header files are part of the source not in EXTRA_DIST
Only files that are not part of the source used to build
the driver are listed in EXTRA_DIST

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-05-26 16:25:25 -04:00
Alan Coopersmith
70bdb4d93a Update Sun license notices to current X.Org standard form
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-15 15:06:39 -08:00
Gaetan Nadon
0eaed2f59c configure.ac: remove unused sdkdir=$(pkg-config...) statement
The sdkdir variable isn't use, so remove the statement.

Acked-by: Dan Nicholson <dbn.lists@gmail.com>

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2009-12-30 15:13:01 -05:00
Gaetan Nadon
e0f72fbed7 Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
Now that the INSTALL file is generated.
Allows running make maintainer-clean.
2009-11-23 09:25:06 -05:00
Gaetan Nadon
8e4e3ba247 INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
Automake 'foreign' option is specified in configure.ac.
Remove from Makefile.am
2009-10-28 14:41:41 -04:00
Gaetan Nadon
2d55ea6e19 INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
Add missing INSTALL file. Use standard GNU file on building tarball
README may have been updated
Remove AUTHORS file as it is empty and no content available yet.
Remove NEWS file as it is empty and no content available yet.
2009-10-28 14:09:10 -04:00
Gaetan Nadon
d72d75a57f Several driver modules do not have a ChangeLog target in Makefile.am #23814
The git generated ChangeLog replaces the hand written one.
Update configure.ac to xorg-macros level 1.3.
Use XORG_DEFAULT_OPTIONS which replaces four XORG_* macros
Update Makefile.am to add ChangeLog target if missing
Remove ChangeLog from EXTRA_DIST or *CLEAN variables
This is a pre-req for the INSTALL_CMD
2009-10-26 12:54:22 -04:00
Gaetan Nadon
19811b8245 .gitignore: use common defaults with custom section # 24239
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.
2009-10-22 13:05:12 -04:00
Gaetan Nadon
b00a028be1 .gitignore: use common defaults with custom section # 24239
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.
2009-10-22 12:34:18 -04:00
Alan Coopersmith
09f1117d03 Remove xorgconfig & xorgcfg from See Also list in man page 2009-01-09 16:37:45 -08:00
Julien Cristau
610a340050 Add missing includes.
Fixes missing declaration of close() and ioctl().
2008-06-09 20:38:12 +02:00
Adam Jackson
509d291479 v4l 0.2.0 2008-03-19 16:43:42 -04:00
Adam Jackson
b0dad860b9 Fix ioctl() outparameter on LP64 systems. 2008-03-19 16:42:18 -04:00
Adam Jackson
edfeb249a8 Death to RCS tags. 2008-03-19 16:14:52 -04:00
Matthieu Herrb
eb742cfb9e Makefile.am: nuke RCS Id 2008-03-09 00:03:41 +01:00
Fabrice Lorrain
a2cddcf034 Fix typo in the manpage.
(Debian bug #466098)
2008-02-16 18:07:48 +01:00
James Cloos
6260e7a816 Add *~ to .gitignore to skip patch/emacs droppings 2007-09-03 05:52:48 -04:00
James Cloos
68ef5a3537 Rename .cvsignore to .gitignore 2007-08-23 19:26:00 -04:00
Adam Jackson
0fb67e3f76 Bump to 0.1.1 for Xv changes. 2006-04-08 01:52:08 +00:00
Aaron Plattner
3288506bb3 Add a DrawablePtr argument to the XV functions to pave the way for
redirected video.
2006-04-07 23:17:04 +00:00
Adam Jackson
0ae947b760 Unlibcwrap. Bump server version requirement. Bump to 0.1.0. 2006-04-07 21:45:55 +00:00
Kevin E Martin
f00943051a Update package version for X11R7 release. 2005-12-21 02:30:04 +00:00
Adam Jackson
58443583fb Stub COPYING files 2005-12-19 16:25:56 +00:00
Alan Coopersmith
0f0ae40ac9 Typo fixes, mailing list & url updates, and other changes to prepare for
X11R6.9 & 7.0 releases.
2005-12-19 09:07:50 +00:00
Kevin E Martin
c3917f36a9 Update package version number for final X11R7 release candidate. 2005-12-15 00:24:21 +00:00
Kevin E Martin
6a46c3a4db Change *man_SOURCES ==> *man_PRE to fix autotools warnings. 2005-12-06 22:48:40 +00:00
Kevin E Martin
7b16fc59d1 Update package version number for X11R7 RC3 release. 2005-12-03 05:49:36 +00:00
Kevin E Martin
db38e33e96 Remove extraneous AC_MSG_RESULT. 2005-12-02 02:16:11 +00:00
Adam Jackson
e09d3fa5a2 Only build dlloader modules by default. 2005-11-29 23:30:06 +00:00
Alan Coopersmith
b960665c1a Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
2005-11-28 22:04:14 +00:00
Eric Anholt
9e9e26cbfc Add .cvsignores for drivers. 2005-11-21 10:49:21 +00:00
Kevin E Martin
f95d090f26 Update package version number for X11R7 RC2 release. 2005-11-09 21:15:22 +00:00
Kevin E Martin
f1b782df5d Update pkgcheck depedencies to work with separate build roots. 2005-11-01 15:08:56 +00:00
Kevin E Martin
bec1ce8dea Update package version number for RC1 release. 2005-10-19 02:48:06 +00:00
Alan Coopersmith
d66e3714e8 Use @DRIVER_MAN_SUFFIX@ instead of $(DRIVER_MAN_SUFFIX) in macro
substitutions to work better with BSD make
2005-10-18 00:01:55 +00:00
Adam Jackson
ff178dcf9a More 1.7 braindamage: define EXTRA_DIST in terms of @DRIVER_NAME@ instead
of indirectly
2005-10-17 22:57:37 +00:00
Alan Coopersmith
c61d66bc02 Use sed & cpp to substitute variables in driver man pages 2005-10-17 00:09:08 +00:00
Adam Jackson
083adf6032 Bug #4328: Add build skeleton for the poor forgotten v4l driver. 2005-09-21 00:30:22 +00:00
Adam Jackson
1f05cde42c Prep for modular builds by adding guarded #include "config.h" everywhere. 2005-07-11 02:30:06 +00:00
Adam Jackson
1fa8d2f701 Bug #3626: _X_EXPORT tags for video and input drivers. 2005-06-25 21:16:59 +00:00
Daniel Stone
7123df70e0 Fix includes right throughout the Xserver tree:
change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h;
change "foo.h", "extensions/foo.h" and "X11/foo.h" to
    <X11/extensions/foo.h> for extension headers, e.g. Xv.h;
change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.
2005-04-20 12:25:32 +00:00
21 changed files with 3293 additions and 946 deletions

View File

@@ -0,0 +1,65 @@
name: 🐞 Bug report
description: Create a report to help us improve
labels: [bug, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help everyone identify and fix the bug. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: dropdown
id: affected-version
attributes:
label: Affected version
options:
- 0.3.0.1
- Git master branch
- other or don't know
default: 1
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe your issue
placeholder: When I did X then Y happened.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. Start ...
2. Do this
3. Do that
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect?
placeholder: I expected this to happen.
- type: textarea
id: environment
attributes:
label: Additional Information
description: |
Additional information you want to provide such as logs, system info, environment, screenshots, etc.
placeholder: |
Add any other context about the bug here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-v4l/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for reporting this issue! We will get back to you as soon as possible.

View File

@@ -0,0 +1,49 @@
name: ✨ Feature request
description: Suggest a feature for this software
labels: [enhancement, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the new software feature you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: "Describe the feature"
placeholder: A thing in X that allows to do Y.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Doing Y is needed for Z.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: "What are the alternatives?"
placeholder: We could do A or B instead.
- type: textarea
id: context
attributes:
label: Additional context
description: Additional information you want to provide such as references to related issues or protocols, the implications on existing use cases, etc.
placeholder: |
Add any other context about the feature request here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-v4l/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for your suggestion! Let's see together if it can be done.

View File

@@ -0,0 +1,49 @@
name: 🔧 Code cleanup
description: Level up the source code
labels: [code-cleanup, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the code cleanup you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: "Describe the cleanup"
placeholder: C in X needs to be changed into D.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Having D is needed for E.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: "What are the alternatives?"
placeholder: We could do A or B instead.
- type: textarea
id: context
attributes:
label: Additional context
description: Additional information you want to provide such as implications on existing code, how to ensure API/ABI stability, which tests are needed or to be run, related issues, etc.
placeholder: |
Add any other context about the cleanup here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-v4l/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for looking at the source code! Let's see together how it can be improved.

View File

@@ -0,0 +1,38 @@
name: 🔖 Documentation update
description: Make your mark for better documentation
labels: [documentation, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help others understand our software. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: Describe the update
placeholder: These things need to be better documented.
validations:
required: true
- type: textarea
id: environment
attributes:
label: Additional Information
description: Additional information you want to provide such as tickets related to changes in the software, affected files, screenshots, etc.
placeholder: |
Add any other context about the update here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-v4l/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for requesting this update! We will get back to you as soon as possible.

43
.github/ISSUE_TEMPLATE/05-org-task.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: ✅ Organizational task
description: Create a task for project organization
labels: [needs-triage, organization]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to get organizational things done. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: Describe the task
placeholder: These things need to be done.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Doing Y is needed for Z.
- type: textarea
id: environment
attributes:
label: Additional Information
description: Additional information you want to provide such as the context for bigger tasks, the implicatons on existing workflows, related issues, etc.
placeholder: |
Add any other context about the task here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-v4l/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for adding this task! We will get back to you as soon as possible.

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: XLibre Community Support
url: https://github.com/orgs/X11Libre/discussions
about: Please ask and answer questions here.
- name: Mailing List
url: https://www.freelists.org/list/xlibre
about: You can join the discussions on our mailing list.

28
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
permissions:
contents: write
on:
push:
pull_request:
jobs:
# This driver is Linux-only
ubuntu:
strategy:
matrix:
xserver-version: [ master, xlibre-xserver-25.1.1, xlibre-xserver-25.0.0.20 ]
runs-on: ubuntu-latest
steps:
- uses: X11Libre/action-build-driver/target/ubuntu@v0.3.7
with:
xserver-version: ${{ matrix.xserver-version }}
release-notes:
name: Release pushed tag
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }}
needs: ubuntu
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: X11Libre/action-build-driver/release@v0.3.7

77
.gitignore vendored Normal file
View File

@@ -0,0 +1,77 @@
#
# X.Org module default exclusion patterns
# The next section if for module specific patterns
#
# Do not edit the following section
# GNU Build System (Autotools)
aclocal.m4
autom4te.cache/
autoscan.log
compile
config.guess
config.h
config.h.in
config.log
config-ml.in
config.py
config.status
config.status.lineno
config.sub
configure
configure.scan
depcomp
.deps/
INSTALL
install-sh
.libs/
libtool
libtool.m4
ltmain.sh
lt~obsolete.m4
ltoptions.m4
ltsugar.m4
ltversion.m4
Makefile
Makefile.in
mdate-sh
missing
mkinstalldirs
*.pc
py-compile
stamp-h?
symlink-tree
texinfo.tex
ylwrap
# Do not edit the following section
# Edit Compile Debug Document Distribute
*~
*.[0-9]
*.[0-9]x
*.bak
*.bin
core
*.dll
*.exe
*-ISO*.bdf
*-JIS*.bdf
*-KOI8*.bdf
*.kld
*.ko
*.ko.cmd
*.lai
*.l[oa]
*.[oa]
*.obj
*.patch
*.so
*.pcf.gz
*.pdb
*.tar.bz2
*.tar.gz
#
# Add & Override patterns for xf86-video-v4l
#
# Edit the following section as needed
# For example, !report.pc overrides *.pc. See 'man gitignore'
#

0
AUTHORS Normal file
View File

12
COPYING Normal file
View File

@@ -0,0 +1,12 @@
This is a stub file. This package has not yet had its complete licensing
information compiled. Please see the individual source files for details on
your rights to use and modify this software.
Please submit updated COPYING files to the Xorg bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
All licensing questions regarding this software should be directed at the
Xorg mailing list:
http://lists.freedesktop.org/mailman/listinfo/xorg

0
ChangeLog Normal file
View File

1
Makefile.am Normal file
View File

@@ -0,0 +1 @@
SUBDIRS = src man

0
NEWS Normal file
View File

15
autogen.sh Executable file
View File

@@ -0,0 +1,15 @@
#! /bin/sh
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
autoreconf -v --install || exit 1
cd $ORIGDIR || exit $?
git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
git config --local format.subjectPrefix "PATCH xf86-video-v4l"
$srcdir/configure --enable-maintainer-mode "$@"

10
configure.ac Normal file
View File

@@ -0,0 +1,10 @@
AC_PREREQ([2.60])
AC_INIT([xlibre-xf86-video-v4l],
[25.0.1],
[https://github.com/X11Libre/xf86-video-v4l/issues],
[xlibre-xf86-video-v4l])
XLIBRE_INIT_MODULE_AM(v4l)
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
AC_OUTPUT

12
man/Makefile.am Normal file
View File

@@ -0,0 +1,12 @@
# SPDX-License-Identifier: MIT OR X11
#
# Copyright © 2026 Enrico Weigelt, metux IT consult <info@metux.net>
#
drvmandir = @xlibre_driver_man_dir@
drvman_DATA = @xlibre_driver_name@.@xlibre_driver_man_section@
CLEANFILES = $(drvman_DATA)
.man.@xlibre_driver_man_section@:
cp $< $@

View File

@@ -1,7 +1,6 @@
.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.man,v 1.3 2001/05/29 22:24:06 dawes Exp $
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH V4L __drivermansuffix__ __vendorversion__
.TH V4L 4 2026-01-30 "X Version 11"
.SH NAME
v4l \- video4linux driver
.SH SYNOPSIS
@@ -12,14 +11,18 @@ v4l \- video4linux driver
.B EndSection
.fi
.SH DESCRIPTION
.B v4l
is an XFree86 driver for video4linux cards. It provides a Xvideo
extention port for video overlay. Just add the driver to the module
list within the module section of your XF86Config file if you want
to use it. There are no config options.
.B v4l
is an
.B Xorg
driver for video4linux cards.
It provides a Xvideo extension port for video overlay.
Just add the driver to the module list within the module section of your
.B xorg.conf
file if you want to use it.
There are no config options.
.P
Note that the the extmod module is also required for the Xvideo
support (and lots of other extentions too).
Note that the extmod module is also required for the Xvideo
support (and lots of other extensions too).
.SH SUPPORTED HARDWARE
The
.B v4l
@@ -30,10 +33,14 @@ overlay.
bt848/bt878-based TV cards are the most popular hardware these
days.
.SH CONFIGURATION DETAILS
Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
Please refer to
.BR xorg.conf (5)
for general configuration details.
This section only covers configuration details specific to this driver.
.SH "SEE ALSO"
XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.BR Xorg (1),
.BR Xserver (1),
.BR xorg.conf (5),
.BR X (7)
.SH AUTHORS
Authors include: Gerd Knorr <kraxel@bytesex.org>

12
src/Makefile.am Normal file
View File

@@ -0,0 +1,12 @@
# SPDX-License-Identifier: MIT OR X11
#
# Copyright © 2026 Enrico Weigelt, metux IT consult <info@metux.net>
#
AM_CFLAGS = $(XLIBRE_SERVER_CFLAGS)
v4l_drv_la_LTLIBRARIES = v4l_drv.la
v4l_drv_la_LDFLAGS = -module -avoid-version
v4l_drv_ladir = @xlibre_video_drivers_dir@
v4l_drv_la_SOURCES = v4l.c videodev2.h

1603
src/v4l.c

File diff suppressed because it is too large Load Diff

View File

@@ -1,255 +0,0 @@
#ifndef __LINUX_VIDEODEV_H
#define __LINUX_VIDEODEV_H
/* Linux V4L API, Version 1
* videodev.h from v4l driver in Linux 2.2.3
*
* Used here with the explicit permission of the original author, Alan Cox.
* <alan@lxorguk.ukuu.org.uk>
*/
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/v4l/videodev.h,v 1.8 2001/03/03 22:46:31 tsi Exp $ */
#include "Xmd.h"
#define VID_TYPE_CAPTURE 1 /* Can capture */
#define VID_TYPE_TUNER 2 /* Can tune */
#define VID_TYPE_TELETEXT 4 /* Does teletext */
#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
#define VID_TYPE_CLIPPING 32 /* Can clip */
#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
#define VID_TYPE_SCALES 128 /* Scalable */
#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
struct video_capability
{
char name[32];
int type;
int channels; /* Num channels */
int audios; /* Num audio devices */
int maxwidth; /* Supported width */
int maxheight; /* And height */
int minwidth; /* Supported width */
int minheight; /* And height */
};
struct video_channel
{
int channel;
char name[32];
int tuners;
CARD32 flags;
#define VIDEO_VC_TUNER 1 /* Channel has a tuner */
#define VIDEO_VC_AUDIO 2 /* Channel has audio */
CARD16 type;
#define VIDEO_TYPE_TV 1
#define VIDEO_TYPE_CAMERA 2
CARD16 norm; /* Norm set by channel */
};
struct video_tuner
{
int tuner;
char name[32];
unsigned long rangelow, rangehigh; /* Tuner range */
CARD32 flags;
#define VIDEO_TUNER_PAL 1
#define VIDEO_TUNER_NTSC 2
#define VIDEO_TUNER_SECAM 4
#define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */
#define VIDEO_TUNER_NORM 16 /* Tuner can set norm */
#define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */
CARD16 mode; /* PAL/NTSC/SECAM/OTHER */
#define VIDEO_MODE_PAL 0
#define VIDEO_MODE_NTSC 1
#define VIDEO_MODE_SECAM 2
#define VIDEO_MODE_AUTO 3
CARD16 signal; /* Signal strength 16bit scale */
};
struct video_picture
{
CARD16 brightness;
CARD16 hue;
CARD16 colour;
CARD16 contrast;
CARD16 whiteness; /* Black and white only */
CARD16 depth; /* Capture depth */
CARD16 palette; /* Palette in use */
#define VIDEO_PALETTE_GREY 1 /* Linear greyscale */
#define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */
#define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */
#define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */
#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
#define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */
#define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */
#define VIDEO_PALETTE_YUYV 8
#define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */
#define VIDEO_PALETTE_YUV420 10
#define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */
#define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */
#define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */
#define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */
#define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */
#define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */
#define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */
#define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */
};
struct video_audio
{
int audio; /* Audio channel */
CARD16 volume; /* If settable */
CARD16 bass, treble;
CARD32 flags;
#define VIDEO_AUDIO_MUTE 1
#define VIDEO_AUDIO_MUTABLE 2
#define VIDEO_AUDIO_VOLUME 4
#define VIDEO_AUDIO_BASS 8
#define VIDEO_AUDIO_TREBLE 16
char name[16];
#define VIDEO_SOUND_MONO 1
#define VIDEO_SOUND_STEREO 2
#define VIDEO_SOUND_LANG1 4
#define VIDEO_SOUND_LANG2 8
CARD16 mode;
CARD16 balance; /* Stereo balance */
CARD16 step; /* Step actual volume uses */
};
struct video_clip
{
INT32 x,y;
INT32 width, height;
struct video_clip *next; /* For user use/driver use only */
};
struct video_window
{
CARD32 x,y; /* Position of window */
CARD32 width,height; /* Its size */
CARD32 chromakey;
CARD32 flags;
struct video_clip *clips; /* Set only */
int clipcount;
#define VIDEO_WINDOW_INTERLACE 1
#define VIDEO_CLIP_BITMAP -1
/* bitmap is 1024x625, a '1' bit represents a clipped pixel */
#define VIDEO_CLIPMAP_SIZE (128 * 625)
};
struct video_capture
{
CARD32 x,y; /* Offsets into image */
CARD32 width, height; /* Area to capture */
CARD16 decimation; /* Decimation divder */
CARD16 flags; /* Flags for capture */
#define VIDEO_CAPTURE_ODD 0 /* Temporal */
#define VIDEO_CAPTURE_EVEN 1
};
struct video_buffer
{
void *base;
int height,width;
int depth;
int bytesperline;
};
struct video_mmap
{
unsigned int frame; /* Frame (0 - n) for double buffer */
int height,width;
unsigned int format; /* should be VIDEO_PALETTE_* */
};
struct video_key
{
CARD8 key[8];
CARD32 flags;
};
#define VIDEO_MAX_FRAME 32
struct video_mbuf
{
int size; /* Total memory to map */
int frames; /* Frames */
int offsets[VIDEO_MAX_FRAME];
};
#define VIDEO_NO_UNIT (-1)
struct video_unit
{
int video; /* Video minor */
int vbi; /* VBI minor */
int radio; /* Radio minor */
int audio; /* Audio minor */
int teletext; /* Teletext minor */
};
#define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */
#define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */
#define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */
#define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */
#define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */
#define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */
#define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */
#define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */
#define VIDIOCGWIN _IOR('v',9, struct video_window) /* Set the video overlay window */
#define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */
#define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */
#define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */
#define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */
#define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */
#define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */
#define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */
#define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */
#define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */
#define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */
#define VIDIOCGMBUF _IOR('v', 20, struct video_mbuf) /* Memory map buffer info */
#define VIDIOCGUNIT _IOR('v', 21, struct video_unit) /* Get attached units */
#define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get frame buffer */
#define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set frame buffer - root only */
#define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */
#define VID_HARDWARE_BT848 1
#define VID_HARDWARE_QCAM_BW 2
#define VID_HARDWARE_PMS 3
#define VID_HARDWARE_QCAM_C 4
#define VID_HARDWARE_PSEUDO 5
#define VID_HARDWARE_SAA5249 6
#define VID_HARDWARE_AZTECH 7
#define VID_HARDWARE_SF16MI 8
#define VID_HARDWARE_RTRACK 9
#define VID_HARDWARE_ZOLTRIX 10
#define VID_HARDWARE_SAA7146 11
#define VID_HARDWARE_VIDEUM 12 /* Reserved for Winnov videum */
#define VID_HARDWARE_RTRACK2 13
#define VID_HARDWARE_PERMEDIA2 14 /* Reserved for Permedia2 */
#define VID_HARDWARE_RIVA128 15 /* Reserved for RIVA 128 */
#define VID_HARDWARE_PLANB 16 /* PowerMac motherboard video-in */
#define VID_HARDWARE_BROADWAY 17 /* Broadway project */
#define VID_HARDWARE_GEMTEK 18
#define VID_HARDWARE_TYPHOON 19
#define VID_HARDWARE_VINO 20 /* Reserved for SGI Indy Vino */
/*
* Initialiser list
*/
struct video_init
{
char *name;
int (*init)(struct video_init *);
};
#endif

1929
src/videodev2.h Normal file

File diff suppressed because it is too large Load Diff