EdgeAI TIOVX Apps Guide
v4l2_decode_module.c File Reference
Include dependency graph for v4l2_decode_module.c:

Data Structures

struct  ESdescriptor
 
struct  demux
 
struct  streamContext
 
struct  outBuf
 
struct  v4l2DecodeHandle
 

Macros

#define V4L2_DECODE_DEFAULT_DEVICE   "/dev/video0"
 
#define V4L2_DECODE_DEFAULT_INPUT_FILE   "/opt/edgeai-test-data/videos/video0_1280_768.h264"
 
#define V4L2_DECODE_DEFAULT_BUFQ_DEPTH   4
 
#define V4L2_DECODE_MAX_BUFQ_DEPTH   10
 
#define V4L2_DECODE_MAX_BUFQ_DEPTH_OFFSET   3
 
#define MAX_FRAMES   1000
 
#define MAX_OUTBUFS   4
 
#define ALIGN(x, a)   (((x) + (a) - 1L) & ~((a) - 1L))
 
#define HW_ALIGN   64
 

Functions

void v4l2_decode_init_cfg (v4l2DecodeCfg *cfg)
 
static AVFormatContext * open_stream_file (const char *filename)
 
static AVStream * find_stream (AVFormatContext *afc)
 
struct demuxdemux_init (const char *filename, int *width, int *height, int *bitdepth, enum AVPixelFormat *pix_fmt, enum AVCodecID *codec)
 
int demux_read (struct demux *demux, unsigned char *input, int size)
 
int demux_rewind (struct demux *demux)
 
void demux_deinit (struct demux *demux)
 
int stream_framelevel_parsing (streamContext *str, char *input_file, int max_frames)
 
static int xioctl (int fh, int request, void *arg)
 
int v4l2_decode_check_caps (v4l2DecodeHandle *handle)
 
int v4l2_decode_set_fmt (v4l2DecodeHandle *handle)
 
int v4l2_decode_request_capture_buffers (v4l2DecodeHandle *handle)
 
int v4l2_decode_request_output_buffers (v4l2DecodeHandle *handle)
 
int v4l2_decode_map_output_buffers (v4l2DecodeHandle *handle)
 
int v4l2_decode_enqueue_outbuf (v4l2DecodeHandle *handle)
 
int v4l2_decode_dqueue_outbuf (v4l2DecodeHandle *handle)
 
int v4l2_decode_start_output (v4l2DecodeHandle *handle)
 
v4l2DecodeHandle * v4l2_decode_create_handle (v4l2DecodeCfg *cfg, v4l2DecodeOutFmt *out_fmt)
 
int v4l2_decode_start (v4l2DecodeHandle *handle)
 
int v4l2_decode_enqueue_buf (v4l2DecodeHandle *handle, Buf *tiovx_buffer)
 
Buf * v4l2_decode_dqueue_buf (v4l2DecodeHandle *handle)
 
int v4l2_decode_stop (v4l2DecodeHandle *handle)
 
int v4l2_decode_delete_handle (v4l2DecodeHandle *handle)
 

Macro Definition Documentation

◆ V4L2_DECODE_DEFAULT_DEVICE

#define V4L2_DECODE_DEFAULT_DEVICE   "/dev/video0"

◆ V4L2_DECODE_DEFAULT_INPUT_FILE

#define V4L2_DECODE_DEFAULT_INPUT_FILE   "/opt/edgeai-test-data/videos/video0_1280_768.h264"

◆ V4L2_DECODE_DEFAULT_BUFQ_DEPTH

#define V4L2_DECODE_DEFAULT_BUFQ_DEPTH   4

◆ V4L2_DECODE_MAX_BUFQ_DEPTH

#define V4L2_DECODE_MAX_BUFQ_DEPTH   10

◆ V4L2_DECODE_MAX_BUFQ_DEPTH_OFFSET

#define V4L2_DECODE_MAX_BUFQ_DEPTH_OFFSET   3

◆ MAX_FRAMES

#define MAX_FRAMES   1000

◆ MAX_OUTBUFS

#define MAX_OUTBUFS   4

◆ ALIGN

#define ALIGN (   x,
 
)    (((x) + (a) - 1L) & ~((a) - 1L))

◆ HW_ALIGN

#define HW_ALIGN   64

Function Documentation

◆ v4l2_decode_init_cfg()

void v4l2_decode_init_cfg ( v4l2DecodeCfg cfg)

◆ open_stream_file()

static AVFormatContext* open_stream_file ( const char *  filename)
static

◆ find_stream()

static AVStream* find_stream ( AVFormatContext *  afc)
static

◆ demux_init()

struct demux* demux_init ( const char *  filename,
int *  width,
int *  height,
int *  bitdepth,
enum AVPixelFormat *  pix_fmt,
enum AVCodecID *  codec 
)

◆ demux_read()

int demux_read ( struct demux demux,
unsigned char *  input,
int  size 
)

◆ demux_rewind()

int demux_rewind ( struct demux demux)

◆ demux_deinit()

void demux_deinit ( struct demux demux)

◆ stream_framelevel_parsing()

int stream_framelevel_parsing ( streamContext str,
char *  input_file,
int  max_frames 
)

◆ xioctl()

static int xioctl ( int  fh,
int  request,
void *  arg 
)
static

◆ v4l2_decode_check_caps()

int v4l2_decode_check_caps ( v4l2DecodeHandle *  handle)

◆ v4l2_decode_set_fmt()

int v4l2_decode_set_fmt ( v4l2DecodeHandle *  handle)

◆ v4l2_decode_request_capture_buffers()

int v4l2_decode_request_capture_buffers ( v4l2DecodeHandle *  handle)

◆ v4l2_decode_request_output_buffers()

int v4l2_decode_request_output_buffers ( v4l2DecodeHandle *  handle)

◆ v4l2_decode_map_output_buffers()

int v4l2_decode_map_output_buffers ( v4l2DecodeHandle *  handle)

◆ v4l2_decode_enqueue_outbuf()

int v4l2_decode_enqueue_outbuf ( v4l2DecodeHandle *  handle)

◆ v4l2_decode_dqueue_outbuf()

int v4l2_decode_dqueue_outbuf ( v4l2DecodeHandle *  handle)

◆ v4l2_decode_start_output()

int v4l2_decode_start_output ( v4l2DecodeHandle *  handle)

◆ v4l2_decode_create_handle()

v4l2DecodeHandle* v4l2_decode_create_handle ( v4l2DecodeCfg cfg,
v4l2DecodeOutFmt out_fmt 
)

◆ v4l2_decode_start()

int v4l2_decode_start ( v4l2DecodeHandle *  handle)

◆ v4l2_decode_enqueue_buf()

int v4l2_decode_enqueue_buf ( v4l2DecodeHandle *  handle,
Buf *  tiovx_buffer 
)

◆ v4l2_decode_dqueue_buf()

Buf* v4l2_decode_dqueue_buf ( v4l2DecodeHandle *  handle)

◆ v4l2_decode_stop()

int v4l2_decode_stop ( v4l2DecodeHandle *  handle)

◆ v4l2_decode_delete_handle()

int v4l2_decode_delete_handle ( v4l2DecodeHandle *  handle)