Skip to content

RFC v4l2 stateless tracer/retracer utilities

Deborah Brouwer linux-media 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2utils: add stateless tracer utilityconfigure.ac utils/Makefile.am utils/common/v4l2-info.cpp +11 more+1799 -61 reply
2/2utils: add stateless retracer utilityutils/tracer/Makefile.am utils/tracer/retrace-helper.cpp utils/tracer/retrace-helper.h +4 more+1577 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/2] v4l2 stateless tracer/retracer utilities

This project helps to test v4l2 stateless decoder drivers by tracing, recording and replaying (i.e. "retracing") userspace's interaction with a stateless decoder driver.

The tracer utility attaches to a userspace application and generates a json file with relevant system calls, parameters and encoded data.

The retracer utility reads the json-file and makes the same system calls to a v4l2 stateless driver. Since the retracer is independent from the original userspace application that was traced, testing can be decoupled from extraneous factors in the userspace environment. The json-file can also be edited to inject errors and test a driver's error-handling abilities.

NOTE:
This project is work in progress and currently only traces VP8, but H264 and FWHT will follow shortly.

EXAMPLE:
./tracer gst-launch-1.0 -- filesrc location=<some_vp8_file> ! parsebin ! v4l2slvp8dec ! videocodectestsink

./retracer 10284_trace.json

FURTHER INFO AND TEST FILES:
https://gitlab.collabora.com/dbrouwer/v4l2-stateless-tracer-utility/-/tree/main/

Deborah Brouwer (2):
utils: add stateless tracer utility
utils: add stateless retracer utility

 configure.ac                    |    6 +
 utils/Makefile.am               |    5 +
 utils/common/v4l2-info.cpp      |    7 +-
 utils/common/v4l2-info.h        |    8 +
 utils/tracer/.gitignore         |    9 +
 utils/tracer/Makefile.am        |   23 +
 utils/tracer/libtracer.cpp      |  217 ++++++
 utils/tracer/libtracer.h        |   92 +++
 utils/tracer/retrace-helper.cpp |  141 ++++
 utils/tracer/retrace-helper.h   |   18 +
 utils/tracer/retrace-vp8.cpp    |  288 ++++++++
 utils/tracer/retrace-vp8.h      |   11 +
 utils/tracer/retracer.cpp       | 1090 +++++++++++++++++++++++++++++++
 utils/tracer/retracer.h         |   24 +
 utils/tracer/trace-helper.cpp   |  218 +++++++
 utils/tracer/trace-info.cpp     |  358 ++++++++++
 utils/tracer/trace-info.h       |   72 ++
 utils/tracer/trace-vp8.cpp      |  183 ++++++
 utils/tracer/trace.cpp          |  520 +++++++++++++++
 utils/tracer/tracer.cpp         |   91 +++
 20 files changed, 3375 insertions(+), 6 deletions(-)
 create mode 100644 utils/tracer/.gitignore
 create mode 100644 utils/tracer/Makefile.am
 create mode 100644 utils/tracer/libtracer.cpp
 create mode 100644 utils/tracer/libtracer.h
 create mode 100755 utils/tracer/retrace-helper.cpp
 create mode 100644 utils/tracer/retrace-helper.h
 create mode 100755 utils/tracer/retrace-vp8.cpp
 create mode 100644 utils/tracer/retrace-vp8.h
 create mode 100755 utils/tracer/retracer.cpp
 create mode 100644 utils/tracer/retracer.h
 create mode 100644 utils/tracer/trace-helper.cpp
 create mode 100644 utils/tracer/trace-info.cpp
 create mode 100644 utils/tracer/trace-info.h
 create mode 100644 utils/tracer/trace-vp8.cpp
 create mode 100644 utils/tracer/trace.cpp
 create mode 100644 utils/tracer/tracer.cpp
Signature · 1 line
2.37.1