Skip to content

Commit

Permalink
Add support 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 c5f744a
Show file tree
Hide file tree
Showing 3 changed files with 572 additions and 1 deletion.
15 changes: 14 additions & 1 deletion examples/src/bin/video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use vulkano::{
video::{
CodecCapabilities, VideoDecodeCapabilityFlags, VideoDecodeH264PictureLayoutFlags,
VideoDecodeH264ProfileInfo, VideoFormatInfo, VideoProfileInfo, VideoProfileListInfo,
VideoSession, VideoSessionCreateInfo,
VideoSession, VideoSessionCreateInfo, VideoSessionParameters,
VideoSessionParametersCreateFlags, VideoSessionParametersCreateInfo,
},
VulkanLibrary,
};
Expand Down Expand Up @@ -175,4 +176,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(vulkano::video::h264::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 c5f744a

Please sign in to comment.