Skip to content
Snippets Groups Projects
Commit 15339a08 authored by Mattijs Korpershoek's avatar Mattijs Korpershoek Committed by Vishal Mahaveer
Browse files

V4L2Decoder: Use TRY_DECODER_CMD when checking flush support

Commit 05617941 ("V4L2Device: Refactor querying capabilities")
changed behaviour when testing if V4L2_DEC_CMD_STOP is supported
by the device.

Before, it used VIDIOC_TRY_DECODER_CMD
Now, it uses VIDIOC_DECODER_CMD

According to the kernel docs [1], VIDIOC_TRY_DECODER_CMD can be used to
try a command without actually executing it.

In V4L2Decoder::start(), it seems we want to try if V4L2_DEC_CMD_STOP is
supported, not actually executing it.

Introduce a new helper function, tryV4L2DecoderCmd() to do so and use
that instead.

[1] https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/vidioc-decoder-cmd.html#description
Fixes: 05617941 ("V4L2Device: Refactor querying capabilities")
Link: https://android-review.googlesource.com/c/platform/external/v4l2_codec2/+/3301216


Change-Id: I523baa430951c65aa904cdb9f5636bb424ab2dd6
Signed-off-by: default avatarGuillaume La Roque <glaroque@baylibre.com>
Signed-off-by: default avatarMattijs Korpershoek <mkorpershoek@baylibre.com>
parent 8674604b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment