fn start(
        &mut self,
        inspect: StreamingInspectData,
        cobalt_sender: CobaltSender,
    ) -> avdtp::Result<()> {
        let start_res = self.endpoint.start();
        if start_res.is_err() || self.suspend_sender.is_some() {
            fx_log_info!("Start when streaming: {:?} {:?}", start_res, self.suspend_sender);
            return Err(avdtp::Error::InvalidState);
        }
        let (send, receive) = mpsc::channel(1);
        self.suspend_sender = Some(send);

        let codec_extra = self.configured_codec_extra()?;

        fuchsia_async::spawn_local(decode_media_stream(
            self.endpoint.take_transport()?,
            codec_extra,
            // TODO(42976) get real media session id
            DEFAULT_SESSION_ID,
            receive,
            inspect,
            cobalt_sender,
        ));
        Ok(())
    }
/// Attempt to start the media decoding task.
Attempt to start the media decoding task.
Attempt to start the media decoding task .
fn start(
        &mut self,
        inspect: StreamingInspectData,
        cobalt_sender: CobaltSender,
    ) -> avdtp::Result<()> {
        let start_res = self.endpoint.start();
        if start_res.is_err() || self.suspend_sender.is_some() {
            fx_log_info!("Start when streaming: {:?} {:?}", start_res, self.suspend_sender);
            return Err(avdtp::Error::InvalidState);
        }
        let (send, receive) = mpsc::channel(1);
        self.suspend_sender = Some(send);
        let codec_extra = self.configured_codec_extra()?;
        fuchsia_async::spawn_local(decode_media_stream(
            self.endpoint.take_transport()?,
            codec_extra,
            // TODO(42976) get real media session id
            DEFAULT_SESSION_ID,
            receive,
            inspect,
            cobalt_sender,
        ));
        Ok(())
    }
fn start ( & mut self , inspect : StreamingInspectData , cobalt_sender : CobaltSender , ) -> avdtp :: Result < ( ) > { let start_res = self . endpoint . start ( ) ; if start_res . is_err ( ) || self . suspend_sender . is_some ( ) { fx_log_info ! ( " " start_res self suspend_sender ) ; return Err ( avdtp :: Error :: InvalidState ) ; } let ( send , receive ) = mpsc :: channel ( 1 ) ; self . suspend_sender = Some ( send ) ; let codec_extra = self . configured_codec_extra ( ) ? ; fuchsia_async :: spawn_local ( decode_media_stream ( self . endpoint . take_transport ( ) ? , codec_extra , // TODO(42976) get real media session id DEFAULT_SESSION_ID , receive , inspect , cobalt_sender , ) ) ; Ok ( ( ) ) }
Attempt to start the media decoding task.
Attempt to start the media decoding task .
&mut self
inspect
StreamingInspectData
cobalt_sender
CobaltSender
&mut self
inspect
StreamingInspectData
cobalt_sender
CobaltSender