pub trait CUDA_RawVideoSourceTraitConst {
// Required method
fn as_raw_CUDA_RawVideoSource(&self) -> *const c_void;
// Provided methods
fn last_packet_contains_key_frame(&self) -> Result<bool> { ... }
fn format(&self) -> Result<CUDA_FormatInfo> { ... }
fn get_extra_data(&self, extra_data: &mut impl MatTrait) -> Result<()> { ... }
fn get(&self, property_id: i32, property_val: &mut f64) -> Result<bool> { ... }
fn get_first_frame_idx(&self) -> Result<i32> { ... }
}
Expand description
Constant methods for crate::cudacodec::CUDA_RawVideoSource
Required Methods§
fn as_raw_CUDA_RawVideoSource(&self) -> *const c_void
Provided Methods§
Sourcefn last_packet_contains_key_frame(&self) -> Result<bool>
fn last_packet_contains_key_frame(&self) -> Result<bool>
Returns true if the last packet contained a key frame.
Sourcefn format(&self) -> Result<CUDA_FormatInfo>
fn format(&self) -> Result<CUDA_FormatInfo>
Returns information about video file format.
Sourcefn get_extra_data(&self, extra_data: &mut impl MatTrait) -> Result<()>
fn get_extra_data(&self, extra_data: &mut impl MatTrait) -> Result<()>
Returns any extra data associated with the video source.
§Parameters
- extraData: 1D cv::Mat containing the extra data if it exists.
Sourcefn get(&self, property_id: i32, property_val: &mut f64) -> Result<bool>
fn get(&self, property_id: i32, property_val: &mut f64) -> Result<bool>
Retrieves the specified property used by the VideoSource.
§Parameters
- propertyId: Property identifier from cv::VideoCaptureProperties (eg. cv::CAP_PROP_POS_MSEC, cv::CAP_PROP_POS_FRAMES, …) or one from [videoio_flags_others].
- propertyVal: Value for the specified property.
§Returns
true
unless the property is unset set or not supported.
Sourcefn get_first_frame_idx(&self) -> Result<i32>
fn get_first_frame_idx(&self) -> Result<i32>
Retrieve the index of the first frame that will returned after construction.
§Returns
index of the index of the first frame that will returned after construction.
Note: To reduce the decoding overhead when initializing VideoReader to start its decoding from frame N, RawVideoSource should seek to the first valid key frame less than or equal to N and return that index here.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.