Trait AndroidAutoVideoChannelTrait

Source
pub trait AndroidAutoVideoChannelTrait: AndroidAutoMainTrait {
    // Required methods
    fn receive_video<'life0, 'async_trait>(
        &'life0 mut self,
        data: Vec<u8>,
        timestamp: Option<u64>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn setup_video<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn teardown_video<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn wait_for_focus<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_focus<'life0, 'async_trait>(
        &'life0 mut self,
        focus: bool,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

This trait is implemented by users wishing to display a video stream from an android auto (phone probably).

Required Methods§

Source

fn receive_video<'life0, 'async_trait>( &'life0 mut self, data: Vec<u8>, timestamp: Option<u64>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Parse a chunk of h264 video data

Source

fn setup_video<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Setup the video device to receive h264 video, if anything is required. Return Ok(()) if setup was good, Err(()) if it was not good

Source

fn teardown_video<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Tear down the video receiver, may be called without the setup having been called

Source

fn wait_for_focus<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Wait for the video to be in focus

Source

fn set_focus<'life0, 'async_trait>( &'life0 mut self, focus: bool, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set the focus of the video stream to be as requested

Implementors§