pub struct NvencEncoder {
encoder: Option<Video>,
width: u32,
height: u32,
encoder_name: String,
quality: QualityPreset,
encoded_frame_recv: Option<HeapCons<EncodedVideoFrame>>,
encoded_frame_sender: Option<HeapProd<EncodedVideoFrame>>,
cuda_ctx: Context,
graphics_resource: CUgraphicsResource,
egl_texture: u32,
}
Fields§
§encoder: Option<Video>
§width: u32
§height: u32
§encoder_name: String
§quality: QualityPreset
§encoded_frame_recv: Option<HeapCons<EncodedVideoFrame>>
§encoded_frame_sender: Option<HeapProd<EncodedVideoFrame>>
§cuda_ctx: Context
§graphics_resource: CUgraphicsResource
§egl_texture: u32
Implementations§
Source§impl NvencEncoder
impl NvencEncoder
fn create_encoder( width: u32, height: u32, encoder: &str, quality: &QualityPreset, cuda_ctx: &Context, ) -> Result<Video>
fn get_encoder_params(quality: &QualityPreset) -> Dictionary<'_>
pub fn init_gl(&mut self, texture_id: u32) -> Result<()>
pub fn make_current(&self) -> Result<()>
Trait Implementations§
Source§impl Drop for NvencEncoder
impl Drop for NvencEncoder
Source§impl VideoEncoder for NvencEncoder
impl VideoEncoder for NvencEncoder
fn new(width: u32, height: u32, quality: QualityPreset) -> Result<Self>where
Self: Sized,
fn as_any(&self) -> &dyn Any
fn process(&mut self, frame: &RawVideoFrame) -> Result<()>
fn drain(&mut self) -> Result<()>
fn reset(&mut self) -> Result<()>
fn get_encoder(&self) -> &Option<Video>
fn drop_encoder(&mut self)
fn take_encoded_recv(&mut self) -> Option<HeapCons<EncodedVideoFrame>>
impl Send for NvencEncoder
impl Sync for NvencEncoder
Auto Trait Implementations§
impl !Freeze for NvencEncoder
impl !RefUnwindSafe for NvencEncoder
impl Unpin for NvencEncoder
impl !UnwindSafe for NvencEncoder
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