Age | Commit message (Collapse) | Author | Files | Lines |
|
This option sets the CEC_MSG_FL_RAW flag.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Currently a buftype was only marked as valid in node->valid_buftypes
if G_FMT returned 0 AND the validation of the returned v4l2_format
was also successful. But this gave bad knock-on effects in later tests.
So mark the buftype as valid if G_FMT returns 0, independent of the
later tests.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Output UTF8 instead of Latin1 for better locale support.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
In locales such as el_GR.UTF-8, sterror() returns localised error
messages, which get printed as question marks due to the conversion
in QString::toLatin1().
Calling QString::toUtf8 instead, corrects this error.
Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Disable spurious tracing messages in the get_codec_type() and
do_setup_out_buffers() functions.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Commit 0efd87d40586 ("v4l2-compliance: fix and comment out qbuf test")
commented out this qbuf test, but it can now be enabled again since
the vb2 bug that caused the failure has now been fixed.
The vb2 fix was commit 1f7f11e8ca15 ("videobuf2-v4l2.c: move up
STATE_DEQUEUED check").
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Use color codes to mark OK, warn, and FAIL messages with green, bold,
and bright red accents, respectively.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Use the warn() macro in warn_once() instead of duplicating its contents.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Use color codes to mark OK, warn, and FAIL messages with green, bold,
and bright red accents, respectively.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Use the warn() macro in warn_once() instead of duplicating its contents.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Signed-off-by: Sean Young <sean@mess.org>
|
|
When trying to stream twice from the same device the second attempt
silently exits since REQBUFS returns EBUSY. The problem is that there
is no feedback of the ioctl error to the user, and that is because
the ioctl tracing is disabled before REQBUFS is called.
Change the code to be a bit more refined w.r.t. what is traced and
what isn't.
Now a proper error code is shown.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The fail_on_test(qbuf()) check was missing a !.
But if after this correctly-failing qbuf() the querybuf ioctl is
called again, all the request information is dropped from the result.
So comment this out while a investigation this.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: 7ee189ecae01 ("v4l2-compliance: fix request API test")
|
|
Signed-off-by: Sean Young <sean@mess.org>
|
|
replace 'set_fwht_ext_ctrls' with 'set_fwht_ext_ctrl'
in debug prints
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
declare the hdr param with 'const' in
functions that use fwht header in order
to set the fwht stateless params.
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
When reading from a compressed file the amount of data read
can be less than the buffer size. Don't warn about that, it's
perfectly normal.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
When a source change event arrives during decoding get the new
format at that point instead of after restarting streaming.
If there is another source change queued up, then when you call
streamon for CAPTURE again it might send the new source change
event and update the format for that one, so reading the format
after streamon might give the wrong format.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The last argument for do_handle_out was set to true instead of false,
causing do_handle_out to think that the stateless decoder had stopped.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The vicodec driver's media controller supports requests, but the
stateful en/decoder video nodes do not: improve the request API
test to handle this somewhat uncommon case.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
- Don't test the 'no poll' streaming case: it doesn't really work since
there is no reliable 1-1 mapping of output and capture buffers.
- Check the EOS event.
- Test CMD_STOP.
- Test V4L2_BUF_FLAG_LAST.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Stateful encoders require the presence of EVENT_EOS.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
This control is required for stateful encoders.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Stateful encoders must support ENUM_FRAMESIZES.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The stateful codecs require the encoder or decoder command ioctls.
Check this.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
In setupMmap() the fill_output_buffer() function was never called
for the first output buffer, so it was never filled with data
when reading from a file.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
For m2m devices the pre-queued output buffers need to be taken
into account when calculating the number of frames that have
been streamed.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Several queueing related functions return -1 on error and
-2 to indicate that the queue is stopped (i.e. no more
buffers should be queued).
Use defines for these two values to make the code more readable.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
do_handle_cap assumed that it could skip frame counting for m2m
devices, but that's not true. It should count frames for
stateful encoders and for the cap2out streaming use-case.
So make this an argument to do_handle_cap instead.
Also fix various issues with detecting when the output side of
an m2m device is stopped (e.g. because --stream-count buffers
have been queued up).
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Empty frames and error frames should not decrement the counter
set by --stream-count. Only count valid non-empty frames.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
If a source change events arrives, then streaming stops, all buffers
are reallocated and streaming restarts, but then various internal
counters have to be reset since streaming starts with a clean slate.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
In do_handle_out() when the buffer information was logged the
bytesused value was always 0. Move the code the clears this field
to *after* the logging function so the actual values are logged.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
stateless_m2m() didn't free allocated resources.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Add code to support the stateless decoder
and the function 'stateless_m2m' that implements it.
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil-cisco@xs4all.nl: use g_timestamp_ns instead of get_ns_timestamp]
|
|
Add the variable 'last_fwht_bf_ts' and the array 'fwht_reqs' to
allow the fwht stateless decoder to maintain the requests.
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil-cisco@xs4all.nl: dropped get_ns_timestamp]
|
|
Add helper to return a v4l2_buffer timestamp as nanoseconds.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
v4l2-ctl-streaming.cpp: In function ‘__u32 read_u32(FILE*)’:
v4l2-ctl-streaming.cpp:434:7: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fread(&v, 1, sizeof(v), f);
^
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
|
If the given pixelformat was invalid, then it was silently replaced
by the driver with a default format. Give an error instead and
bail out.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
With the G/S/TRY_FMT ioctls the -BE suffix to a fourcc was handled
correctly, but this was not supported for the ENUM_FRAMESIZES and
the ENUM_FRAMEINTERVALS ioctls.
Support it there as well.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Instead of changing the adapter test itself (and thus hiding
the very real vivid bug), we drop the -A option in test-media
instead.
This reverts commit 336df387b517572f06d37bbc79a9337804291530.
|
|
The vivid's CEC emulation isn't perfect (it doesn't handle
Arbitration Lost situations properly). So disable some warnings
when the vivid emulation is detected.
This should be reverted once vivid is eventually fixed.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Fixes commit 8e695c1d3403 ("v4l2-ctl-streaming.cpp: use cv4l-helpers.h")
which used g_bytesused() and g_data_offset() instead of explicitly
specifying the plane index as argument.
So it would only take bytesused and data_offset from the first plane.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: Benoit Parrot <bparrot@ti.com>
|
|
If the link is dynamic, then it is a failure if MEDIA_LNK_FL_IMMUTABLE
is set (the two are mutually exclusive). But the test was the wrong
way around. Fix this.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: Tomasz Figa <tfiga@chromium.org>
|
|
The previous commit accidentally broke one error code check where
EINVAL was changed to EBADR when it shouldn't.
Revert that part of the commit.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
If requests are used when they shouldn't, or not used when they should,
then EBADR (Invalid request descriptor) is now returned instead of EACCES.
Update the compliance tests accordingly.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Synchronize with the latest headers from the media master tree.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
My e-mail has changed over the years. Due to that, people still
send me bug reports to e-mails I don't use anymore for upstream
stuff, or even send e-mails to addresses that doesn't exist
anymore.
So, let's put an order at the house, using just the canonical
e-mail mchehab@kernel.org, as this e-mail should always point
to my current e-mail preference.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
|
do_handle_cap() returns -2 if EPIPE what returned, and it should
also return -2 when stream_count reaches 0 since -2 indicates
end-of-stream.
But when capturing the error code was only checks for -1 instead
of < 0. Fix this as well.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
When streaming for m2m devices the stream-count should be exact
and work even for e.g. --stream-count=1.
This means that when filling in the initial output buffers, no more
than stream_count buffers should be filled, even for count values
less than the number of allocated buffers.
This also means that STOP should be issued right after filling in
the buffers if stream_count has already reached 0.
This patch also is more precise when > or < is printed and when
the buffer contents (--verbose) is shown.
'<' is shown after a capture buffer is dequeued.
'>' is shown after an output buffer is queued.
The buffer contents is always shown after a buffer is dequeued.
For capture or output devices the stream count refers to the number
of dequeued buffers, and the number of queued buffers is
more than that (number of allocated buffers + stream_count).
For m2m devices the stream_count refers to the number of queued
output buffers.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Running 'ir-keytable --device /dev/input/event24 -p rc5' does not work
since ir-keytable cannot find an rc device via the input device name.
Simply remove this options from ir-keytable since it is not useful and
is only misleading.
Signed-off-by: Sean Young <sean@mess.org>
|