Skip to content

Commit 7d26e9e

Browse files
committed
encapp: add tests for special inputs
* generate.pbtxt which generates a test src from ffmpeg * fake_input_buffer.pbtxt and * fake_input_buffer.twin.pbtxt which generates video in the Android app. Signed-off-by: Johan Blome <johan@gunhildcarling.net>
1 parent b4ab54d commit 7d26e9e

3 files changed

Lines changed: 93 additions & 0 deletions

File tree

tests/fake_input_buffer.pbtxt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Fake input test for buffer encoder
2+
# This test uses synthetic data generation for performance testing
3+
# without filesystem or camera overhead
4+
5+
common: {
6+
id: "fake_input_buffer_test"
7+
description: "Buffer encoder with fake input for max throughput testing"
8+
}
9+
10+
input: {
11+
filepath: "fake_input"
12+
resolution: "1280x720"
13+
framerate: 30
14+
pix_fmt: nv12
15+
playout_frames: 300
16+
}
17+
18+
configure: {
19+
codec: "c2.android.avc.encoder"
20+
mime: "video/avc"
21+
bitrate: "5000000"
22+
framerate: 30
23+
i_frame_interval: 1
24+
}

tests/fake_input_buffer.twin.pbtxt

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
test {
2+
# Fake input test for buffer encoder
3+
# This test uses synthetic data generation for performance testing
4+
# without filesystem or camera overhead
5+
6+
common: {
7+
id: "fake_input_buffer_test_parallell.1"
8+
description: "Buffer encoder with fake input for max throughput testing"
9+
}
10+
11+
input: {
12+
filepath: "fake_input"
13+
resolution: "1280x720"
14+
framerate: 30
15+
pix_fmt: nv12
16+
playout_frames: 300
17+
}
18+
19+
configure: {
20+
codec: "c2.android.avc.encoder"
21+
mime: "video/avc"
22+
bitrate: "5000000"
23+
framerate: 30
24+
i_frame_interval: 1
25+
}
26+
parallel {
27+
test {
28+
common: {
29+
id: "fake_input_buffer_test_parallell.2"
30+
description: "Buffer encoder with fake input for max throughput testing"
31+
}
32+
33+
input: {
34+
filepath: "fake_input"
35+
resolution: "1280x720"
36+
framerate: 30
37+
pix_fmt: nv12
38+
playout_frames: 300
39+
}
40+
41+
configure: {
42+
codec: "c2.android.avc.encoder"
43+
mime: "video/avc"
44+
bitrate: "5000000"
45+
framerate: 30
46+
i_frame_interval: 1
47+
}
48+
}
49+
}
50+
}

tests/generate.pbtxt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
test {
2+
common {
3+
id: "generate_test"
4+
description: "Test using generated synthetic input"
5+
}
6+
input {
7+
filepath: "[generate]"
8+
resolution: "1280x720"
9+
framerate: 30.0
10+
pix_fmt: nv12
11+
stoptime_sec: 5
12+
}
13+
configure {
14+
codec: "c2.android.avc.encoder"
15+
bitrate: "2M"
16+
framerate: 30.0
17+
}
18+
}
19+

0 commit comments

Comments
 (0)