Struct opencv::cudacodec::CUDA_VideoReader
source · pub struct CUDA_VideoReader { /* private fields */ }
Expand description
Video reader interface, see createVideoReader().
Available if Nvidia’s Video Codec SDK is installed.
Decoding support is dependent on the GPU, refer to the Nvidia Video Codec SDK Video Encode and Decode GPU Support Matrix for details.
Note:
- An example on how to use the VideoReader interface can be found at opencv_source_code/samples/gpu/video_reader.cpp
Trait Implementations§
source§impl Boxed for CUDA_VideoReader
impl Boxed for CUDA_VideoReader
source§unsafe fn from_raw(
ptr: <CUDA_VideoReader as OpenCVFromExtern>::ExternReceive
) -> Self
unsafe fn from_raw( ptr: <CUDA_VideoReader as OpenCVFromExtern>::ExternReceive ) -> Self
Wrap the specified raw pointer Read more
source§fn into_raw(
self
) -> <CUDA_VideoReader as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw( self ) -> <CUDA_VideoReader as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying raw pointer while consuming this wrapper. Read more
source§fn as_raw(&self) -> <CUDA_VideoReader as OpenCVTypeExternContainer>::ExternSend
fn as_raw(&self) -> <CUDA_VideoReader as OpenCVTypeExternContainer>::ExternSend
Return the underlying raw pointer. Read more
source§fn as_raw_mut(
&mut self
) -> <CUDA_VideoReader as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut( &mut self ) -> <CUDA_VideoReader as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying mutable raw pointer Read more
source§impl CUDA_VideoReaderTrait for CUDA_VideoReader
impl CUDA_VideoReaderTrait for CUDA_VideoReader
fn as_raw_mut_CUDA_VideoReader(&mut self) -> *mut c_void
source§fn next_frame(
&mut self,
frame: &mut impl GpuMatTrait,
stream: &mut impl StreamTrait
) -> Result<bool>
fn next_frame( &mut self, frame: &mut impl GpuMatTrait, stream: &mut impl StreamTrait ) -> Result<bool>
Grabs, decodes and returns the next video frame. Read more
source§fn next_frame_def(&mut self, frame: &mut impl GpuMatTrait) -> Result<bool>
fn next_frame_def(&mut self, frame: &mut impl GpuMatTrait) -> Result<bool>
Grabs, decodes and returns the next video frame. Read more
source§fn next_frame_with_hist(
&mut self,
frame: &mut impl GpuMatTrait,
histogram: &mut impl GpuMatTrait,
stream: &mut impl StreamTrait
) -> Result<bool>
fn next_frame_with_hist( &mut self, frame: &mut impl GpuMatTrait, histogram: &mut impl GpuMatTrait, stream: &mut impl StreamTrait ) -> Result<bool>
Grabs, decodes and returns the next video frame and frame luma histogram. Read more
source§fn next_frame_with_hist_def(
&mut self,
frame: &mut impl GpuMatTrait,
histogram: &mut impl GpuMatTrait
) -> Result<bool>
fn next_frame_with_hist_def( &mut self, frame: &mut impl GpuMatTrait, histogram: &mut impl GpuMatTrait ) -> Result<bool>
Grabs, decodes and returns the next video frame and frame luma histogram. Read more
source§fn grab(&mut self, stream: &mut impl StreamTrait) -> Result<bool>
fn grab(&mut self, stream: &mut impl StreamTrait) -> Result<bool>
Grabs the next frame from the video source. Read more
source§fn set(
&mut self,
property_id: CUDA_VideoReaderProps,
property_val: f64
) -> Result<bool>
fn set( &mut self, property_id: CUDA_VideoReaderProps, property_val: f64 ) -> Result<bool>
Sets a property in the VideoReader. Read more
fn set_video_reader_props( &mut self, property_id: CUDA_VideoReaderProps, property_val: f64 ) -> Result<bool>
source§impl CUDA_VideoReaderTraitConst for CUDA_VideoReader
impl CUDA_VideoReaderTraitConst for CUDA_VideoReader
fn as_raw_CUDA_VideoReader(&self) -> *const c_void
source§fn format(&self) -> Result<CUDA_FormatInfo>
fn format(&self) -> Result<CUDA_FormatInfo>
Returns information about video file format.
source§fn retrieve(&self, frame: &mut impl ToOutputArray, idx: size_t) -> Result<bool>
fn retrieve(&self, frame: &mut impl ToOutputArray, idx: size_t) -> Result<bool>
Returns previously grabbed video data. Read more
source§fn retrieve_def(&self, frame: &mut impl ToOutputArray) -> Result<bool>
fn retrieve_def(&self, frame: &mut impl ToOutputArray) -> Result<bool>
Returns previously grabbed video data. Read more
source§fn retrieve_1(&self, frame: &mut impl MatTrait, idx: size_t) -> Result<bool>
fn retrieve_1(&self, frame: &mut impl MatTrait, idx: size_t) -> Result<bool>
Returns previously grabbed encoded video data. Read more
source§fn retrieve_2(&self, frame: &mut impl GpuMatTrait) -> Result<bool>
fn retrieve_2(&self, frame: &mut impl GpuMatTrait) -> Result<bool>
Returns the next video frame. Read more
source§fn get(
&self,
property_id: CUDA_VideoReaderProps,
property_val: &mut f64
) -> Result<bool>
fn get( &self, property_id: CUDA_VideoReaderProps, property_val: &mut f64 ) -> Result<bool>
Returns the specified VideoReader property Read more
source§fn get_video_reader_props(
&self,
property_id: CUDA_VideoReaderProps,
property_val_out: &mut f64,
property_val_in: f64
) -> Result<bool>
fn get_video_reader_props( &self, property_id: CUDA_VideoReaderProps, property_val_out: &mut f64, property_val_in: f64 ) -> Result<bool>
C++ default parameters Read more
source§fn get_video_reader_props_def(
&self,
property_id: CUDA_VideoReaderProps,
property_val_out: &mut f64
) -> Result<bool>
fn get_video_reader_props_def( &self, property_id: CUDA_VideoReaderProps, property_val_out: &mut f64 ) -> Result<bool>
Note Read more
source§impl Debug for CUDA_VideoReader
impl Debug for CUDA_VideoReader
source§impl Drop for CUDA_VideoReader
impl Drop for CUDA_VideoReader
impl Send for CUDA_VideoReader
Auto Trait Implementations§
impl Freeze for CUDA_VideoReader
impl RefUnwindSafe for CUDA_VideoReader
impl !Sync for CUDA_VideoReader
impl Unpin for CUDA_VideoReader
impl UnwindSafe for CUDA_VideoReader
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res
) -> Res
unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res ) -> Res
Helper function to call OpenCV functions that allow in-place modification of a
Mat
or another similar object. By passing
a mutable reference to the Mat
to this function your closure will get called with the read reference and a write references
to the same Mat
. This is of course unsafe as it breaks the Rust aliasing rules, but it might be useful for some performance
sensitive operations. One example of an OpenCV function that allows such in-place modification is imgproc::threshold
. Read more