pub(crate) async fn determine_payload_type(&self) -> Result<()> {
        let mut b = vec![0u8; RECEIVE_MTU];
        let (n, _) = self.peek(&mut b).await?;

        let mut buf = &b[..n];
        let r = rtp::packet::Packet::unmarshal(&mut buf)?;
        self.payload_type
            .store(r.header.payload_type, Ordering::SeqCst);

        Ok(())
    }
/// determine_payload_type blocks and reads a single packet to determine the PayloadType for this Track
/// this is useful because we can't announce it to the user until we know the payload_type
determine_payload_type blocks and reads a single packet to determine the PayloadType for this Track
this is useful because we can't announce it to the user until we know the payload_type
determine_payload_type blocks and reads a single packet to determine the PayloadType for this Track this is useful because we can ' t announce it to the user until we know the payload_type
pub(crate) async fn determine_payload_type(&self) -> Result<()> {
        let mut b = vec![0u8; RECEIVE_MTU];
        let (n, _) = self.peek(&mut b).await?;
        let mut buf = &b[..n];
        let r = rtp::packet::Packet::unmarshal(&mut buf)?;
        self.payload_type
            .store(r.header.payload_type, Ordering::SeqCst);
        Ok(())
    }
pub ( crate ) async fn determine_payload_type ( & self ) -> Result < ( ) > { let mut b = vec ! [ 0u8 RECEIVE_MTU ] ; let ( n , _ ) = self . peek ( & mut b ) . await ? ; let mut buf = & b [ .. n ] ; let r = rtp :: packet :: Packet :: unmarshal ( & mut buf ) ? ; self . payload_type . store ( r . header . payload_type , Ordering :: SeqCst ) ; Ok ( ( ) ) }
determine_payload_type blocks and reads a single packet to determine the PayloadType for this Track
this is useful because we can't announce it to the user until we know the payload_type
determine_payload_type blocks and reads a single packet to determine the PayloadType for this Track this is useful because we can ' t announce it to the user until we know the payload_type
&self