~libv4l/libv4l/dev

« back to all changes in this revision

Viewing changes to utils/v4l2-compliance/v4l2-compliance.h

  • Committer: Hans Verkuil
  • Author(s): André Almeida
  • Date: 2019-08-12 12:13:10 UTC
  • Revision ID: git-v1:8d411705aa29f3ad77a4d48797b7ad07bfcce471
v4l2-compliance: split node at testNode() in two nodes

v4l2-compliance tests deals with memory-to-memory devices (m2m) like
they are a single device, through the struct node. This is indeed the
most usual case. However, there are m2m devices that have two
separated devices for the capture queue and for the output queue, and
the current design does not support they.

Split the node on testNode and related functions in two arguments:
struct node node and struct node node_m2m_cap. For now, use the same node in
both arguments.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Show diffs side-by-side

added added

removed removed

Lines of Context:
258
258
int check_ustring(const __u8 *s, int len);
259
259
int check_0(const void *p, int len);
260
260
int restoreFormat(struct node *node);
261
 
void testNode(struct node &node, struct node &expbuf_node, media_type type,
 
261
void testNode(struct node &node, struct node &node_m2m_cap, struct node &expbuf_node, media_type type,
262
262
              unsigned frame_count, unsigned all_fmt_frame_count);
263
263
std::string stream_from(std::string pixelformat, bool &use_hdr);
264
264
 
331
331
int testReadWrite(struct node *node);
332
332
int testExpBuf(struct node *node);
333
333
int testBlockingWait(struct node *node);
334
 
int testMmap(struct node *node, unsigned frame_count, enum poll_mode pollmode);
335
 
int testUserPtr(struct node *node, unsigned frame_count, enum poll_mode pollmode);
336
 
int testDmaBuf(struct node *expbuf_node, struct node *node, unsigned frame_count,
 
334
/*
 
335
 * struct node node:
 
336
 *      the current media node being tested
 
337
 *
 
338
 * struct node node_m2m_cap:
 
339
 *      the capture device to be used when testing loopback or m2m, for
 
340
 *      instance, if the node we are testing is m2m, then node == node_m2m_cap,
 
341
 *      but if we have a topology like output->capture, node will be the output
 
342
 *      and node_m2m_cap will be the capture device that v4l2-compliance will
 
343
 *      use to test the loop
 
344
 */
 
345
int testMmap(struct node *node, struct node *node_m2m_cap, unsigned frame_count,
 
346
             enum poll_mode pollmode);
 
347
int testUserPtr(struct node *node, struct node *node_m2m_cap,
 
348
                unsigned frame_count, enum poll_mode pollmode);
 
349
int testDmaBuf(struct node *expbuf_node, struct node *node,
 
350
               struct node *node_m2m_cap, unsigned frame_count,
337
351
               enum poll_mode pollmode);
338
352
int testRequests(struct node *node, bool test_streaming);
339
353
void streamAllFormats(struct node *node, unsigned frame_count);