Skip to content

Commit d4312d0

Browse files
committed
Add h264 test data
This test data will be used in the video example. It contains a single I frame encoded with GStreamer.
1 parent c5f744a commit d4312d0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
2.08 KB
Binary file not shown.

examples/src/bin/video.rs renamed to examples/src/bin/video/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,11 @@ fn main() {
188188
VideoSessionParameters::new(Arc::clone(&device), video_session_parameters_create_info)
189189
.unwrap();
190190
println!("empty session parameters: {:#?}", empty_session_parameters);
191+
192+
// A 64x64 progressive byte-stream encoded I-frame.
193+
// Encoded with the following GStreamer pipeline:
194+
//
195+
// gst-launch-1.0 videotestsrc num-buffers=1 ! video/x-raw,format=I420,width=64,height=64 ! x264enc ! video/x-h264,profile=constrained-baseline,stream-format=byte-stream ! filesink location="64x64-I.h264"
196+
let h264_stream = include_bytes!("64x64-I.h264");
197+
println!("loaded {} bytes of h264 data", h264_stream.len());
191198
}

0 commit comments

Comments
 (0)