#include "media/candidate.h"
#include "media/codec.h"
#include "media/enum-types.h"
#include <glib.h>
#include <glib-object.h>
#include "signals.h"
#include "util.h"
Go to the source code of this file.
Defines | |
#define | PURPLE_TYPE_MEDIA (purple_media_get_type()) |
#define | PURPLE_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA, PurpleMedia)) |
#define | PURPLE_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA, PurpleMediaClass)) |
#define | PURPLE_IS_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA)) |
#define | PURPLE_IS_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA)) |
#define | PURPLE_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA, PurpleMediaClass)) |
Typedefs | |
typedef struct _PurpleMedia | PurpleMedia |
An opaque structure representing a media call. | |
Functions | |
GType | purple_media_get_type (void) |
Gets the media class's GType. | |
GList * | purple_media_get_session_ids (PurpleMedia *media) |
Gets a list of session IDs. | |
PurpleAccount * | purple_media_get_account (PurpleMedia *media) |
Gets the PurpleAccount this media session is on. | |
gpointer | purple_media_get_prpl_data (PurpleMedia *media) |
Gets the prpl data from the media session. | |
void | purple_media_set_prpl_data (PurpleMedia *media, gpointer prpl_data) |
Sets the prpl data on the media session. | |
void | purple_media_error (PurpleMedia *media, const gchar *error,...) |
Signals an error in the media session. | |
void | purple_media_end (PurpleMedia *media, const gchar *session_id, const gchar *participant) |
Ends all streams that match the given parameters. | |
void | purple_media_stream_info (PurpleMedia *media, PurpleMediaInfoType type, const gchar *session_id, const gchar *participant, gboolean local) |
Signals different information about the given stream. | |
gboolean | purple_media_add_stream (PurpleMedia *media, const gchar *sess_id, const gchar *who, PurpleMediaSessionType type, gboolean initiator, const gchar *transmitter, guint num_params, GParameter *params) |
Adds a stream to a session. | |
PurpleMediaSessionType | purple_media_get_session_type (PurpleMedia *media, const gchar *sess_id) |
Gets the session type from a session. | |
struct _PurpleMediaManager * | purple_media_get_manager (PurpleMedia *media) |
Gets the PurpleMediaManager this media session is a part of. | |
GList * | purple_media_get_codecs (PurpleMedia *media, const gchar *sess_id) |
Gets the codecs from a session. | |
void | purple_media_add_remote_candidates (PurpleMedia *media, const gchar *sess_id, const gchar *participant, GList *remote_candidates) |
Adds remote candidates to the stream. | |
GList * | purple_media_get_local_candidates (PurpleMedia *media, const gchar *sess_id, const gchar *participant) |
Gets the local candidates from a stream. | |
gboolean | purple_media_set_remote_codecs (PurpleMedia *media, const gchar *sess_id, const gchar *participant, GList *codecs) |
Sets remote candidates from the stream. | |
gboolean | purple_media_candidates_prepared (PurpleMedia *media, const gchar *session_id, const gchar *participant) |
Returns whether or not the candidates for set of streams are prepared. | |
gboolean | purple_media_set_send_codec (PurpleMedia *media, const gchar *sess_id, PurpleMediaCodec *codec) |
Sets the send codec for the a session. | |
gboolean | purple_media_codecs_ready (PurpleMedia *media, const gchar *sess_id) |
Gets whether a session's codecs are ready to be used. | |
gboolean | purple_media_is_initiator (PurpleMedia *media, const gchar *sess_id, const gchar *participant) |
Gets whether the local user is the conference/session/stream's initiator. | |
gboolean | purple_media_accepted (PurpleMedia *media, const gchar *sess_id, const gchar *participant) |
Gets whether a streams selected have been accepted. | |
void | purple_media_set_input_volume (PurpleMedia *media, const gchar *session_id, double level) |
Sets the input volume of all the selected sessions. | |
void | purple_media_set_output_volume (PurpleMedia *media, const gchar *session_id, const gchar *participant, double level) |
Sets the output volume of all the selected streams. | |
gulong | purple_media_set_output_window (PurpleMedia *media, const gchar *session_id, const gchar *participant, gulong window_id) |
Sets a video output window for the given session/stream. | |
void | purple_media_remove_output_windows (PurpleMedia *media) |
Removes all output windows from a given media session. |
Definition in file media.h.
typedef struct _PurpleMedia PurpleMedia |
gboolean purple_media_accepted | ( | PurpleMedia * | media, | |
const gchar * | sess_id, | |||
const gchar * | participant | |||
) |
Gets whether a streams selected have been accepted.
media | The media object to find the session in. | |
sess_id | The session id of the session to check. | |
participant | The participant to check. |
TRUE
The selected streams have been accepted, or FALSE
otherwise.void purple_media_add_remote_candidates | ( | PurpleMedia * | media, | |
const gchar * | sess_id, | |||
const gchar * | participant, | |||
GList * | remote_candidates | |||
) |
Adds remote candidates to the stream.
media | The media object to find the session in. | |
sess_id | The session id of the session find the stream in. | |
participant | The name of the remote user to add the candidates for. | |
remote_candidates | The remote candidates to add. |
gboolean purple_media_add_stream | ( | PurpleMedia * | media, | |
const gchar * | sess_id, | |||
const gchar * | who, | |||
PurpleMediaSessionType | type, | |||
gboolean | initiator, | |||
const gchar * | transmitter, | |||
guint | num_params, | |||
GParameter * | params | |||
) |
Adds a stream to a session.
It only adds a stream to one audio session or video session as the sess_id
must be unique between sessions.
media | The media object to find the session in. | |
sess_id | The session id of the session to add the stream to. | |
who | The name of the remote user to add the stream for. | |
type | The type of stream to create. | |
initiator | Whether or not the local user initiated the stream. | |
transmitter | The transmitter to use for the stream. | |
num_params | The number of parameters to pass to Farsight. | |
params | The parameters to pass to Farsight. |
TRUE
The stream was added successfully, FALSE
otherwise.gboolean purple_media_candidates_prepared | ( | PurpleMedia * | media, | |
const gchar * | session_id, | |||
const gchar * | participant | |||
) |
Returns whether or not the candidates for set of streams are prepared.
media | The media object to find the remote user in. | |
session_id | The session id of the session to check. | |
participant | The remote user to check for. |
TRUE
All streams for the given session_id/participant combination have candidates prepared, FALSE
otherwise.gboolean purple_media_codecs_ready | ( | PurpleMedia * | media, | |
const gchar * | sess_id | |||
) |
Gets whether a session's codecs are ready to be used.
media | The media object to find the session in. | |
sess_id | The session id of the session to check. |
TRUE
The codecs are ready, or FALSE
otherwise.void purple_media_end | ( | PurpleMedia * | media, | |
const gchar * | session_id, | |||
const gchar * | participant | |||
) |
Ends all streams that match the given parameters.
media | The media object with which to end streams. | |
session_id | The session to end streams on. | |
participant | The participant to end streams with. |
void purple_media_error | ( | PurpleMedia * | media, | |
const gchar * | error, | |||
... | ||||
) |
Signals an error in the media session.
media | The media object to set the state on. | |
error | The format of the error message to send in the signal. | |
... | The arguments to plug into the format. |
PurpleAccount* purple_media_get_account | ( | PurpleMedia * | media | ) |
Gets the PurpleAccount this media session is on.
media | The media session to retrieve the account from. |
GList* purple_media_get_codecs | ( | PurpleMedia * | media, | |
const gchar * | sess_id | |||
) |
Gets the codecs from a session.
media | The media object to find the session in. | |
sess_id | The session id of the session to get the codecs from. |
GList* purple_media_get_local_candidates | ( | PurpleMedia * | media, | |
const gchar * | sess_id, | |||
const gchar * | participant | |||
) |
Gets the local candidates from a stream.
media | The media object to find the session in. | |
sess_id | The session id of the session to find the stream in. | |
participant | The name of the remote user to get the candidates from. |
struct _PurpleMediaManager* purple_media_get_manager | ( | PurpleMedia * | media | ) | [read] |
Gets the PurpleMediaManager this media session is a part of.
media | The media object to get the manager instance from. |
gpointer purple_media_get_prpl_data | ( | PurpleMedia * | media | ) |
Gets the prpl data from the media session.
media | The media session to retrieve the prpl data from. |
GList* purple_media_get_session_ids | ( | PurpleMedia * | media | ) |
Gets a list of session IDs.
media | The media session from which to retrieve session IDs. |
PurpleMediaSessionType purple_media_get_session_type | ( | PurpleMedia * | media, | |
const gchar * | sess_id | |||
) |
Gets the session type from a session.
media | The media object to find the session in. | |
sess_id | The session id of the session to get the type from. |
GType purple_media_get_type | ( | void | ) |
Gets the media class's GType.
gboolean purple_media_is_initiator | ( | PurpleMedia * | media, | |
const gchar * | sess_id, | |||
const gchar * | participant | |||
) |
Gets whether the local user is the conference/session/stream's initiator.
media | The media instance to find the session in. | |
sess_id | The session id of the session to check. | |
participant | The participant of the stream to check. |
void purple_media_remove_output_windows | ( | PurpleMedia * | media | ) |
Removes all output windows from a given media session.
media | The instance to remove all output windows from. |
void purple_media_set_input_volume | ( | PurpleMedia * | media, | |
const gchar * | session_id, | |||
double | level | |||
) |
Sets the input volume of all the selected sessions.
media | The media object the sessions are in. | |
session_id | The session to select (if any). | |
level | The level to set the volume to. |
void purple_media_set_output_volume | ( | PurpleMedia * | media, | |
const gchar * | session_id, | |||
const gchar * | participant, | |||
double | level | |||
) |
Sets the output volume of all the selected streams.
media | The media object the streams are in. | |
session_id | The session to limit the streams to (if any). | |
participant | The participant to limit the streams to (if any). | |
level | The level to set the volume to. |
gulong purple_media_set_output_window | ( | PurpleMedia * | media, | |
const gchar * | session_id, | |||
const gchar * | participant, | |||
gulong | window_id | |||
) |
Sets a video output window for the given session/stream.
media | The media instance to set the output window on. | |
session_id | The session to set the output window on. | |
participant | Optionally, the participant to set the output window on. | |
window_id | The window id use for embedding the video in. |
void purple_media_set_prpl_data | ( | PurpleMedia * | media, | |
gpointer | prpl_data | |||
) |
Sets the prpl data on the media session.
media | The media session to set the prpl data on. | |
prpl_data | The data to set on the media session. |
gboolean purple_media_set_remote_codecs | ( | PurpleMedia * | media, | |
const gchar * | sess_id, | |||
const gchar * | participant, | |||
GList * | codecs | |||
) |
Sets remote candidates from the stream.
media | The media object to find the session in. | |
sess_id | The session id of the session find the stream in. | |
participant | The name of the remote user to set the candidates from. | |
codecs | The list of remote codecs to set. |
TRUE
The codecs were set successfully, or FALSE
otherwise.gboolean purple_media_set_send_codec | ( | PurpleMedia * | media, | |
const gchar * | sess_id, | |||
PurpleMediaCodec * | codec | |||
) |
Sets the send codec for the a session.
media | The media object to find the session in. | |
sess_id | The session id of the session to set the codec for. | |
codec | The codec to set the session to stream. |
TRUE
The codec was successfully changed, or FALSE
otherwise.void purple_media_stream_info | ( | PurpleMedia * | media, | |
PurpleMediaInfoType | type, | |||
const gchar * | session_id, | |||
const gchar * | participant, | |||
gboolean | local | |||
) |
Signals different information about the given stream.
media | The media instance to containing the stream to signal. | |
type | The type of info being signaled. | |
session_id | The id of the session of the stream being signaled. | |
participant | The participant of the stream being signaled. | |
local | TRUE if the info originated locally, FALSE if on the remote end. |