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

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