pub trait RTPHeaderExtensionImpl: RTPHeaderExtensionImplExt + ElementImpl {
    const URI: &'static str;

    // Provided methods
    fn supported_flags(&self) -> RTPHeaderExtensionFlags { ... }
    fn max_size(&self, input: &BufferRef) -> usize { ... }
    fn write(
        &self,
        input: &BufferRef,
        write_flags: RTPHeaderExtensionFlags,
        output: &BufferRef,
        output_data: &mut [u8],
    ) -> Result<usize, LoggableError> { ... }
    fn read(
        &self,
        read_flags: RTPHeaderExtensionFlags,
        input_data: &[u8],
        output: &mut BufferRef,
    ) -> Result<(), LoggableError> { ... }
    fn set_non_rtp_sink_caps(&self, caps: &Caps) -> Result<(), LoggableError> { ... }
    fn update_non_rtp_src_caps(
        &self,
        caps: &mut CapsRef,
    ) -> Result<(), LoggableError> { ... }
    fn set_attributes(
        &self,
        direction: RTPHeaderExtensionDirection,
        attributes: &str,
    ) -> Result<(), LoggableError> { ... }
    fn set_caps_from_attributes(
        &self,
        caps: &mut CapsRef,
    ) -> Result<(), LoggableError> { ... }
}

Required Associated Constants§

source

const URI: &'static str

Provided Methods§

source

fn supported_flags(&self) -> RTPHeaderExtensionFlags

retrieve the supported flags

§Returns

the flags supported by this instance of self

source

fn max_size(&self, input: &BufferRef) -> usize

This is used to know how much data a certain header extension will need for both allocating the resulting data, and deciding how much payload data can be generated.

Implementations should return as accurate a value as is possible using the information given in the input buffer.

§input_meta

a gst::Buffer

§Returns

the maximum size of the data written by this extension

source

fn write( &self, input: &BufferRef, write_flags: RTPHeaderExtensionFlags, output: &BufferRef, output_data: &mut [u8], ) -> Result<usize, LoggableError>

Writes the RTP header extension to data using information available from the input_meta. data will be sized to be at least the value returned from RTPHeaderExtensionExt::max_size().

§input_meta

the input gst::Buffer to read information from if necessary

§write_flags

RTPHeaderExtensionFlags for how the extension should be written

§output

output RTP gst::Buffer

§data

location to write the rtp header extension into

§Returns

the size of the data written, < 0 on failure

source

fn read( &self, read_flags: RTPHeaderExtensionFlags, input_data: &[u8], output: &mut BufferRef, ) -> Result<(), LoggableError>

Read the RTP header extension from data.

§read_flags

RTPHeaderExtensionFlags for how the extension should be written

§data

location to read the rtp header extension from

§buffer

a gst::Buffer to modify if necessary

§Returns

whether the extension could be read from data

source

fn set_non_rtp_sink_caps(&self, caps: &Caps) -> Result<(), LoggableError>

Passes RTP payloader’s sink (i.e. not payloaded) caps to the header extension.

§caps

sink gst::Caps

§Returns

Whether caps could be read successfully

source

fn update_non_rtp_src_caps( &self, caps: &mut CapsRef, ) -> Result<(), LoggableError>

Updates depayloader src caps based on the information received in RTP header. caps must be writable as this function may modify them.

§caps

src gst::Caps to modify

§Returns

whether caps were modified successfully

source

fn set_attributes( &self, direction: RTPHeaderExtensionDirection, attributes: &str, ) -> Result<(), LoggableError>

set the necessary attributes that may be signaled e.g. with an SDP.

source

fn set_caps_from_attributes( &self, caps: &mut CapsRef, ) -> Result<(), LoggableError>

RTPHeaderExtensionExt::set_id() must have been called with a valid extension id that is contained in these caps.

The only current known caps format is based on the SDP standard as produced by gst_sdp_media_attributes_to_caps().

§caps

writable gst::Caps to modify

§Returns

whether the configured attributes on self can successfully be set on caps

Object Safety§

This trait is not object safe.

Implementors§