oarust 0.11.0

GPU-first semantic computing engine written in Rust
// @generated by tool/gen/fn/generate.py; DO NOT EDIT.
// schema=video_types.json schema_version=1 generator_version=64
// schema_sha256=c9eb9b8e421498fb1ab1dbe5536896d402f9d6dcf7c18ae1c109ffdbf97c2d27
use super::{
	Av1ChromaSamplePosition, Av1ColorDescription, VideoChromaSubsampling, VideoCodec,
	VideoColorMatrix, VideoColorRange, VideoComponentBitDepth, VideoContainerKind, VideoDecodeLevel,
	VideoDecodeProfile, VideoEncodeCodecCapabilities, VideoEncodeProfile, VideoExtent,
	VideoRateControl, VideoTimeBase,
};
use crate::audio::AudioEncodeProfile;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct Av1TimingInfo {
	pub num_units_in_display_tick: u32,
	pub time_scale: u32,
	pub equal_picture_interval: bool,
	pub num_ticks_per_picture_minus_1: Option<u32>,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct Av1ColorConfig {
	pub bit_depth: VideoComponentBitDepth,
	pub monochrome: bool,
	pub color_description: Option<Av1ColorDescription>,
	pub full_range: bool,
	pub chroma_subsampling: VideoChromaSubsampling,
	pub chroma_sample_position: Av1ChromaSamplePosition,
	pub separate_uv_delta_q: bool,
}

#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub struct Av1AccessUnitInfo {
	pub sequence_headers: u32,
	pub frames: u32,
	pub frame_headers: u32,
	pub tile_groups: u32,
	pub ivf_timestamp: Option<u64>,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct VideoDecodeCapabilities {
	pub(crate) profile: VideoDecodeProfile,
	pub(crate) min_coded_extent: VideoExtent,
	pub(crate) max_coded_extent: VideoExtent,
	pub(crate) picture_access_granularity: VideoExtent,
	pub(crate) min_bitstream_offset_alignment: u64,
	pub(crate) min_bitstream_size_alignment: u64,
	pub(crate) max_dpb_slots: u32,
	pub(crate) max_active_reference_pictures: u32,
	pub(crate) level: VideoDecodeLevel,
	pub(crate) field_offset_granularity: Option<(i32, i32)>,
	pub(crate) dpb_and_output_coincide: bool,
	pub(crate) dpb_and_output_distinct: bool,
	pub(crate) protected_content: bool,
	pub(crate) separate_reference_images: bool,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct VideoEncodeCapabilities {
	pub(crate) profile: VideoEncodeProfile,
	pub(crate) min_coded_extent: VideoExtent,
	pub(crate) max_coded_extent: VideoExtent,
	pub(crate) picture_access_granularity: VideoExtent,
	pub(crate) input_picture_granularity: VideoExtent,
	pub(crate) min_bitstream_offset_alignment: u64,
	pub(crate) min_bitstream_size_alignment: u64,
	pub(crate) max_dpb_slots: u32,
	pub(crate) max_active_reference_pictures: u32,
	pub(crate) max_rate_control_layers: u32,
	pub(crate) max_bitrate: u64,
	pub(crate) max_quality_levels: u32,
	pub(crate) constant_qp: bool,
	pub(crate) cbr: bool,
	pub(crate) vbr: bool,
	pub(crate) feedback_offset: bool,
	pub(crate) feedback_bytes_written: bool,
	pub(crate) feedback_overrides: bool,
	pub(crate) protected_content: bool,
	pub(crate) separate_reference_images: bool,
	pub(crate) codec: VideoEncodeCodecCapabilities,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct VideoDeviceCapabilities {
	pub(crate) decode_queue_family: Option<u32>,
	pub(crate) encode_queue_family: Option<u32>,
	pub(crate) decode_result_status_queries: bool,
	pub(crate) encode_result_status_queries: bool,
	pub(crate) h264_decode: bool,
	pub(crate) h265_decode: bool,
	pub(crate) av1_decode: bool,
	pub(crate) vp9_decode: bool,
	pub(crate) h264_encode: bool,
	pub(crate) h265_encode: bool,
	pub(crate) av1_encode: bool,
	pub(crate) video_queues_enabled: bool,
	pub(crate) decoder_sessions_available: bool,
	pub(crate) encoder_sessions_available: bool,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct VideoContainerInfo {
	pub(super) kind: VideoContainerKind,
	pub(super) codec: VideoCodec,
	pub(super) width: u32,
	pub(super) height: u32,
	pub(super) time_base: VideoTimeBase,
	pub(super) duration: u64,
	pub(super) sample_count: u32,
	pub(super) track_id: u32,
	pub(super) track_count: u32,
	pub(super) decode_profile: Option<VideoDecodeProfile>,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct H264TimingInfo {
	pub num_units_in_tick: u32,
	pub time_scale: u32,
	pub fixed_frame_rate: bool,
}

#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub struct H265TimingInfo {
	pub num_units_in_tick: u32,
	pub time_scale: u32,
	pub num_ticks_poc_diff_one_minus_1: Option<u32>,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct VideoColorInfo {
	pub(super) matrix: VideoColorMatrix,
	pub(super) range: VideoColorRange,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct VideoMuxerAudioConfig {
	/// Audio sample rate in hertz.
	pub sample_rate: u32,
	/// Number of interleaved channels.
	pub channel_count: u32,
	/// Encoder-delay frames omitted from presentation through an edit list.
	pub priming_frames: u32,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct VideoMuxerConfig {
	/// Elementary video codec. Only H.264 and H.265 are admitted.
	pub codec: VideoCodec,
	/// Coded width in pixels.
	pub width: u32,
	/// Coded height in pixels.
	pub height: u32,
	/// Nominal frame rate used for the final sample duration.
	pub frame_rate: u32,
	/// MP4 video-track time base. Its numerator must currently be one.
	pub time_base: VideoTimeBase,
	/// Optional native PCM-S16 audio track.
	pub audio: Option<VideoMuxerAudioConfig>,
}

#[derive(Clone, Copy, Debug, PartialEq)]
pub struct VideoPlayerConfig {
	/// Restart at the beginning after the final display-order frame.
	pub loop_playback: bool,
	/// Override the container average frame rate when pacing [`VideoPlayer::tick`](crate::video::VideoPlayer::tick).
	pub frame_rate_override: Option<f64>,
	/// Begin in the playing state. Manual [`VideoPlayer::advance`](crate::video::VideoPlayer::advance) calls ignore this.
	pub start_playing: bool,
	/// Maximum display-order frames retained for exact backward/forward stepping.
	pub presentation_cache_frames: usize,
	/// Maximum retained planar bytes across the presentation cache.
	pub presentation_cache_bytes: usize,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct VideoEncodeConfig {
	pub profile: VideoEncodeProfile,
	pub width: u32,
	pub height: u32,
	pub frame_rate: u32,
	pub gop_size: u32,
	pub rate_control: VideoRateControl,
	pub bitrate: u32,
	pub max_bitrate: u32,
	pub constant_qp: u32,
	pub quality_level: u32,
	pub async_depth: u32,
	pub max_b_frames: u32,
	/// Requested DPB ring depth. `0` selects the donor's two-slot ping-pong.
	pub max_dpb_slots: u32,
}

#[derive(Clone, Debug)]
pub struct VideoRecorderConfig {
	/// Container output path.
	pub output_path: String,
	/// Hardware encode profile: codec, extent, rate control, and GOP cadence.
	pub encode: VideoEncodeConfig,
	/// Input RGBA→NV12 conversion matrix. `Unspecified` selects BT.709.
	pub color_space: VideoColorMatrix,
	/// Use full (PC) component range instead of limited (TV) range.
	pub full_range: bool,
	/// Optional interleaved F32 audio track encoded to PCM-S16.
	pub audio: Option<AudioEncodeProfile>,
}