Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dwlsalmeida committed Oct 25, 2023
1 parent 774ab44 commit 6ca9a10
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions examples/src/bin/video/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
use std::sync::Arc;

use vulkano::{
command_buffer::allocator::{CommandBufferAllocator, StandardCommandBufferAllocator},
device::{Device, DeviceCreateInfo, DeviceExtensions, QueueCreateInfo, QueueFlags},
image::ImageUsage,
instance::{Instance, InstanceCreateFlags, InstanceCreateInfo},
query::{QueryPool, QueryPoolCreateInfo, QueryType},
video::{
CodecCapabilities, VideoDecodeCapabilityFlags, VideoDecodeH264PictureLayoutFlags,
VideoDecodeH264ProfileInfo, VideoFormatInfo, VideoProfileInfo, VideoProfileListInfo,
Expand Down Expand Up @@ -195,4 +197,21 @@ fn main() {
// 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"
let h264_stream = include_bytes!("64x64-I.h264");
println!("loaded {} bytes of h264 data", h264_stream.len());

let command_buffer_allocator =
StandardCommandBufferAllocator::new(device.clone(), Default::default());

let command_buffer = command_buffer_allocator
.allocate(
video_queue_family_index,
vulkano::command_buffer::CommandBufferLevel::Primary,
1,
)
.unwrap();

let query_pool = QueryPool::new(
Arc::clone(&device),
QueryPoolCreateInfo::query_type(QueryType::ResultStatusOnly),
)
.unwrap();
}

0 comments on commit 6ca9a10

Please sign in to comment.