v4l2-ctl: remove unnecessary inclusion of libv4l2.h

These files do not utilize anything from libv4l2.h, hence the include is
not needed.

Signed-off-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
v4l2-compliance/ctl: drop libv4l2 dependency if NO_LIBV4L2 is defined

This patch introduces a check for a NO_LIBV4L2 symbol in v4l2-compliance
and v4l2-ctl, which, when defined, will let the utility be built without
linking with libv4l2.

The wrapper functionality libv4l2 provides is obviously lost when
building with NO_LIBV4L2 defined.

Signed-off-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
[hans.verkuil@cisco.com: modified to reduce number of #ifdefs]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Add static configuration file for Android builds

This patch adds an android-config.h configuration file that matches the
Android toolchain configuration.

It also includes an implementation of getsubopt, with the strchrnul
dependency, since the Android toolchain does not provide this
functionality.

Signed-off-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
[hans.verkuil@cisco.com: made functions inline]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
v4l2-ctl/dbg: include android-config.h header file if ANDROID is set

If the ANDROID symbol is defined, done by Android toolchain by default,
include the android-config.h header file instead of the autogenerated
config.h header file.

Android build system is completely different from autoconf and make, and
is not capable, without some hacks, to generate the config.h header
file.

Signed-off-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
[hans.verkuil@cisco.com: moved config(-android).h include to v4l2-ctl.h]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
v4l2-compliance: add Android.mk makefile

This Android.mk makefile is used by the Android build system to compile
and link the v4l2-compliance utility.

Signed-off-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
v4l2-ctl: add Android.mk makefile

This Android.mk makefile is used by the Android build system to compile
and link the v4l2-ctl utility.

Signed-off-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
v4l2-dbg: add Android.mk makefile

This Android.mk makefile is used by the Android build system to compile
and link the v4l2-dbg utility.

Signed-off-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
INSTALL: add cross compile and install procedures for Android

This patch adds some words in the INSTALL file about how to cross
compile some utilities (compliance, ctl, and dbg) for Android and
install the on a device running Android.

Signed-off-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
libv4lconvert: fix a v4l2-compliance error

memset frmsize->reserved to 0.

fail: v4l2-test-formats.cpp(150): frmsize.reserved not zeroed

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
v4l2-compliance: don't do the global format test when using libv4l2.

This test will fail when using the wrapper library as the wrapper
library does not see when another filehandle changes the format.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
libdvbv5: reunite atsc_table_header and dvb_table_header

this solves the ambiguity when parsing the dvb/atsc header
in dvb-scan.c

Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
libdvbv5: fix asprintf compile warning in dvbv5-scan

Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
libdvbv5: make crc32 public

applications reading dvb files might want to
check crc, therefore provide the crc32 function
in the header files.

Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
libdvbv5: make dvb_table_filter_free public

make dvb_table_filter_free public so it can be used by
applications.
fix potential double free.

Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
libdvbv5: cleanup table parsers

- make the code look similar
- check for correct table ID
- ignore null packets with ID 0x1fff
- return table length, or:
- return error code on error
- update / fix Copyrights

Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
libdvbv5: cleanup printing of tables and descriptors

- use log info for table and descpritor printing
- cleanup 'out of memory' logs
- fix error condition in desc_ts_info

Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
libdvbv5: rename descriptor functions

prefix the descriptor functions with dvb_desc
for a nice API and code completion support

Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
libdvbv5: fix ISDB-T frequency calculus on 32 bits machines

On 32 bits, the frequency got truncated and become a negative
number. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brisa.lan>
libdvbv5: move ISDB-T frq conversion to the descriptors code

Instead of having this done on several places, just do it once,
at the code that parses the ISDB-T descriptor.

This is the same as the other descriptors do.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
libdvbv5: fix the area code size on ISDB-T

The area code has 12 bits, and not 6, accordig with the
ABNT NBR 15603-2:2007 version3 of 2009.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>