Sign in

    moonbit-community/rtc/rtp does not have a README file

    RtpError

    pub(all) suberror RtpError {
    InvalidPacket(String)
    InvalidExtension(String)
    PayloadTooLarge(Int)
    } derive(Eq,
    Debug
    )

    AbsSendTimeExtension

    pub(all) struct AbsSendTimeExtension {
    timestamp : UInt64
    } derive(Eq,
    Debug
    )

    AbsSendTimeExtension::estimate

    fn AbsSendTimeExtension::estimate(self : AbsSendTimeExtension, receive_ntp : UInt64) -> UInt64

    AbsSendTimeExtension::from_timestamp

    fn AbsSendTimeExtension::from_timestamp(timestamp : UInt64) -> AbsSendTimeExtension raise RtpError

    AbsSendTimeExtension::marshal

    fn AbsSendTimeExtension::marshal(self : AbsSendTimeExtension) -> Bytes raise RtpError

    AbsSendTimeExtension::new

    fn AbsSendTimeExtension::new(send_time_ntp : UInt64) -> AbsSendTimeExtension

    AbsSendTimeExtension::timestamp

    fn AbsSendTimeExtension::timestamp(self : AbsSendTimeExtension) -> UInt64

    AbsSendTimeExtension::unmarshal

    fn AbsSendTimeExtension::unmarshal(payload : Bytes) -> AbsSendTimeExtension raise RtpError

    AudioLevelExtension

    pub(all) struct AudioLevelExtension {
    level : Byte
    voice : Bool
    } derive(Eq,
    Debug
    )

    AudioLevelExtension::level

    fn AudioLevelExtension::level(self : AudioLevelExtension) -> Byte

    AudioLevelExtension::marshal

    fn AudioLevelExtension::marshal(self : AudioLevelExtension) -> Bytes raise RtpError

    AudioLevelExtension::new

    fn AudioLevelExtension::new(level~ : Byte, voice? : Bool) -> AudioLevelExtension raise RtpError

    AudioLevelExtension::unmarshal

    fn AudioLevelExtension::unmarshal(payload : Bytes) -> AudioLevelExtension raise RtpError

    AudioLevelExtension::voice

    fn AudioLevelExtension::voice(self : AudioLevelExtension) -> Bool

    CameraDirection

    pub(all) enum CameraDirection {
    Front
    Back
    } derive(Eq,
    Debug
    )

    HeaderExtension

    pub(all) struct HeaderExtension {
    id : Byte
    payload : Bytes
    } derive(Eq,
    Debug
    )

    HeaderExtension::id

    fn HeaderExtension::id(self : HeaderExtension) -> Byte

    HeaderExtension::new

    fn HeaderExtension::new(id~ : Byte, payload~ : Bytes) -> HeaderExtension raise RtpError

    HeaderExtension::payload

    fn HeaderExtension::payload(self : HeaderExtension) -> Bytes

    Packet

    pub(all) struct Packet {
    marker : Bool
    payload_type : Byte
    sequence_number : UInt16
    timestamp : UInt
    ssrc : UInt
    csrc : Array[UInt]
    extensions : Array[HeaderExtension]
    payload : Bytes
    } derive(Eq,
    Debug
    )

    Packet::csrc

    fn Packet::csrc(self : Packet) -> Array[UInt]

    Packet::decode

    fn Packet::decode(data : Bytes) -> Packet raise RtpError

    Packet::encode

    fn Packet::encode(self : Packet) -> Bytes raise RtpError

    Packet::extensions

    fn Packet::extensions(self : Packet) -> Array[HeaderExtension]

    Packet::header_size

    fn Packet::header_size(self : Packet) -> Int raise RtpError

    Packet::marker

    fn Packet::marker(self : Packet) -> Bool

    Packet::marshal

    fn Packet::marshal(self : Packet) -> Bytes raise RtpError

    Packet::marshal_size

    fn Packet::marshal_size(self : Packet) -> Int raise RtpError

    Packet::new

    fn Packet::new(marker? : Bool, payload_type~ : Byte, sequence_number~ : UInt16, timestamp~ : UInt, ssrc~ : UInt, csrc? : Array[UInt], extensions? : Array[HeaderExtension], payload~ : Bytes) -> Packet raise RtpError

    Packet::payload

    fn Packet::payload(self : Packet) -> Bytes

    Packet::payload_type

    fn Packet::payload_type(self : Packet) -> Byte

    Packet::sequence_number

    fn Packet::sequence_number(self : Packet) -> UInt16

    Packet::ssrc

    fn Packet::ssrc(self : Packet) -> UInt

    Packet::timestamp

    fn Packet::timestamp(self : Packet) -> UInt

    Packet::unmarshal

    fn Packet::unmarshal(data : Bytes) -> Packet raise RtpError

    Packetizer

    pub struct Packetizer {
    mtu : Int
    payload_type : Byte
    ssrc : UInt
    clock_rate : UInt
    codec : PayloadCodec
    include_vp8_picture_id : Bool
    sequence_number : UInt16
    timestamp : UInt
    picture_id : UInt16
    h264_sps : Bytes?
    h264_pps : Bytes?
    }

    Packetizer::clock_rate

    fn Packetizer::clock_rate(self : Packetizer) -> UInt

    Packetizer::new

    fn Packetizer::new(mtu~ : Int, payload_type~ : Byte, ssrc~ : UInt, clock_rate~ : UInt, codec~ : PayloadCodec, sequence_number? : UInt16, timestamp? : UInt, picture_id? : UInt16, include_vp8_picture_id? : Bool) -> Packetizer raise RtpError

    Packetizer::packetize

    fn Packetizer::packetize(self : Packetizer, payload : Bytes, samples : UInt, extensions? : Array[HeaderExtension]) -> Array[Packet] raise RtpError

    Packetizer::sequence_number

    fn Packetizer::sequence_number(self : Packetizer) -> UInt16

    Packetizer::skip_samples

    fn Packetizer::skip_samples(self : Packetizer, skipped_samples : UInt) -> Unit

    Packetizer::timestamp

    fn Packetizer::timestamp(self : Packetizer) -> UInt

    PayloadCodec

    pub(all) enum PayloadCodec {
    Opus
    G711
    G722
    Vp8
    Vp9
    H264
    H265
    Av1
    } derive(Eq,
    Debug
    )

    PayloadCodec::is_partition_head

    fn PayloadCodec::is_partition_head(self : PayloadCodec, payload : Bytes) -> Bool

    PayloadCodec::is_partition_tail

    fn PayloadCodec::is_partition_tail(self : PayloadCodec, marker : Bool, payload : Bytes) -> Bool

    PlayoutDelayExtension

    pub(all) struct PlayoutDelayExtension {
    min_delay : UInt16
    max_delay : UInt16
    } derive(Eq,
    Debug
    )

    PlayoutDelayExtension::marshal

    fn PlayoutDelayExtension::marshal(self : PlayoutDelayExtension) -> Bytes raise RtpError

    PlayoutDelayExtension::max_delay

    fn PlayoutDelayExtension::max_delay(self : PlayoutDelayExtension) -> UInt16

    PlayoutDelayExtension::min_delay

    fn PlayoutDelayExtension::min_delay(self : PlayoutDelayExtension) -> UInt16

    PlayoutDelayExtension::new

    fn PlayoutDelayExtension::new(min_delay~ : UInt16, max_delay~ : UInt16) -> PlayoutDelayExtension raise RtpError

    PlayoutDelayExtension::unmarshal

    fn PlayoutDelayExtension::unmarshal(payload : Bytes) -> PlayoutDelayExtension raise RtpError

    TransportCcExtension

    pub(all) struct TransportCcExtension {
    transport_sequence : UInt16
    } derive(Eq,
    Debug
    )

    TransportCcExtension::marshal

    fn TransportCcExtension::marshal(self : TransportCcExtension) -> Bytes

    TransportCcExtension::new

    fn TransportCcExtension::new(transport_sequence~ : UInt16) -> TransportCcExtension

    TransportCcExtension::transport_sequence

    fn TransportCcExtension::transport_sequence(self : TransportCcExtension) -> UInt16

    TransportCcExtension::unmarshal

    fn TransportCcExtension::unmarshal(payload : Bytes) -> TransportCcExtension raise RtpError

    VideoOrientationExtension

    pub(all) struct VideoOrientationExtension {
    direction : CameraDirection
    flip : Bool
    rotation : VideoRotation
    } derive(Eq,
    Debug
    )

    VideoOrientationExtension::direction

    VideoOrientationExtension::flip

    VideoOrientationExtension::marshal

    VideoOrientationExtension::new

    fn VideoOrientationExtension::new(direction? : CameraDirection, flip? : Bool, rotation? : VideoRotation) -> VideoOrientationExtension

    VideoOrientationExtension::rotation

    VideoOrientationExtension::unmarshal

    fn VideoOrientationExtension::unmarshal(payload : Bytes) -> VideoOrientationExtension raise RtpError

    VideoRotation

    pub(all) enum VideoRotation {
    Degree0
    Degree90
    Degree180
    Degree270
    } derive(Eq,
    Debug
    )

    depacketize_payload

    fn depacketize_payload(codec : PayloadCodec, payloads : Array[Bytes]) -> Bytes raise RtpError

    packetize_payload

    fn packetize_payload(codec : PayloadCodec, payload : Bytes, mtu : Int) -> Array[Bytes] raise RtpError

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io