--- a/libpurple/media-gst.h Thu Mar 21 00:19:08 2024 -0500
+++ b/libpurple/media-gst.h Thu Mar 21 22:18:04 2024 -0500
@@ -47,6 +47,19 @@
PURPLE_AVAILABLE_TYPE_IN_2_6
typedef struct _PurpleMediaElementInfo PurpleMediaElementInfo;
+ * PurpleMediaElementCreateCallback: + * @session_id: The session id. + * @participant: The participant. + * A callback that creates a GstElement for the given parameters. + * Returns: (transfer full): The new element. PURPLE_AVAILABLE_TYPE_IN_2_6
typedef GstElement *(*PurpleMediaElementCreateCallback)(
PurpleMediaElementInfo *info, PurpleMedia *media,
@@ -73,6 +86,8 @@
* @PURPLE_MEDIA_ELEMENT_SINK: can be set as an active sink
* @PURPLE_MEDIA_ELEMENT_APPLICATION: supports application data
+ * The possible types of media elements. PURPLE_AVAILABLE_TYPE_IN_2_6
@@ -157,6 +172,8 @@
* @session_id: The id of the session this element is requested for or NULL.
* @participant: The remote user this element is requested for or NULL.
+ * Gets the media element for the given session. * Returns: (transfer full): A GStreamer source or sink for audio or video.
@@ -171,6 +188,8 @@
* @manager: The media manager to use to obtain the element infos.
* @type: The type of element infos to get.
+ * Enumerates the elements in @manager filtered by @type. * Returns: (transfer container) (element-type PurpleMediaElementInfo): A #GList of registered #PurpleMediaElementInfo instances that match
@@ -184,6 +203,8 @@
* @manager: The #PurpleMediaManager instance
* @name: The name of the element to get.
+ * Gets the element info for the element named @name in @manager. * Returns: (transfer full): The #PurpleMediaElementInfo for @name or NULL.
@@ -192,14 +213,47 @@
PurpleMediaElementInfo *purple_media_manager_get_element_info(
PurpleMediaManager *manager, const gchar *name);
+ * purple_media_manager_register_element: + * @manager: The instance. + * @info: THe new element to register. + * Registers @info with @manager. + * Returns: %TRUE if successful, otherwise %FALSE. gboolean purple_media_manager_register_element(PurpleMediaManager *manager,
PurpleMediaElementInfo *info);
+ * purple_media_manager_unregister_element: + * @manager: The instance. + * @name: The name of the element to unregister. + * Unregisters the elemented named @name from @manager. + * Returns: %TRUE if the element was found and removed, otherwise %FALSE. gboolean purple_media_manager_unregister_element(PurpleMediaManager *manager,
+ * purple_media_manager_set_active_element: + * @manager: The instance. + * @info: The new element to activate. + * Attempts to activate @info as the active element. + * Returns: %TRUE if successful, otherwise %FALSE. gboolean purple_media_manager_set_active_element(PurpleMediaManager *manager,
PurpleMediaElementInfo *info);
@@ -209,6 +263,8 @@
* @manager: The #PurpleMediaManager instance
* @type: The #PurpleMediaElementType who's info to get
+ * Gets the element that is currently active. * Returns: (transfer none): The #PurpleMediaElementInfo for @type.
@@ -246,12 +302,42 @@
GstCaps *purple_media_manager_get_video_caps(PurpleMediaManager *manager);
+ * purple_media_element_info_get_id: + * Gets the identifier from @info. + * Returns: The identifier. gchar *purple_media_element_info_get_id(PurpleMediaElementInfo *info);
+ * purple_media_element_info_get_name: + * Gets the name of @info. + * Returns: The name of @info. gchar *purple_media_element_info_get_name(PurpleMediaElementInfo *info);
+ * purple_media_element_info_get_element_type: + * Gets the element type of @info. + * Returns: The element type. PurpleMediaElementType purple_media_element_info_get_element_type(
PurpleMediaElementInfo *info);
@@ -259,9 +345,11 @@
* purple_media_element_info_call_create:
* @info: The #PurpleMediaElementInfo to create the element from
+ * @media: The media instance. + * @session_id: The session id. + * @participant: The participant. * Returns: (transfer full): The new GstElement.
--- a/libpurple/media.c Thu Mar 21 00:19:08 2024 -0500
+++ b/libpurple/media.c Thu Mar 21 22:18:04 2024 -0500
@@ -128,6 +128,11 @@
gobject_class->set_property = purple_media_set_property;
gobject_class->get_property = purple_media_get_property;
+ * The manager that this media is tied to. g_object_class_install_property(gobject_class, PROP_MANAGER,
g_param_spec_object("manager",
@@ -136,6 +141,11 @@
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ * The backend for this media. * This one should be PURPLE_TYPE_MEDIA_BACKEND, but it doesn't
* like interfaces because they "aren't GObjects"
@@ -147,6 +157,11 @@
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ * The [class@Account] that this media belongs to. g_object_class_install_property(gobject_class, PROP_ACCOUNT,
g_param_spec_object("account", "PurpleAccount",
"The account this media session is on.",
@@ -154,6 +169,11 @@
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ * PurpleMedia:conference-type: + * The conference type of this media. g_object_class_install_property(gobject_class, PROP_CONFERENCE_TYPE,
g_param_spec_string("conference-type",
@@ -163,6 +183,11 @@
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ * PurpleMedia:initiator: + * Whether or not the local user initiated the conference. g_object_class_install_property(gobject_class, PROP_INITIATOR,
g_param_spec_boolean("initiator",
@@ -171,44 +196,126 @@
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ * PurpleMedia:protocol-data: + * Protocol specific data for the media. g_object_class_install_property(gobject_class, PROP_PROTOCOL_DATA,
g_param_spec_pointer("protocol-data",
"Data the protocol set on the media session.",
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ * @media: The instance. + * @message: The error message. + * Emitted by [method@Media.error]. signals[SIG_ERROR] = g_signal_new("error", G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_STRING);
+ * PurpleMedia::candidates-prepared: + * @media: The instance. + * @session_id: The session id. + * @name: The candidate element name. + * Emitted when a candidate element has been determined. signals[SIG_CANDIDATES_PREPARED] = g_signal_new("candidates-prepared",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
G_TYPE_NONE, 2, G_TYPE_STRING,
+ * PurpleMedia::codecs-changed: + * @media: The instance. + * @session_id: The session id. + * Emitted when the codecs have changed. signals[SIG_CODECS_CHANGED] = g_signal_new("codecs-changed",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_STRING);
+ * @media: The instance. + * @session_id: The session. + * @participant: The participant. + * @level: The new level. + * Emitted when the volume of a participant has changed. I think? signals[SIG_LEVEL] = g_signal_new("level",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
G_TYPE_NONE, 3, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_DOUBLE);
+ * PurpleMedia::new-candidate: + * @media: The instance. + * @session_id: The session id. + * @participant: The participant. + * @candidate: The new candidate. + * Emitted when a new media candidate is available. signals[SIG_NEW_CANDIDATE] = g_signal_new("new-candidate",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
G_TYPE_NONE, 3, G_TYPE_POINTER,
G_TYPE_POINTER, PURPLE_MEDIA_TYPE_CANDIDATE);
+ * PurpleMedia::state-changed: + * @media: The instance. + * @newstate: The new state. + * @session_id: The session id. + * @participant: The participant. + * Emitted when the media's state has changed. signals[SIG_STATE_CHANGED] = g_signal_new("state-changed",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
G_TYPE_NONE, 3, PURPLE_MEDIA_TYPE_STATE,
G_TYPE_STRING, G_TYPE_STRING);
+ * PurpleMedia::stream-info: + * @media: The instance. + * @type: The type of the media. + * @session_id: The session id. + * @participant: The participant. + * @local: Whether this request originated from the libpurple user. + * Emitted when information about the stream is available. signals[SIG_STREAM_INFO] = g_signal_new("stream-info",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
G_TYPE_NONE, 4, PURPLE_MEDIA_TYPE_INFO_TYPE,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
+ * PurpleMedia::candidate-pair-established: + * @media: The instance. + * @session_id: The session id. + * @name: The element name. + * @local_candidate: The local candidate. + * @remote_candidate: The remote candidate. + * Emitted when candidates have been established for a session. signals[SIG_CANDIDATE_PAIR_ESTABLISHED] = g_signal_new("candidate-pair-established",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
--- a/libpurple/media/backend-iface.c Thu Mar 21 00:19:08 2024 -0500
+++ b/libpurple/media/backend-iface.c Thu Mar 21 22:18:04 2024 -0500
@@ -42,6 +42,11 @@
+ * PurpleMediaBackend:conference-type: + * The type of the conference. g_object_interface_install_property(iface,
g_param_spec_string("conference-type",
@@ -50,6 +55,12 @@
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ * PurpleMediaBackend:media: + * The media object that this back end is bound to. g_object_interface_install_property(iface,
@@ -57,24 +68,70 @@
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ * PurpleMediaBackend::error: + * @backend: The backend instance. + * @message: The error message. + * Emitted when the backend has encountered an error. signals[SIG_ERROR] = g_signal_new("error",
G_TYPE_FROM_CLASS(iface),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_STRING);
+ * PurpleMediaBackend::candidates-prepared: + * @backend: The backend instance. + * @session_id: The session id. + * Emitted when the candidates have been prepared. signals[SIG_CANDIDATES_PREPARED] = g_signal_new("candidates-prepared",
G_TYPE_FROM_CLASS(iface),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
G_TYPE_NONE, 2, G_TYPE_STRING,
+ * PurpleMediaBackend::codecs-changed: + * @backend: The backend instance. + * @session_id: The session id. + * Emitted when the codecs have changed. signals[SIG_CODECS_CHANGED] = g_signal_new("codecs-changed",
G_TYPE_FROM_CLASS(iface),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_STRING);
+ * PurpleMediaBackend::new-candidate: + * @backend: The backend instance. + * @session_id: The session id. + * @participant: The participant. + * @candidate: The new candidate. + * Emitted when a new media candidate is available. signals[SIG_NEW_CANDIDATE] = g_signal_new("new-candidate",
G_TYPE_FROM_CLASS(iface),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
G_TYPE_NONE, 3, G_TYPE_POINTER,
G_TYPE_POINTER, PURPLE_MEDIA_TYPE_CANDIDATE);
+ * PurpleMediaBackend::active-candidate-pair: + * @backend: The backend instance. + * @session_id: The session id. + * @participant: The participant. + * @candidate1: The first candidate. + * @candidate2: The second candidate. + * This is currently not emitted any, so I'd be guessing... signals[SIG_ACTIVE_CANDIDATE_PAIR] = g_signal_new("active-candidate-pair",
G_TYPE_FROM_CLASS(iface),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
--- a/libpurple/media/candidate.c Thu Mar 21 00:19:08 2024 -0500
+++ b/libpurple/media/candidate.c Thu Mar 21 22:18:04 2024 -0500
@@ -223,6 +223,11 @@
gobject_class->set_property = purple_media_candidate_set_property;
gobject_class->get_property = purple_media_candidate_get_property;
+ * PurpleMediaCandidate:foundation: + * The foundation of the candidate. g_object_class_install_property(gobject_class, PROP_FOUNDATION,
g_param_spec_string("foundation",
@@ -230,6 +235,11 @@
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ * PurpleMediaCandidate:component-id: + * The component id of the candidate. g_object_class_install_property(gobject_class, PROP_COMPONENT_ID,
g_param_spec_uint("component-id",
@@ -237,6 +247,11 @@
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ * PurpleMediaCandidate:ip: + * The IP address of the candidate. g_object_class_install_property(gobject_class, PROP_IP,
g_param_spec_string("ip",
@@ -244,6 +259,11 @@
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ * PurpleMediaCandidate:port: + * The port of the candidate. g_object_class_install_property(gobject_class, PROP_PORT,
g_param_spec_uint("port",
@@ -251,6 +271,11 @@
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ * PurpleMediaCandidate:base-ip: + * The internal IP address of the candidate. g_object_class_install_property(gobject_class, PROP_BASE_IP,
g_param_spec_string("base-ip",
@@ -258,6 +283,11 @@
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ * PurpleMediaCandidate:base-port: + * The internal port of the candidate. g_object_class_install_property(gobject_class, PROP_BASE_PORT,
g_param_spec_uint("base-port",
@@ -265,6 +295,11 @@
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ * PurpleMediaCandidate:protocol: + * The protocol of the candidate. g_object_class_install_property(gobject_class, PROP_PROTOCOL,
g_param_spec_enum("protocol",
@@ -273,6 +308,11 @@
PURPLE_MEDIA_NETWORK_PROTOCOL_UDP,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ * PurpleMediaCandidate:priority: + * The priority of the candidate. g_object_class_install_property(gobject_class, PROP_PRIORITY,
g_param_spec_uint("priority",
@@ -280,6 +320,11 @@
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ * PurpleMediaCandidate:type: + * The type of the candidate. g_object_class_install_property(gobject_class, PROP_TYPE,
g_param_spec_enum("type",
@@ -288,6 +333,11 @@
PURPLE_MEDIA_CANDIDATE_TYPE_HOST,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ * PurpleMediaCandidate:username: + * The username used to connect to the candidate. g_object_class_install_property(gobject_class, PROP_USERNAME,
g_param_spec_string("username",
@@ -295,6 +345,11 @@
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ * PurpleMediaCandidate:password: + * The password used to connect to the candidate. g_object_class_install_property(gobject_class, PROP_PASSWORD,
g_param_spec_string("password",
@@ -302,6 +357,11 @@
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ * PurpleMediaCandidate:ttl: + * The TTL of the candidate. g_object_class_install_property(gobject_class, PROP_TTL,
--- a/libpurple/media/codec.c Thu Mar 21 00:19:08 2024 -0500
+++ b/libpurple/media/codec.c Thu Mar 21 22:18:04 2024 -0500
@@ -156,6 +156,11 @@
gobject_class->set_property = purple_media_codec_set_property;
gobject_class->get_property = purple_media_codec_get_property;
+ * The numeric identifier of the codec. properties[PROP_ID] = g_param_spec_uint("id",
"The numeric identifier of the codec.",
@@ -163,6 +168,11 @@
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
+ * PurpleMediaCodec:encoding-name: + * The name of the codec. properties[PROP_ENCODING_NAME] = g_param_spec_string("encoding-name",
"The name of the codec.",
@@ -170,6 +180,11 @@
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
+ * PurpleMediaCodec:media-type: + * Whether this is an audio, video, or application codec. properties[PROP_MEDIA_TYPE] = g_param_spec_flags("media-type",
"Whether this is an audio, video or application codec.",
@@ -178,18 +193,33 @@
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
+ * PurpleMediaCodec:clock-rate: + * The clock rate for the codec. properties[PROP_CLOCK_RATE] = g_param_spec_uint("clock-rate",
"The function called to create this element.",
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+ * PurpleMediaCodec:channels: + * The number of channels in the codec. properties[PROP_CHANNELS] = g_param_spec_uint("channels",
"The number of channels in this codec.",
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+ * PurpleMediaCodec:optional-params: + * A list of optional parameters for the codec. properties[PROP_OPTIONAL_PARAMS] = g_param_spec_pointer("optional-params",
"A list of optional parameters for the codec.",
--- a/libpurple/mediamanager.c Thu Mar 21 00:19:08 2024 -0500
+++ b/libpurple/mediamanager.c Thu Mar 21 22:18:04 2024 -0500
@@ -134,6 +134,17 @@
gobject_class->finalize = purple_media_manager_finalize;
+ * PurpleMediaManager::init-media: + * @manager: The instance. + * @account: The account. + * @remote_user: The remote user. + * Emitted to initialize @media. + * Returns: %TRUE if @media was initialized. signals[SIG_INIT_MEDIA] = g_signal_new("init-media",
G_TYPE_FROM_CLASS (klass),
@@ -141,6 +152,17 @@
G_TYPE_BOOLEAN, 3, PURPLE_TYPE_MEDIA,
G_TYPE_POINTER, G_TYPE_STRING);
+ * PurpleMediaManager::init-private-media: + * @manager: The instance. + * @account: The account. + * @remote_user: The remote user. + * Emitted to initialize @media but not tell the user interface about it. + * Returns: %TRUE if @media was initialized. signals[SIG_INIT_PRIVATE_MEDIA] = g_signal_new("init-private-media",
G_TYPE_FROM_CLASS (klass),
@@ -148,6 +170,14 @@
G_TYPE_BOOLEAN, 3, PURPLE_TYPE_MEDIA,
G_TYPE_POINTER, G_TYPE_STRING);
+ * PurpleMediaManager::ui-caps-changed: + * @manager: The instance. + * @new_caps: The new capabilities. + * @old_caps: The old capabilities. + * Emitted when the user interface capabilities have changed. signals[SIG_UI_CAPS_CHANGED] = g_signal_new("ui-caps-changed",
G_TYPE_FROM_CLASS (klass),
@@ -155,6 +185,12 @@
G_TYPE_NONE, 2, PURPLE_MEDIA_TYPE_CAPS,
+ * PurpleMediaManager::elements-changed: + * @manager: The instance. + * Emitted when the elements have changed in @manager. signals[SIG_ELEMENTS_CHANGED] = g_signal_new("elements-changed",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
@@ -2339,6 +2375,11 @@
gobject_class->set_property = purple_media_element_info_set_property;
gobject_class->get_property = purple_media_element_info_get_property;
+ * PurpleMediaElementInfo:id: + * The identifier for the element info. g_object_class_install_property(gobject_class, PROP_ID,
g_param_spec_string("id",
@@ -2347,6 +2388,11 @@
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ * PurpleMediaElementInfo:name: + * The name of the element info. g_object_class_install_property(gobject_class, PROP_NAME,
g_param_spec_string("name",
@@ -2355,6 +2401,11 @@
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ * PurpleMediaElementInfo:type: + * The type of the element. g_object_class_install_property(gobject_class, PROP_TYPE,
g_param_spec_flags("type",
@@ -2364,6 +2415,11 @@
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ * PurpleMediaElementInfo:create-cb: + * A call back that is called when the element is created. g_object_class_install_property(gobject_class, PROP_CREATE_CB,
g_param_spec_pointer("create-cb",