0c078e310b
A virtual stateless device for stateless uAPI development purposes. This tool's objective is to help the development and testing of userspace applications that use the V4L2 stateless API to decode media. A userspace implementation can use visl to run a decoding loop even when no hardware is available or when the kernel uAPI for the codec has not been upstreamed yet. This can reveal bugs at an early stage. This driver can also trace the contents of the V4L2 controls submitted to it. It can also dump the contents of the vb2 buffers through a debugfs interface. This is in many ways similar to the tracing infrastructure available for other popular encode/decode APIs out there and can help develop a userspace application by using another (working) one as a reference. Note that no actual decoding of video frames is performed by visl. The V4L2 test pattern generator is used to write various debug information to the capture buffers instead. Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Debugfs tracing for bitstream buffers. This is similar to VA-API's
|
|
* LIBVA_TRACE_BUFDATA in that the raw bitstream can be dumped as a debugging
|
|
* aid.
|
|
*
|
|
* Produces one file per OUTPUT buffer. Files are automatically cleared on
|
|
* STREAMOFF unless the module parameter "keep_bitstream_buffers" is set.
|
|
*/
|
|
|
|
#include "visl.h"
|
|
#include "visl-dec.h"
|
|
|
|
#ifdef CONFIG_VISL_DEBUGFS
|
|
|
|
int visl_debugfs_init(struct visl_dev *dev);
|
|
int visl_debugfs_bitstream_init(struct visl_dev *dev);
|
|
void visl_trace_bitstream(struct visl_ctx *ctx, struct visl_run *run);
|
|
void visl_debugfs_clear_bitstream(struct visl_dev *dev);
|
|
void visl_debugfs_bitstream_deinit(struct visl_dev *dev);
|
|
void visl_debugfs_deinit(struct visl_dev *dev);
|
|
|
|
#else
|
|
|
|
static inline int visl_debugfs_init(struct visl_dev *dev)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int visl_debugfs_bitstream_init(struct visl_dev *dev)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void visl_trace_bitstream(struct visl_ctx *ctx, struct visl_run *run) {}
|
|
static inline void visl_debugfs_clear_bitstream(struct visl_dev *dev) {}
|
|
static inline void visl_debugfs_bitstream_deinit(struct visl_dev *dev) {}
|
|
static inline void visl_debugfs_deinit(struct visl_dev *dev) {}
|
|
|
|
#endif
|