public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Deborah Brouwer <deborah.brouwer@collabora.com>
To: linux-media@vger.kernel.org
Cc: daniel.almeida@collabora.com, nfraprado@collabora.com,
	nicolas.dufresne@collabora.com, hverkuil-cisco@xs4all.nl,
	Deborah Brouwer <deborah.brouwer@collabora.com>
Subject: [RFC 0/2] v4l2 stateless tracer/retracer utilities
Date: Fri, 19 Aug 2022 17:50:17 -0700	[thread overview]
Message-ID: <cover.1660955263.git.deborah.brouwer@collabora.com> (raw)

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

-- 
2.37.1


             reply	other threads:[~2022-08-20  0:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-20  0:50 Deborah Brouwer [this message]
2022-08-20  0:50 ` [RFC 1/2] utils: add stateless tracer utility Deborah Brouwer
2022-08-26 19:18   ` Nicolas Dufresne
2022-08-20  0:50 ` [RFC 2/2] utils: add stateless retracer utility Deborah Brouwer
2022-08-26 19:05 ` [RFC 0/2] v4l2 stateless tracer/retracer utilities Nicolas Dufresne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1660955263.git.deborah.brouwer@collabora.com \
    --to=deborah.brouwer@collabora.com \
    --cc=daniel.almeida@collabora.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=nfraprado@collabora.com \
    --cc=nicolas.dufresne@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox