Skip to content

Commit 9b6df29

Browse files
committed
Add the Custom-H264 and DJI-H264 support
Signed-off-by: PayloadSDKDev <PayloadSDKDev@dji.com>
1 parent 7ace28f commit 9b6df29

File tree

6 files changed

+379
-101
lines changed

6 files changed

+379
-101
lines changed

README.md

Lines changed: 76 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,77 @@
11
# DJIPSDKVideoStreamCheckTool
2-
PSDK video stream check tool, used to check whether the specified video stream conforms to the PSDK video stream standard
3-
4-
Build Steps:
5-
1. cd to stream_check_tool/project directory;
6-
2. mkdir build directory;
7-
3. cmake ..
8-
4. make
9-
5. build finished and executable stream_check_tool is in current directory.
2+
3+
## Introduction
4+
PSDK video stream check tool, used to check whether the specified video stream conforms to the PSDK video stream
5+
standard. The tool support UDP transmission or file as input, and output check result. Please refer to
6+
[DJI developer site](https://developer.dji.com/document/65de35b8-78ff-4199-b3ab-ce57ea95301b) for details of the PSDK
7+
video steam standard.
8+
9+
## Build Steps
10+
1. `cd` to DJIPSDKVideoStreamCheckTool/project directory;
11+
2. use `mkdir build` command to create a directory;
12+
3. `cmake ..`
13+
4. `make`
14+
15+
## Usage
16+
Please get help and usage by run `./stream_check_tool -h` command in Linux terminal. Just like
17+
18+
```shell script
19+
dji@manifold2:~/Documents/DJIPSDKVideoStreamCheckTool/project/build$ ./stream_check_tool -h
20+
21+
stream_check_tool usage:
22+
./stream_check_tool <-u [-p <port>] [-t <type>] |-f [-i <filename>] [-t <type>] > [-h] [-v]
23+
24+
-t type: Stream type, can be any value of "DJI-H264" or "Custom-H264"
25+
26+
sample:
27+
case 1: video stream received by UDP transmission channel as input, and please ensure every frame end with AUD (0x00 0x00 0x00 0x01 0x09 0x10)
28+
stream_check_tool -u -p udp_port -t stream_type
29+
udp_port is the UDP port which send video stream to, and the default value is 45654
30+
31+
case 2: video file as input
32+
stream_check_tool -f -i filename -t stream_type
33+
```
34+
35+
#### Video File as Input
36+
Use below command to check local video file, and you will get output as below.
37+
38+
```shell script
39+
dji@manifold2:~/Documents/DJIPSDKVideoStreamCheckTool/project/build$ ./stream_check_tool -f -i test.h264 -t DJI-H264
40+
41+
[Passed] 0.stream size(reference 7.3.2.1.1)
42+
[Passed] 1.profile_idc (reference 7.3.2.1.1)
43+
[Passed] 2.level_idc (reference 7.3.2.1.1)
44+
[Passed] 3.YUV420 chroma_format_idc (reference 7.3.2.1.1)
45+
[Passed] 4.chroma and luma only allow 8 bit (reference 7.3.2.1.1)
46+
[Passed] 5.seq_scaling_matrix_presenst_flag (reference 7.3.2.1.1 and 7.3.2.2)
47+
[Passed] 6.frame_mbs_only_flag (reference 7.3.2.1.1)
48+
[Passed] 7.slice_type (reference 7.3.3)
49+
[Passed] 8.num_slice_groups_minus1 (reference 7.3.2.2)
50+
[Passed] 9.max_num_ref_frames (reference 7.3.2.1.1)
51+
[Passed] 10.video resolution (reference 7.3.2.1.1)
52+
53+
[Passed] Currently, all frames has passed the above standards test.
54+
```
55+
56+
#### UDP Transmission as Input
57+
Ensure that the destination address of the video stream is 127.0.0.1 and the port can be customized such as 23003.
58+
Use below command to check video stream from UDP transmission, and you will get output as below.
59+
60+
```shell script
61+
dji@manifold2:~/Documents/DJIPSDKVideoStreamCheckTool/project/build$ ./stream_check_tool -u -p 23003 -t DJI-H264
62+
udp reader mode, port 23003
63+
64+
[Passed] 0.stream size(reference 7.3.2.1.1)
65+
[Passed] 1.profile_idc (reference 7.3.2.1.1)
66+
[Passed] 2.level_idc (reference 7.3.2.1.1)
67+
[Passed] 3.YUV420 chroma_format_idc (reference 7.3.2.1.1)
68+
[Passed] 4.chroma and luma only allow 8 bit (reference 7.3.2.1.1)
69+
[Passed] 5.seq_scaling_matrix_presenst_flag (reference 7.3.2.1.1 and 7.3.2.2)
70+
[Passed] 6.frame_mbs_only_flag (reference 7.3.2.1.1)
71+
[Passed] 7.slice_type (reference 7.3.3)
72+
[Passed] 8.num_slice_groups_minus1 (reference 7.3.2.2)
73+
[Passed] 9.max_num_ref_frames (reference 7.3.2.1.1)
74+
[Passed] 10.video resolution (reference 7.3.2.1.1)
75+
76+
[Passed] Currently, all frames has passed the above standards test.
77+
```

application/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ifeq (,$(shell mkdir -p $(BIN_PATH) $(OBJ_PATH) $(SRC_PATH) $(DBG_PATH)))
1717
endif
1818

1919
# compile marcros
20-
TARGET_NAME := dji_check_stream
20+
TARGET_NAME := stream_check_tool
2121
ifeq ($(OS),Windows_NT)
2222
TARGET_NAME := $(addsuffix .exe,$(TARGET_NAME))
2323
endif

application/inc/h264_checker.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ class H264Checker : public CheckerBase {
6262
//SPS *mSps;
6363

6464
int mFrameCnt;
65+
uint32_t frameCount;
66+
uint32_t framePassedCount;
67+
uint32_t totalCount;
6568
};
6669

6770
#endif /* __H264_CHECKER_H__ */

0 commit comments

Comments
 (0)