pub struct VideoCapture {
termination_recv: Option<Receiver<Terminate>>,
pipewire_state: PipewireState,
}Fields§
§termination_recv: Option<Receiver<Terminate>>§pipewire_state: PipewireStateImplementations§
Source§impl VideoCapture
impl VideoCapture
pub fn new( pipewire_fd: RawFd, stream_node: u32, ready_state: Arc<ReadyState>, controls: Arc<CaptureControls>, resolution_sender: Sender<Resolution>, frame_tx: Sender<RawVideoFrame>, termination_recv: Receiver<Terminate>, pw_obj: Object, ) -> Result<Self>
fn create_stream(core: CoreRc) -> Result<StreamRc>
fn setup_core_listener(core: &mut CoreRc) -> Result<Listener>
fn setup_stream_listener( stream: &mut StreamRc, data: UserData, ready_state: Arc<ReadyState>, controls: &Arc<CaptureControls>, resolution_sender: Sender<Resolution>, frame_tx: Sender<RawVideoFrame>, ) -> Result<StreamListener<UserData>>
fn connect_stream( stream: &mut StreamRc, stream_node: u32, pw_obj: Object, ) -> Result<()>
Sourcepub fn run(&mut self) -> Result<()>
pub fn run(&mut self) -> Result<()>
Finalizes the pipewire run loop with a terminate receiver and runs it Blocks the current thread so this must be called in a separate thread
fn get_dmabuf_fd(data: &Data) -> Option<RawFd>
Auto Trait Implementations§
impl Freeze for VideoCapture
impl !RefUnwindSafe for VideoCapture
impl !Send for VideoCapture
impl !Sync for VideoCapture
impl Unpin for VideoCapture
impl UnsafeUnpin for VideoCapture
impl !UnwindSafe for VideoCapture
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more