Media
1. Function Overview
To facilitate the verification of the camera peripheral functions, a series of CLI commands have been designed. These mainly include camera on/off, H264 pipeline encoding on/off, and image stream reading tests.
2. Code Path
Path:
ap/components/multimedia/cli/media_cli.c
3. CLI Command Introduction
The supported commands are as follows:
- media uvc open
- Function Description
Used to test whether opening UVC is normal.
- Command Format
media uvc open param1 [param2] [param3]
Param
value
param1
the port id of usb(hub), range: [1, 3]
param2
resolution, optional param, reference struct: meida_ppi_t, default 640X480
param3
image format, optional param, output image fmt(h264/h265/yuv/enc_yuv/dual), defalt mjpeg
- Test Case
Test if UVC on port 1 can output an 864X480 MJPEG image stream normally:
media uvc open 1 864X480
- media uvc close
- Function Description
Used to test the UVC shutdown function on a specific port.
- Command Format
media uvc close param1
Param
value
param1
the port id of usb(hub), range: [1, 3]
- Test Case
Close UVC on port 1:
media uvc close 1
- media dvp open
- Function Description
Used to test whether opening DVP is normal.
- Command Format
media dvp open [param1] [param2] [param3]
Param
value
param1
resolution, optional param, reference struct: meida_ppi_t, default 640X480
param2
image format, optional param, output image fmt(h264/h265/yuv/enc_yuv/dual), defalt mjpeg
- Test Case
Test if DVP can output 864X480 H264 & YUV image streams normally:
media dvp open 864X480 h264 enc_yuv
- media dvp close
- Function Description
Used to test the DVP shutdown function.
- Command Format
media uvc close
No parameters
- Test Case
Close DVP:
media dvp close
- media pipeline h264_open
- Function Description
Used to test the enabling of the pipeline H264 encoding function.
- Command Format
media pipeline h264_open
No parameters
- Test Case
Enable H264 pipeline encoding:
media pipeline h264_open
- media pipeline h264_close
- Function Description
Used to test the disabling of the pipeline H264 encoding function.
- Command Format
media pipeline h264_close
No parameters
- Test Case
Disable H264 pipeline encoding:
media pipeline h264_close