![]() |
![]() |
![]() |
Farsight2 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gst/farsight/fs-utils.h> FsRtpHeaderExtension; FsRtpHeaderExtension * fs_rtp_header_extension_new (guint id
,FsStreamDirection direction
,const gchar *uri
); FsRtpHeaderExtension * fs_rtp_header_extension_copy (FsRtpHeaderExtension *extension
); void fs_rtp_header_extension_destroy (FsRtpHeaderExtension *extension
); gboolean fs_rtp_header_extension_are_equal (FsRtpHeaderExtension *extension1
,FsRtpHeaderExtension *extension2
); GList * fs_rtp_header_extension_list_copy (GList *extensions
); void fs_rtp_header_extension_list_destroy (GList *extensions
); GList * fs_rtp_header_extension_list_from_keyfile (const gchar *filename
,FsMediaType media_type
,GError **error
); #define FS_RTP_HEADER_EXTENSION_FORMAT #define FS_RTP_HEADER_EXTENSION_ARGS (hdrext) void fs_utils_set_bitrate (GstElement *element
,glong bitrate
); GList * fs_utils_get_default_codec_preferences (GstElement *element
); GKeyFile * fs_utils_get_default_element_properties (GstElement *element
); GList * fs_utils_get_default_rtp_header_extension_preferences (GstElement *element
,FsMediaType media_type
);
typedef struct { guint id; FsStreamDirection direction; gchar *uri; } FsRtpHeaderExtension;
Defines a RTP header extension with its negotiated identifier, direction
and URI. They should only be created with fs_rtp_header_extension_new()
.
guint |
The identifier of the RTP header extension |
FsStreamDirection |
the direction in which this extension can be used |
gchar * |
The URI that defines this extension |
FsRtpHeaderExtension * fs_rtp_header_extension_new (guint id
,FsStreamDirection direction
,const gchar *uri
);
Creates a new FsRtpHeaderExtension
|
The identifier of the RTP header extension |
|
the direction in which this extension can be used |
|
The URI that defines this extension |
Returns : |
a new FsRtpHeaderExtension |
FsRtpHeaderExtension * fs_rtp_header_extension_copy (FsRtpHeaderExtension *extension
);
Copies a FsRtpHeaderExtension
|
The RTP header extension definition to copy |
Returns : |
a new FsRtpHeaderExtension |
void fs_rtp_header_extension_destroy (FsRtpHeaderExtension *extension
);
Frees the passed FsRtpHeaderExtension
|
A RTP header extension to free |
gboolean fs_rtp_header_extension_are_equal (FsRtpHeaderExtension *extension1
,FsRtpHeaderExtension *extension2
);
Compares two FsRtpHeaderExtension structures
|
The first FsRtpHeaderExtension |
|
The second FsRtpHeaderExtension |
Returns : |
TRUE if they are identical, FALSE otherwise
|
GList * fs_rtp_header_extension_list_copy (GList *extensions
);
Does a deep copy of a GList of FsRtpHeaderExtension
|
a GList of FsRtpHeaderExtension |
Returns : |
a new GList of FsRtpHeaderExtension |
void fs_rtp_header_extension_list_destroy
(GList *extensions
);
Frees the passed GList of FsRtpHeaderExtension
|
a GList of FsRtpHeaderExtension |
GList * fs_rtp_header_extension_list_from_keyfile (const gchar *filename
,FsMediaType media_type
,GError **error
);
Reads the content of a GKeyFile of the following format into a GList of FsRtpHeaderExtension structures.
The groups have a format "rtp-hdrext:audio:XXX" or "rtp-hdrext:video:XXX" where XXX is a unique string (per media type).
The valid keys are:
Example:
1 2 3 4 5 6 7 8 |
[rtp-hdrext:audio:a] id=1 uri=urn:ietf:params:rtp-hdrext:toffset [rtp-hdrext:audio:abc] id=3 uri=urn:ietf:params:rtp-hdrext:ntp-64 direction=receive |
|
Name of the GKeyFile to read the RTP Header Extensions from |
|
The media type for which to get header extensions |
|
location of a GError, or NULL if no error occured |
Returns : |
a GList of FsRtpHeaderExtension that must be freed with
fs_rtp_header_extension_list_destroy()
|
#define FS_RTP_HEADER_EXTENSION_FORMAT "%d: (%s) %s"
A format that can be used in printf like format strings to format a FsRtpHeaderExtension
#define FS_RTP_HEADER_EXTENSION_ARGS(hdrext)
Formats the codec in args for FS_RTP_HEADER_EXTENSION_ARGS
|
a FsRtpHeaderExtension |
void fs_utils_set_bitrate (GstElement *element
,glong bitrate
);
This allows setting the bitrate on all elements that have a "bitrate" property without having to know the type or of the unit used by that element.
This will be obsolete in 0.11 (when all elements use bit/sec for the "bitrate" property.
|
The GstElement |
|
The bitrate in bits/sec |
GList * fs_utils_get_default_codec_preferences
(GstElement *element
);
These default codec preferences should work with the elements that are available in the main GStreamer element repositories. They should be suitable for standards based protocols like SIP or XMPP.
|
Element for which to fetch default codec preferences |
Returns : |
The default codec preferences for this plugin,
this GList should be freed with fs_codec_list_destroy()
|
GKeyFile * fs_utils_get_default_element_properties
(GstElement *element
);
This function produces a GKeyFile that can be fed to
fs_element_added_notifier_set_properties_from_keyfile()
. If no
default properties have been found, it will return NULL
.
GList * fs_utils_get_default_rtp_header_extension_preferences (GstElement *element
,FsMediaType media_type
);
These default rtp header extension preferences should work with the elements that are available in the main GStreamer element repositories. They should be suitable for standards based protocols like SIP or XMPP.
|
Element for which to fetch default RTP Header Extension preferences |
|
The FsMediaType for which to get default RTP Header Extension preferences |
Returns : |
The default rtp header extension preferences for this plugin,
this GList should be freed with fs_codec_list_destroy()
|