GstRtp.RTPHeaderExtension¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
GstRtp.RTPHeaderExtensionClass (1), Gst.ElementClass (10), GObject.ObjectClass (5)
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
the parent |
Class Details¶
- class GstRtp.RTPHeaderExtension(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
Instance struct for a RTP Audio/Video header extension.
Added in version 1.20.
- classmethod create_from_uri(uri)[source]¶
- Parameters:
uri (
str) – the rtp header extension URI to search for- Returns:
the
GstRtp.RTPHeaderExtensionfor uri orNone- Return type:
Added in version 1.20.
- classmethod set_uri(uri)¶
- Parameters:
uri (
str) – the RTP Header extension uri for self
Set the URI for this RTP header extension implementation.
Added in version 1.20.
- get_direction()[source]¶
- Returns:
The direction
- Return type:
Retrieve the direction
Added in version 1.20.
- get_id()[source]¶
- Returns:
the RTP extension id configured on self
- Return type:
Added in version 1.20.
- get_max_size(input_meta)[source]¶
- Parameters:
input_meta (
Gst.Buffer) – aGst.Buffer- Returns:
the maximum size of the data written by this extension
- Return type:
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.
Added in version 1.20.
- get_sdp_caps_field_name()[source]¶
- Returns:
the
Gst.Structurefield name used in SDP-likeGst.Capsfor this self configuration- Return type:
Added in version 1.20.
- get_supported_flags()[source]¶
- Returns:
the flags supported by this instance of self
- Return type:
Added in version 1.20.
- read(read_flags, data, buffer)[source]¶
- Parameters:
read_flags (
GstRtp.RTPHeaderExtensionFlags) –GstRtp.RTPHeaderExtensionFlagsfor how the extension should be writtendata (
bytes) – location to read the rtp header extension frombuffer (
Gst.Buffer) – aGst.Bufferto modify if necessary
- Returns:
whether the extension could be read from data
- Return type:
Read the RTP header extension from data.
Added in version 1.20.
- set_attributes_from_caps(caps)[source]¶
- Parameters:
caps (
Gst.Caps) – theGst.Capsto configure this extension with- Returns:
whether the caps could be successfully set on self.
- Return type:
GstRtp.RTPHeaderExtension.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().
Added in version 1.20.
- set_caps_from_attributes(caps)[source]¶
- Parameters:
- Returns:
whether the configured attributes on self can successfully be set on caps
- Return type:
GstRtp.RTPHeaderExtension.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().
Added in version 1.20.
- set_caps_from_attributes_helper(caps, attributes)[source]¶
- Parameters:
- Returns:
whether the self attributes could be set on caps.
- Return type:
Helper implementation for GstRTPExtensionClass::set_caps_from_attributes that sets the self uri on caps with the specified extension id as required for sdp
Gst.Caps.Requires that the extension does not have any attributes or direction advertised in caps.
Added in version 1.20.
- set_direction(direction)[source]¶
- Parameters:
direction (
GstRtp.RTPHeaderExtensionDirection) – The direction
Set the direction that this header extension should be used in. If
GstRtp.RTPHeaderExtensionDirection.INHERITEDis included, the direction will not be included in the caps (as it shouldn’t be in the extmap line in the SDP).Added in version 1.20.
- set_id(ext_id)[source]¶
- Parameters:
ext_id (
int) – The id of this extension
sets the RTP extension id on self
Added in version 1.20.
- set_non_rtp_sink_caps(caps)[source]¶
- Parameters:
- Returns:
Whether caps could be read successfully
- Return type:
Passes RTP payloader’s sink (i.e. not payloaded) caps to the header extension.
Added in version 1.20.
- set_wants_update_non_rtp_src_caps(state)[source]¶
-
Call this function in a subclass from #GstRTPHeaderExtensionClass::read to tell the depayloader whether the data just parsed from RTP packet require updating its src (non-RTP) caps. If state is
True,GstRtp.RTPBaseDepayloadwill eventually invokeGstRtp.RTPHeaderExtension.update_non_rtp_src_caps() to have the caps update applied. Applying the update also flips the internal “wants update” flag back toFalse.Added in version 1.20.
- update_non_rtp_src_caps(caps)[source]¶
- Parameters:
- Returns:
whether caps were modified successfully
- Return type:
Updates depayloader src caps based on the information received in RTP header. caps must be writable as this function may modify them.
Added in version 1.20.
- wants_update_non_rtp_src_caps()[source]¶
- Returns:
Whether self wants to update depayloader’s src caps.
- Return type:
Call this function after
GstRtp.RTPHeaderExtension.read() to check if the depayloader’s src caps need updating with data received in the last RTP packet.Added in version 1.20.
- write(input_meta, write_flags, output, data)[source]¶
- Parameters:
input_meta (
Gst.Buffer) – the inputGst.Bufferto read information from if necessarywrite_flags (
GstRtp.RTPHeaderExtensionFlags) –GstRtp.RTPHeaderExtensionFlagsfor how the extension should be writtenoutput (
Gst.Buffer) – output RTPGst.Bufferdata (
bytes) – location to write the rtp header extension into
- Returns:
the size of the data written, < 0 on failure
- Return type:
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
GstRtp.RTPHeaderExtension.get_max_size().Added in version 1.20.
- do_get_max_size(input_meta) virtual¶
- Parameters:
input_meta (
Gst.Buffer) – aGst.Buffer- Returns:
the maximum size of the data written by this extension
- Return type:
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.
Added in version 1.20.
- do_get_supported_flags() virtual¶
- Returns:
the flags supported by this instance of ext
- Return type:
retrieve the supported flags
Added in version 1.20.
- do_read(read_flags, data, buffer) virtual¶
- Parameters:
read_flags (
GstRtp.RTPHeaderExtensionFlags) –GstRtp.RTPHeaderExtensionFlagsfor how the extension should be writtendata (
bytes) – location to read the rtp header extension frombuffer (
Gst.Buffer) – aGst.Bufferto modify if necessary
- Returns:
whether the extension could be read from data
- Return type:
Read the RTP header extension from data.
Added in version 1.20.
- do_set_attributes(direction, attributes) virtual¶
- Parameters:
direction (
GstRtp.RTPHeaderExtensionDirection)attributes (
str)
- Return type:
set the necessary attributes that may be signaled e.g. with an SDP.
- do_set_caps_from_attributes(caps) virtual¶
- Parameters:
- Returns:
whether the configured attributes on ext can successfully be set on caps
- Return type:
GstRtp.RTPHeaderExtension.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().
Added in version 1.20.
- do_set_non_rtp_sink_caps(caps) virtual¶
- Parameters:
- Returns:
Whether caps could be read successfully
- Return type:
Passes RTP payloader’s sink (i.e. not payloaded) caps to the header extension.
Added in version 1.20.
- do_update_non_rtp_src_caps(caps) virtual¶
- Parameters:
- Returns:
whether caps were modified successfully
- Return type:
Updates depayloader src caps based on the information received in RTP header. caps must be writable as this function may modify them.
Added in version 1.20.
- do_write(input_meta, write_flags, output, data) virtual¶
- Parameters:
input_meta (
Gst.Buffer) – the inputGst.Bufferto read information from if necessarywrite_flags (
GstRtp.RTPHeaderExtensionFlags) –GstRtp.RTPHeaderExtensionFlagsfor how the extension should be writtenoutput (
Gst.Buffer) – output RTPGst.Bufferdata (
bytes) – location to write the rtp header extension into
- Returns:
the size of the data written, < 0 on failure
- Return type:
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
GstRtp.RTPHeaderExtension.get_max_size().Added in version 1.20.