Skip to content

Commit

Permalink
Make RTCRtpCodecCapability::payloader_for_codec public API
Browse files Browse the repository at this point in the history
  • Loading branch information
algesten committed Nov 24, 2022
1 parent cbfd303 commit 2a00a91
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions webrtc/src/rtp_transceiver/rtp_codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ pub struct RTCRtpCodecCapability {
}

impl RTCRtpCodecCapability {
pub(crate) fn payloader_for_codec(
&self,
) -> Result<Box<dyn rtp::packetizer::Payloader + Send + Sync>> {
/// Turn codec capability into a `packetizer::Payloader`
pub fn payloader_for_codec(&self) -> Result<Box<dyn rtp::packetizer::Payloader + Send + Sync>> {
let mime_type = self.mime_type.to_lowercase();
if mime_type == MIME_TYPE_H264.to_lowercase() {
Ok(Box::new(rtp::codecs::h264::H264Payloader::default()))
Expand Down

0 comments on commit 2a00a91

Please sign in to comment.