Skip to content

Commit

Permalink
video: add suport for VideoSessionParameters
Browse files Browse the repository at this point in the history
Add support for VideoSessionParameters. These are used to deliver stream
metadata to the driver.
  • Loading branch information
dwlsalmeida committed Oct 25, 2023
1 parent 7a36c67 commit fcd38a8
Show file tree
Hide file tree
Showing 2 changed files with 557 additions and 2 deletions.
18 changes: 16 additions & 2 deletions examples/src/bin/video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ use vulkano::{
instance::{Instance, InstanceCreateFlags, InstanceCreateInfo},
video::{
CodecCapabilities, VideoDecodeCapabilityFlags, VideoDecodeH264PictureLayoutFlags,
VideoDecodeH264ProfileInfo, VideoFormatInfo, VideoProfileInfo, VideoProfileListInfo,
VideoSession, VideoSessionCreateInfo,
VideoDecodeH264ProfileInfo, VideoDecodeH264SessionParametersAddInfo, VideoFormatInfo,
VideoProfileInfo, VideoProfileListInfo, VideoSession, VideoSessionCreateInfo,
VideoSessionParameters, VideoSessionParametersCreateFlags,
VideoSessionParametersCreateInfo,
},
VulkanLibrary,
};
Expand Down Expand Up @@ -175,4 +177,16 @@ fn main() {

let video_session = VideoSession::new(Arc::clone(&device), video_session_create_info).unwrap();
println!("video session: {:#?}", video_session);

let video_session_parameters_create_info = VideoSessionParametersCreateInfo::new(
VideoSessionParametersCreateFlags::empty(), None, Arc::clone(&video_session), vulkano::video::VideoSessionParametersCreateInfoNext::VideoDecodeH264SessionParametersCreateInfo { max_std_sps_count: 0, max_std_pps_count: 0, parameter_add_info: Some(VideoDecodeH264SessionParametersAddInfo {
std_sp_ss: vec![],
std_pp_ss: vec![],
}) }
);

let empty_session_parameters =
VideoSessionParameters::new(Arc::clone(&device), video_session_parameters_create_info)
.unwrap();
println!("empty session parameters: {:#?}", empty_session_parameters);
}
Loading

0 comments on commit fcd38a8

Please sign in to comment.