async fn read(&self, b: &mut [u8]) -> Result<(usize, Attributes)> {
        let mut received_rx = self.received_rx.lock().await;

        tokio::select! {
            _ = received_rx.recv() =>{
                let tracks = self.tracks.lock().await;
                if let Some(t) = tracks.first(){
                    if let Some(rtcp_interceptor) = &t.stream.rtcp_interceptor{
                        let a = Attributes::new();
                        tokio::select! {
                            _ = self.closed_rx.notified() => {
                                Err(Error::ErrClosedPipe)
                            }
                            result = rtcp_interceptor.read(b, &a) => {
                                Ok(result?)
                            }
                        }
                    }else{
                        Err(Error::ErrInterceptorNotBind)
                    }
                }else{
                    Err(Error::ErrExistingTrack)
                }
            }
            _ = self.closed_rx.notified() => {
                Err(Error::ErrClosedPipe)
            }
        }
    }
/// read reads incoming RTCP for this RTPReceiver
read reads incoming RTCP for this RTPReceiver
read reads incoming RTCP for this RTPReceiver
async fn read(&self, b: &mut [u8]) -> Result<(usize, Attributes)> {
        let mut received_rx = self.received_rx.lock().await;
        tokio::select! {
            _ = received_rx.recv() =>{
                let tracks = self.tracks.lock().await;
                if let Some(t) = tracks.first(){
                    if let Some(rtcp_interceptor) = &t.stream.rtcp_interceptor{
                        let a = Attributes::new();
                        tokio::select! {
                            _ = self.closed_rx.notified() => {
                                Err(Error::ErrClosedPipe)
                            }
                            result = rtcp_interceptor.read(b, &a) => {
                                Ok(result?)
                            }
                        }
                    }else{
                        Err(Error::ErrInterceptorNotBind)
                    }
                }else{
                    Err(Error::ErrExistingTrack)
                }
            }
            _ = self.closed_rx.notified() => {
                Err(Error::ErrClosedPipe)
            }
        }
    }
async fn read ( & self , b : & mut [ u8 ] ) -> Result < ( usize , Attributes ) > { let mut received_rx = self . received_rx . lock ( ) . await ; tokio :: select ! { received_rx recv ( ) { let tracks self tracks lock ( ) await if let Some ( t ) tracks first ( ) { if let Some ( rtcp_interceptor ) t stream rtcp_interceptor { let a Attributes new ( ) tokio select { self closed_rx notified ( ) { Err ( Error ErrClosedPipe ) } result rtcp_interceptor read ( b a ) { Ok ( result ) } } } else { Err ( Error ErrInterceptorNotBind ) } } else { Err ( Error ErrExistingTrack ) } } self closed_rx notified ( ) { Err ( Error ErrClosedPipe ) } } }
read reads incoming RTCP for this RTPReceiver
read reads incoming RTCP for this RTPReceiver
&self
b
&mut [u8]