WockyJingleMediaRtp

WockyJingleMediaRtp

Synopsis

                    WockyJingleCodec;
                    WockyJingleFeedbackMessage;
                    WockyJingleMediaDescription;
struct              WockyJingleMediaRtpClass;
                    WockyJingleRtpHeaderExtension;
void                jingle_media_rtp_codec_free         (WockyJingleCodec *p);
WockyJingleCodec *  jingle_media_rtp_codec_new          (guint id,
                                                         const gchar *name,
                                                         guint clockrate,
                                                         guint channels,
                                                         GHashTable *params);
gboolean            jingle_media_rtp_compare_codecs     (GList *old,
                                                         GList *new,
                                                         GList **changed,
                                                         GError **e);
GList *             jingle_media_rtp_copy_codecs        (GList *codecs);
void                jingle_media_rtp_free_codecs        (GList *codecs);
void                jingle_media_rtp_register           (WockyJingleFactory *factory);
gboolean            jingle_media_rtp_set_local_media_description
                                                        (WockyJingleMediaRtp *self,
                                                         WockyJingleMediaDescription *md,
                                                         gboolean ready,
                                                         GError **error);
void                wocky_jingle_feedback_message_free  (WockyJingleFeedbackMessage *fb);
WockyJingleFeedbackMessage * wocky_jingle_feedback_message_new
                                                        (const gchar *type,
                                                         const gchar *subtype);
WockyJingleMediaDescription * wocky_jingle_media_description_copy
                                                        (WockyJingleMediaDescription *md);
void                wocky_jingle_media_description_free (WockyJingleMediaDescription *md);
WockyJingleMediaDescription * wocky_jingle_media_description_new
                                                        (void);
void                wocky_jingle_media_description_simplify
                                                        (WockyJingleMediaDescription *md);
WockyJingleMediaDescription * wocky_jingle_media_rtp_get_remote_media_description
                                                        (WockyJingleMediaRtp *self);
void                wocky_jingle_rtp_header_extension_free
                                                        (WockyJingleRtpHeaderExtension *hdrext);
WockyJingleRtpHeaderExtension * wocky_jingle_rtp_header_extension_new
                                                        (guint id,
                                                         WockyJingleContentSenders senders,
                                                         const gchar *uri);

Description

Details

WockyJingleCodec

typedef struct {
  guint id;
  gchar *name;
  guint clockrate;
  guint channels;
  GHashTable *params;
  guint trr_int;
  GList *feedback_msgs;
} WockyJingleCodec;

WockyJingleFeedbackMessage

typedef struct {
  gchar *type;
  gchar *subtype;
} WockyJingleFeedbackMessage;

WockyJingleMediaDescription

typedef struct {
  GList *codecs;
  GList *hdrexts;
  guint trr_int;
  GList *feedback_msgs;
} WockyJingleMediaDescription;

Media description for a WockyJingleMediaRtp content.

GList *codecs;

a list of WockyJingleCodecs, allocated with jingle_media_rtp_codec_new()

GList *hdrexts;

a list of WockyJingleRtpHeaderExtensions, allocated with wocky_jingle_rtp_header_extension_new()

guint trr_int;

number of milliseconds between regular RTCP reports

GList *feedback_msgs;

a list of WockyJingleFeedbackMessages, allocated with wocky_jingle_feedback_message_new()

struct WockyJingleMediaRtpClass

struct WockyJingleMediaRtpClass {
    WockyJingleContentClass parent_class;
};

WockyJingleRtpHeaderExtension

typedef struct {
  guint id;
  WockyJingleContentSenders senders;
  gchar *uri;
} WockyJingleRtpHeaderExtension;

jingle_media_rtp_codec_free ()

void                jingle_media_rtp_codec_free         (WockyJingleCodec *p);

jingle_media_rtp_codec_new ()

WockyJingleCodec *  jingle_media_rtp_codec_new          (guint id,
                                                         const gchar *name,
                                                         guint clockrate,
                                                         guint channels,
                                                         GHashTable *params);

Creates a new structure describing a codec, suitable for including in a WockyJingleMediaDescription.

id :

a codec ID, as specified in tables 4 and 5 of RFC 3551.

name :

the codec's name. This is optional if id is one of the statically-defined codec identifiers, and required if id is in the range 96–127. (This is not enforced by this library.). [allow-none]

clockrate :

the clock rate for this codec, or 0 to not specify a clock rate.

channels :

the number of channels, or 0 to leave this unspecified (which the peer should interpret as the default value, 1).

params :

parameters for this codec. This is referenced, not copied, so you should avoid modifying this parameter after calling this function. [element-type utf8 utf8][transfer none][allow-none]

Returns :

the codec description. [transfer full]

jingle_media_rtp_compare_codecs ()

gboolean            jingle_media_rtp_compare_codecs     (GList *old,
                                                         GList *new,
                                                         GList **changed,
                                                         GError **e);

jingle_media_rtp_copy_codecs ()

GList *             jingle_media_rtp_copy_codecs        (GList *codecs);

jingle_media_rtp_free_codecs ()

void                jingle_media_rtp_free_codecs        (GList *codecs);

jingle_media_rtp_register ()

void                jingle_media_rtp_register           (WockyJingleFactory *factory);

jingle_media_rtp_set_local_media_description ()

gboolean            jingle_media_rtp_set_local_media_description
                                                        (WockyJingleMediaRtp *self,
                                                         WockyJingleMediaDescription *md,
                                                         gboolean ready,
                                                         GError **error);

Sets or updates the media description (codecs, feedback messages, etc) for self.

self :

a content in an RTP session

md :

new media description for this content. [transfer full]

ready :

whether the codecs can regarded as ready to sent from now on

error :

used to return a WOCKY_XMPP_ERROR if the codec update is illegal.

Returns :

TRUE if no description was previously set, or if the update is compatible with the existing description; FALSE if the update is illegal (due to adding previously-unknown codecs or renaming an existing codec, for example)

wocky_jingle_feedback_message_free ()

void                wocky_jingle_feedback_message_free  (WockyJingleFeedbackMessage *fb);

wocky_jingle_feedback_message_new ()

WockyJingleFeedbackMessage * wocky_jingle_feedback_message_new
                                                        (const gchar *type,
                                                         const gchar *subtype);

wocky_jingle_media_description_copy ()

WockyJingleMediaDescription * wocky_jingle_media_description_copy
                                                        (WockyJingleMediaDescription *md);

Performs a deep copy of a media description.

md :

a media description

Returns :

a deep copy of md. [transfer full]

wocky_jingle_media_description_free ()

void                wocky_jingle_media_description_free (WockyJingleMediaDescription *md);

wocky_jingle_media_description_new ()

WockyJingleMediaDescription * wocky_jingle_media_description_new
                                                        (void);

Allocates a new media description. You should fill in all the fields yourself.

Returns :

a new, empty, media description

wocky_jingle_media_description_simplify ()

void                wocky_jingle_media_description_simplify
                                                        (WockyJingleMediaDescription *md);

Removes duplicated Feedback message and put them in the global structure

This function will iterate over every codec in a description and look for feedback messages that are exactly the same in every codec and will instead put the in the list in the description and remove them from the childs. This limits the amount of duplication in the resulting XML.

md :

a description to simplify

wocky_jingle_media_rtp_get_remote_media_description ()

WockyJingleMediaDescription * wocky_jingle_media_rtp_get_remote_media_description
                                                        (WockyJingleMediaRtp *self);

Gets the current remote media description, if known. The "remote-media-description" signal is emitted when this value changes.

self :

the RTP content

Returns :

the current remote media description, which may be NULL for outgoing calls until it is first received. [transfer none]

wocky_jingle_rtp_header_extension_free ()

void                wocky_jingle_rtp_header_extension_free
                                                        (WockyJingleRtpHeaderExtension *hdrext);

wocky_jingle_rtp_header_extension_new ()

WockyJingleRtpHeaderExtension * wocky_jingle_rtp_header_extension_new
                                                        (guint id,
                                                         WockyJingleContentSenders senders,
                                                         const gchar *uri);