Farstream.Codec¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
channels |
r/w |
Number of channels codec should decode |
|
clock_rate |
r/w |
clock rate of this stream |
|
encoding_name |
r/w |
the name of the codec |
|
feedback_params |
r/w |
key triplets of feedbck param type, subtype and extra string that is supported for this codec |
|
id |
r/w |
numeric identifier for encoding, eg. PT for SDP |
|
media_type |
r/w |
type of media this codec is for |
|
minimum_reporting_interval |
r/w |
The minimum interval between two RTCP reports, If it is not specified ( |
|
optional_params |
r/w |
key pairs of param name to param data |
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Farstream.Codec¶
This structure reprensents one codec that can be offered or received
- classmethod new(id, encoding_name, media_type, clock_rate)¶
- Parameters:
id (
int
) – codec identifier, if RTP this should be based on IETF RTP payload typesencoding_name (
str
) – Name of media type this encodesmedia_type (
Farstream.MediaType
) –Farstream.MediaType
for type of codecclock_rate (
int
) – The clock rate this codec encodes at, if applicable
- Returns:
A newly allocated
Farstream.Codec
- Return type:
Allocates and initializes a
Farstream.Codec
structure
- add_feedback_parameter(type, subtype, extra_params)¶
- Parameters:
This function adds an new feedback parameter to a
Farstream.Codec
- add_optional_parameter(name, value)¶
- Parameters:
This function adds an new optional parameter to a
Farstream.Codec
- are_equal(codec2)¶
- Parameters:
codec2 (
Farstream.Codec
) – Second codec- Returns:
- Return type:
Compare two codecs, it will declare two codecs to be identical even if their optional parameters are in a different order.
None
encoding names are ignored.
- copy()¶
- Returns:
a copy of the codec
- Return type:
Copies a
Farstream.Codec
structure.
- get_feedback_parameter(type, subtype, extra_params)¶
- Parameters:
- Returns:
the
Farstream.FeedbackParameter
from theFarstream.Codec
orNone
- Return type:
Finds the
Farstream.FeedbackParameter
in theFarstream.Codec
that has the requested subtype, type and extra_params. One of which must be non-None
;
- get_optional_parameter(name, value)¶
- Parameters:
- Returns:
the
Farstream.CodecParameter
from theFarstream.Codec
orNone
- Return type:
Finds the
Farstream.CodecParameter
in theFarstream.Codec
that has the requested name and, if notNone
, the requested value
- remove_feedback_parameter(item)¶
- Parameters:
item ([
Farstream.FeedbackParameter
]) – a pointer to theGLib.List
element to remove that contains aFarstream.FeedbackParameter
Removes an optional parameter from a codec.
None
param will do nothing.
- remove_optional_parameter(param)¶
- Parameters:
param (
Farstream.CodecParameter
) – a pointer to theFarstream.CodecParameter
to remove
Removes an optional parameter from a codec.
None
param will do nothing.