pub struct ReferencePictureSelectionIndication {
pub sender_ssrc: u32,
pub media_ssrc: u32,
pub payload_type: u8,
pub native_rpsi: Bytes,
pub unused_bits: u8,
}Expand description
Reference Picture Selection Indication (PSFB FMT=3): the receiver names a reference picture in the codec’s own terms. Exactly one indication per packet.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PB |0| Payload Type| Native RPSI bit string |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| defined per codec ... | Padding (0) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Fields§
§sender_ssrc: u32The source that sends the indication.
media_ssrc: u32The media sender it is for.
payload_type: u8The RTP payload type that says how the bit string is to be read, 7 bits.
native_rpsi: BytesThe native RPSI bit string, as the codec defines it, most significant bit first. When its length is not a whole number of octets, the last octet’s low bits are padding.
unused_bits: u8How many low bits of the last octet of native_rpsi are not part of the bit string,
0 to 7. They are sent as zero.
Implementations§
Source§impl ReferencePictureSelectionIndication
impl ReferencePictureSelectionIndication
Sourcepub fn hevc(
sender_ssrc: u32,
media_ssrc: u32,
payload_type: u8,
nuh_layer_id: u8,
pic_order_cnt_val: u32,
) -> Result<Self>
pub fn hevc( sender_ssrc: u32, media_ssrc: u32, payload_type: u8, nuh_layer_id: u8, pic_order_cnt_val: u32, ) -> Result<Self>
An RPSI for an H.265 stream (RFC 7798 section 8.3): a request that the encoder use the
picture with nuh_layer_id (6 bits) and pic_order_cnt_val as its reference. The
native bit string is “a base16 representation of the 8 bits consisting of the 2 most
significant bits equal to 0 and 6 bits of nuh_layer_id, … followed by the 32 bits
representing the value of the PicOrderCntVal (in network byte order)”: ten hexadecimal
digits. RFC 7798 deprecates RPSI as a positive acknowledgement; this is the request
form, the only one it allows. A nuh_layer_id over 63 is refused.
Sourcepub fn hevc_picture(&self) -> Option<(u8, u32)>
pub fn hevc_picture(&self) -> Option<(u8, u32)>
The (nuh_layer_id, PicOrderCntVal) of an H.265 RPSI’s native bit string (RFC 7798
section 8.3), None when it is not ten hexadecimal digits with the two high bits of
the layer octet zero.
Sourcepub fn picture_id(
sender_ssrc: u32,
media_ssrc: u32,
payload_type: u8,
picture_id: u16,
extended: bool,
) -> Result<Self>
pub fn picture_id( sender_ssrc: u32, media_ssrc: u32, payload_type: u8, picture_id: u16, extended: bool, ) -> Result<Self>
An RPSI for a VP8 stream (RFC 7741 section 5.1) or a VP9 stream (RFC 9628 section
5.1): the native bit string “is simply the (7- or 15-bit) Picture ID of the received
frame”, as its payload descriptor carried it: 7 bits for a Picture ID below 128 unless
extended, 15 bits otherwise (the descriptor’s M bit). The bits are left-aligned in the
octets, the low bit of the last octet unused. A Picture ID above 15 bits is refused.
Sourcepub fn vp8_vp9_picture_id(&self) -> Option<u16>
pub fn vp8_vp9_picture_id(&self) -> Option<u16>
The Picture ID of a VP8 or VP9 RPSI (Self::picture_id): a native bit string of 7 or
15 bits, None for any other length.
Sourcepub fn native_rpsi_bits(&self) -> usize
pub fn native_rpsi_bits(&self) -> usize
The length of the native bit string in bits.
Trait Implementations§
impl Eq for ReferencePictureSelectionIndication
Source§impl MarshalSize for ReferencePictureSelectionIndication
impl MarshalSize for ReferencePictureSelectionIndication
Source§fn marshal_size(&self) -> usize
fn marshal_size(&self) -> usize
Marshal::marshal_to will write for this value.