v4l2-ctl: add support for custom bytesperline values.

The V4L2 API allows application to select a bytesperline value that's larger
than what the driver gives you, effectively padding each line.

Add support to v4l2-ctl to set custom bytesperline values when trying/setting
new formats.

This also fixes a bug where setting multiplanar formats failed: in the *_cmd
function the is_multiplanar global variable isn't set yet because the device
hasn't been opened. So it always assumed a single planar format.

The fixed code is actually cleaner than what I had before.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
qv4l2: increase max width/height to 4K resolution.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
v4l2-ctl: fix printing of buffer flags

Don't include timestamp_type and src masks with the buffer flags, those
are handled separately.

I also made a small change when capturing: if verbose is true then also
dump the contents of buffers marked with state ERROR.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
v4l-utils: bugfix memory chunk

>From a5cfa1881de152a887d195e8c880dcca3e6b766e Mon Sep 17 00:00:00 2001

Bug 1070855 - [abrt] v4l-utils: parse_string(): dvbv5-scan killed by SIGABRT
https://bugzilla.redhat.com/show_bug.cgi?id=1070855

Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
v4l-utils: sync to latest kernel headers

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
v4l2-ctl: add EDID get and set options

Signed-off-by: Martin Bugge <marbugge@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
v4l2-ctl: add --clear-edid option.

Also make sure the --set-edid doesn't accidentally clear the EDID if the
file contains no data.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
v4l2-ctl: rename old v4l2_subdev_edid and VIDIOC_SUBDEV_G/S_EDID

I forgot to rename those old names to the new ones.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Martin Bugge <marbugge@cisco.com>
v4l2-compliance: add test setting all enumerated timings.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
v4l2-compliance: add G/S_EDID tests.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
libv4lconvert: remove broken ALTERNATE handling

The V4L2 specification used to say that if field == V4L2_FIELD_ALTERNATE, the
height would have to be divided by two. This is incorrect, the height is that of
a single field. This has been corrected in the spec, now this code in libv4lconvert
needs to be removed as well.

Tested with both bttv and saa7146, the only two drivers supporting FIELD_ALTERNATE
today.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
dvbv5-zap: only start audio filtering if audio PID > 0

When used with -P, audio filter PID is zero. Yet, it is
currently starting an audio PID filter. This could cause
troubles with some hardware filters.

As PID is always bigger than zero, this patch should fix
the issue.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
libdvbv5: Frequency is unsigned. use %u to print it

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
libdvbv5: support info info log via dvb_loginfo

dvb_loginfo log support without setting output color.

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

- allow logging in dvb_vchannel
- get rid of compile warings about unused asprintf return value

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

Implement parsers for mpeg TS, PES and ES

Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
libdvbv5: fix EIT parsing

the dvb_table_eit_event now contains the service_id,
indicating where the events belong to.

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