use crate::description::{
rtp_codec::{RTCRtpParameters, RTPCodecType},
rtp_transceiver_direction::RTCRtpTransceiverDirection,
};
#[allow(clippy::upper_case_acronyms)]
pub type SSRC = u32;
pub type PayloadType = u8;
pub const TYPE_RTCP_FB_TRANSPORT_CC: &str = "transport-cc";
pub const TYPE_RTCP_FB_GOOG_REMB: &str = "goog-remb";
pub const TYPE_RTCP_FB_ACK: &str = "ack";
pub const TYPE_RTCP_FB_CCM: &str = "ccm";
pub const TYPE_RTCP_FB_NACK: &str = "nack";
#[derive(Default, Debug, Clone, PartialEq, Eq)]
pub struct RTCPFeedback {
pub typ: String,
pub parameter: String,
}
#[derive(Debug, Clone)]
pub(crate) struct MediaStreamId {
pub(crate) stream_id: String,
pub(crate) track_id: String,
}
#[derive(Debug, Clone)]
pub(crate) struct SsrcGroup {
pub(crate) name: String,
pub(crate) ssrcs: Vec<SSRC>,
}
#[derive(Debug, Clone)]
pub(crate) struct RTCRtpSender {
pub(crate) cname: String,
pub(crate) msid: MediaStreamId,
pub(crate) ssrcs: Vec<SSRC>,
pub(crate) ssrc_groups: Vec<SsrcGroup>,
}
#[derive(Debug, Clone)]
pub struct RTCRtpTransceiver {
pub(crate) mid: String,
pub(crate) sender: Option<RTCRtpSender>,
pub(crate) direction: RTCRtpTransceiverDirection,
pub(crate) current_direction: RTCRtpTransceiverDirection,
pub(crate) rtp_params: RTCRtpParameters,
pub(crate) kind: RTPCodecType,
}
impl RTCRtpTransceiver {
pub(crate) fn current_direction(&self) -> RTCRtpTransceiverDirection {
self.current_direction
}
pub(crate) fn set_current_direction(&mut self, d: RTCRtpTransceiverDirection) {
self.current_direction = d;
}
}