Application developing hints
Some hints for developer who wishes to use Video4Linux API on Solaris...
Compilation Procedure
To compile with bt8x8x, add
-I/opt/KSWbt8x8/include/ into C compiler flags, and then
insert preprocessor directive
#include "solaris/videodev.h"
or
#include "linux/videodev.h"
or simply
#include "videodev.h"
into your code.
API Compatibility with Video4Linux
- Following ioctls are not supported and you will get EOPNOTSUPP:
VIDIOCCAPTURE, VIDIOCGWIN, VIDIOCSWIN, VIDIOCGFBUF, VIDIOCSFBUF,
VIDIOCKEY, VIDIOCGUNIT, VIDIOCGCAPTURE, VIDIOCSCAPTURE
and other BTTV specific private ioctls.
- RGB555, RGB565, RGB32 palette are byte-order dependant (same as
BTTV with bigendian option). With these palettes, image data obeys
CPU endian. Other palettes are byte-order independent.
- Byte-order of Sun's frame buffer differs from models.
-
Here is a summary of quick survey, please don't trust it without your test.
Platforms
| RGB32 (byte)
| RGB32 (uint)
| RGB24 (byte)
| RGB565 (byte)
| RGB565 (ushort)
| RGB555 (byte)
| RGB555 (ushort)
|
+0 | +1 | +2 | +3
| +0 | +1 | +2
| +0 | +1
| +0 | +1
|
|
BTTV at ia32
| B | G | R | A
| ARGB
| B | G | R
| GLB
| RGH
| R5G6B5
| GLB
| ARGH
| A1R5G5B5
|
bt848x at SPARC
| A | R | G | B
| ARGB
| B | G | R
| RGH | GLB
| R5G6B5
| ARGH | GLB
| A1R5G5B5
|
bt848x at x86
| B | G | R | A
| ARGB
| B | G | R
| GLB | RGH
| R5G6B5
| GLB | ARGH
| A1R5G5B5
|
PGX64 at SDL
| A | R | G | B
| ARGB
| R | G | B
| RGH | GLB
| R5G6B5
| ARGH | GLB
| A1R5G5B5
|
FFB at SDL
| A | B | G | R
| ABGR
| R | G | B
| RGH | GLB
| R5G6B5
| ARGH | GLB
| A1R5G5B5
|
Capture Width Problem
Width of capture area should be dividable by 16 for VIDEO_PALETTE_YUV4xxP,
and should be dividable by 4 for VIDEO_PALETTE_YUV4xx.
If not so, driver silently ignores it, and generates odd images.