annotate libpurple/media/backend-fs2.c @ 29149:4aa30863743b

Create and dispose the conference in the Farsight 2 media backend.
author maiku@pidgin.im
date Thu, 22 Oct 2009 23:29:51 +0000
parents f46979436c78
children 2f8151fed0ae
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29146
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
1 /**
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
2 * @file backend-fs2.c Farsight 2 backend for media API
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
3 * @ingroup core
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
4 */
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
5
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
6 /* purple
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
7 *
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
8 * Purple is the legal property of its developers, whose names are too numerous
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
10 * source distribution.
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
11 *
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
15 * (at your option) any later version.
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
16 *
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
20 * GNU General Public License for more details.
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
21 *
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
25 */
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
26
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
27 #include "backend-fs2.h"
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
28
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
29 #include "backend-iface.h"
29149
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
30 #include "debug.h"
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
31 #include "media-gst.h"
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
32
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
33 #include <gst/farsight/fs-conference-iface.h>
29146
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
34
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
35 /** @copydoc _PurpleMediaBackendFs2Class */
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
36 typedef struct _PurpleMediaBackendFs2Class PurpleMediaBackendFs2Class;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
37 /** @copydoc _PurpleMediaBackendFs2Private */
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
38 typedef struct _PurpleMediaBackendFs2Private PurpleMediaBackendFs2Private;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
39
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
40 #define PURPLE_MEDIA_BACKEND_FS2_GET_PRIVATE(obj) \
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
41 (G_TYPE_INSTANCE_GET_PRIVATE((obj), \
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
42 PURPLE_TYPE_MEDIA_BACKEND_FS2, PurpleMediaBackendFs2Private))
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
43
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
44 static void purple_media_backend_iface_init(PurpleMediaBackendIface *iface);
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
45
29149
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
46 static gboolean
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
47 _gst_bus_cb(GstBus *bus, GstMessage *msg, PurpleMediaBackend *self);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
48
29146
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
49 static gboolean purple_media_backend_fs2_add_stream(PurpleMediaBackend *self,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
50 const gchar *sess_id, const gchar *who,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
51 PurpleMediaSessionType type, gboolean initiator,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
52 const gchar *transmitter,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
53 guint num_params, GParameter *params);
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
54 static void purple_media_backend_fs2_add_remote_candidates(
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
55 PurpleMediaBackend *self,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
56 const gchar *sess_id, const gchar *participant,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
57 GList *remote_candidates);
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
58 static GList *purple_media_backend_fs2_get_codecs(PurpleMediaBackend *self,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
59 const gchar *sess_id);
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
60 static GList *purple_media_backend_fs2_get_local_candidates(
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
61 PurpleMediaBackend *self,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
62 const gchar *sess_id, const gchar *participant);
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
63 static void purple_media_backend_fs2_set_remote_codecs(
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
64 PurpleMediaBackend *self,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
65 const gchar *sess_id, const gchar *participant,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
66 GList *codecs);
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
67 static void purple_media_backend_fs2_set_send_codec(PurpleMediaBackend *self,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
68 const gchar *sess_id, PurpleMediaCodec *codec);
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
69
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
70 struct _PurpleMediaBackendFs2Class
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
71 {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
72 GObjectClass parent_class;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
73 };
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
74
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
75 struct _PurpleMediaBackendFs2
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
76 {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
77 GObject parent;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
78 };
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
79
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
80 G_DEFINE_TYPE_WITH_CODE(PurpleMediaBackendFs2, purple_media_backend_fs2,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
81 G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
82 PURPLE_TYPE_MEDIA_BACKEND, purple_media_backend_iface_init));
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
83
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
84 struct _PurpleMediaBackendFs2Private
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
85 {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
86 PurpleMedia *media;
29149
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
87 GstElement *confbin;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
88 FsConference *conference;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
89 gchar *conference_type;
29146
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
90 };
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
91
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
92 enum {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
93 PROP_0,
29149
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
94 PROP_CONFERENCE_TYPE,
29146
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
95 PROP_MEDIA,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
96 };
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
97
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
98 static void
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
99 purple_media_backend_fs2_init(PurpleMediaBackendFs2 *self)
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
100 {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
101 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
102
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
103 static void
29149
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
104 purple_media_backend_fs2_dispose(GObject *obj)
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
105 {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
106 PurpleMediaBackendFs2Private *priv =
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
107 PURPLE_MEDIA_BACKEND_FS2_GET_PRIVATE(obj);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
108
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
109 if (priv->confbin) {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
110 GstElement *pipeline;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
111
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
112 pipeline = purple_media_manager_get_pipeline(
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
113 purple_media_get_manager(priv->media));
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
114
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
115 gst_element_set_locked_state(priv->confbin, TRUE);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
116 gst_element_set_state(GST_ELEMENT(priv->confbin),
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
117 GST_STATE_NULL);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
118
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
119 if (pipeline) {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
120 GstBus *bus;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
121 gst_bin_remove(GST_BIN(pipeline), priv->confbin);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
122 bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline));
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
123 g_signal_handlers_disconnect_matched(G_OBJECT(bus),
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
124 G_SIGNAL_MATCH_FUNC |
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
125 G_SIGNAL_MATCH_DATA,
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
126 0, 0, 0, _gst_bus_cb, obj);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
127 gst_object_unref(bus);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
128 } else {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
129 purple_debug_warning("backend-fs2", "Unable to "
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
130 "properly dispose the conference. "
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
131 "Couldn't get the pipeline.\n");
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
132 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
133
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
134 priv->confbin = NULL;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
135 priv->conference = NULL;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
136
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
137 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
138
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
139 if (priv->media) {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
140 g_object_unref(priv->media);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
141 priv->media = NULL;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
142 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
143 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
144
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
145 static void
29146
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
146 purple_media_backend_fs2_finalize(GObject *obj)
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
147 {
29149
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
148 PurpleMediaBackendFs2Private *priv =
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
149 PURPLE_MEDIA_BACKEND_FS2_GET_PRIVATE(obj);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
150 g_free(priv->conference_type);
29146
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
151 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
152
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
153 static void
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
154 purple_media_backend_fs2_set_property(GObject *object, guint prop_id,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
155 const GValue *value, GParamSpec *pspec)
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
156 {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
157 PurpleMediaBackendFs2Private *priv;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
158 g_return_if_fail(PURPLE_IS_MEDIA_BACKEND_FS2(object));
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
159
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
160 priv = PURPLE_MEDIA_BACKEND_FS2_GET_PRIVATE(object);
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
161
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
162 switch (prop_id) {
29149
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
163 case PROP_CONFERENCE_TYPE:
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
164 priv->conference_type = g_value_dup_string(value);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
165 break;
29146
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
166 case PROP_MEDIA:
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
167 priv->media = g_value_dup_object(value);
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
168 break;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
169 default:
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
170 G_OBJECT_WARN_INVALID_PROPERTY_ID(
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
171 object, prop_id, pspec);
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
172 break;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
173 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
174 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
175
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
176 static void
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
177 purple_media_backend_fs2_get_property(GObject *object, guint prop_id,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
178 GValue *value, GParamSpec *pspec)
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
179 {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
180 PurpleMediaBackendFs2Private *priv;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
181 g_return_if_fail(PURPLE_IS_MEDIA_BACKEND_FS2(object));
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
182
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
183 priv = PURPLE_MEDIA_BACKEND_FS2_GET_PRIVATE(object);
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
184
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
185 switch (prop_id) {
29149
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
186 case PROP_CONFERENCE_TYPE:
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
187 g_value_set_string(value, priv->conference_type);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
188 break;
29146
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
189 case PROP_MEDIA:
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
190 g_value_set_object(value, priv->media);
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
191 break;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
192 default:
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
193 G_OBJECT_WARN_INVALID_PROPERTY_ID(
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
194 object, prop_id, pspec);
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
195 break;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
196 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
197 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
198
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
199 static void
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
200 purple_media_backend_fs2_class_init(PurpleMediaBackendFs2Class *klass)
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
201 {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
202 GObjectClass *gobject_class = (GObjectClass*)klass;
29149
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
203
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
204 gobject_class->dispose = purple_media_backend_fs2_dispose;
29146
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
205 gobject_class->finalize = purple_media_backend_fs2_finalize;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
206 gobject_class->set_property = purple_media_backend_fs2_set_property;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
207 gobject_class->get_property = purple_media_backend_fs2_get_property;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
208
29149
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
209 g_object_class_override_property(gobject_class, PROP_CONFERENCE_TYPE,
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
210 "conference-type");
29146
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
211 g_object_class_override_property(gobject_class, PROP_MEDIA, "media");
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
212
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
213 g_type_class_add_private(klass, sizeof(PurpleMediaBackendFs2Private));
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
214 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
215
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
216 static void
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
217 purple_media_backend_iface_init(PurpleMediaBackendIface *iface)
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
218 {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
219 iface->add_stream = purple_media_backend_fs2_add_stream;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
220 iface->add_remote_candidates =
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
221 purple_media_backend_fs2_add_remote_candidates;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
222 iface->get_codecs = purple_media_backend_fs2_get_codecs;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
223 iface->get_local_candidates =
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
224 purple_media_backend_fs2_get_local_candidates;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
225 iface->set_remote_codecs = purple_media_backend_fs2_set_remote_codecs;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
226 iface->set_send_codec = purple_media_backend_fs2_set_send_codec;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
227 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
228
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
229 static gboolean
29149
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
230 _gst_bus_cb(GstBus *bus, GstMessage *msg, PurpleMediaBackend *self)
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
231 {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
232 return TRUE;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
233 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
234
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
235 static gboolean
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
236 _init_conference(PurpleMediaBackend *self)
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
237 {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
238 PurpleMediaBackendFs2Private *priv =
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
239 PURPLE_MEDIA_BACKEND_FS2_GET_PRIVATE(self);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
240 GstElement *pipeline;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
241 GstBus *bus;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
242 gchar *name;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
243
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
244 priv->conference = FS_CONFERENCE(
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
245 gst_element_factory_make(priv->conference_type, NULL));
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
246
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
247 if (priv->conference == NULL) {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
248 purple_debug_error("backend-fs2", "Conference == NULL\n");
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
249 return FALSE;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
250 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
251
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
252 pipeline = purple_media_manager_get_pipeline(
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
253 purple_media_manager_get());
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
254
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
255 if (pipeline == NULL) {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
256 purple_debug_error("backend-fs2",
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
257 "Couldn't retrieve pipeline.\n");
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
258 return FALSE;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
259 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
260
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
261 name = g_strdup_printf("conf_%p", priv->conference);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
262 priv->confbin = gst_bin_new(name);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
263 if (priv->confbin == NULL) {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
264 purple_debug_error("backend-fs2",
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
265 "Couldn't create confbin.\n");
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
266 return FALSE;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
267 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
268
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
269 g_free(name);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
270
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
271 bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline));
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
272 if (bus == NULL) {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
273 purple_debug_error("backend-fs2",
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
274 "Couldn't get the pipeline's bus.\n");
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
275 return FALSE;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
276 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
277
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
278 g_signal_connect(G_OBJECT(bus), "message",
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
279 G_CALLBACK(_gst_bus_cb), self);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
280 gst_object_unref(bus);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
281
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
282 if (!gst_bin_add(GST_BIN(pipeline),
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
283 GST_ELEMENT(priv->confbin))) {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
284 purple_debug_error("backend-fs2", "Couldn't add confbin "
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
285 "element to the pipeline\n");
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
286 return FALSE;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
287 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
288
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
289 if (!gst_bin_add(GST_BIN(priv->confbin),
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
290 GST_ELEMENT(priv->conference))) {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
291 purple_debug_error("backend-fs2", "Couldn't add conference "
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
292 "element to the confbin\n");
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
293 return FALSE;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
294 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
295
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
296 if (gst_element_set_state(GST_ELEMENT(priv->confbin),
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
297 GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
298 purple_debug_error("backend-fs2",
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
299 "Failed to start conference.\n");
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
300 return FALSE;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
301 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
302
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
303 return TRUE;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
304 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
305
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
306 static gboolean
29146
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
307 purple_media_backend_fs2_add_stream(PurpleMediaBackend *self,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
308 const gchar *sess_id, const gchar *who,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
309 PurpleMediaSessionType type, gboolean initiator,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
310 const gchar *transmitter,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
311 guint num_params, GParameter *params)
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
312 {
29149
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
313 PurpleMediaBackendFs2Private *priv =
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
314 PURPLE_MEDIA_BACKEND_FS2_GET_PRIVATE(self);
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
315
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
316 if (priv->conference == NULL || !_init_conference(self)) {
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
317 purple_debug_error("backend-fs2",
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
318 "Error initializing the conference.\n");
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
319 return FALSE;
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
320 }
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
321
4aa30863743b Create and dispose the conference in the Farsight 2 media backend.
maiku@pidgin.im
parents: 29146
diff changeset
322 return TRUE;
29146
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
323 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
324
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
325 static void
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
326 purple_media_backend_fs2_add_remote_candidates(PurpleMediaBackend *self,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
327 const gchar *sess_id, const gchar *participant,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
328 GList *remote_candidates)
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
329 {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
330 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
331
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
332 static GList *
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
333 purple_media_backend_fs2_get_codecs(PurpleMediaBackend *self,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
334 const gchar *sess_id)
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
335 {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
336 return NULL;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
337 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
338
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
339 static GList *
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
340 purple_media_backend_fs2_get_local_candidates(PurpleMediaBackend *self,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
341 const gchar *sess_id, const gchar *participant)
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
342 {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
343 return NULL;
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
344 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
345
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
346 static void
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
347 purple_media_backend_fs2_set_remote_codecs(PurpleMediaBackend *self,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
348 const gchar *sess_id, const gchar *participant,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
349 GList *codecs)
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
350 {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
351 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
352
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
353 static void
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
354 purple_media_backend_fs2_set_send_codec(PurpleMediaBackend *self,
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
355 const gchar *sess_id, PurpleMediaCodec *codec)
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
356 {
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
357 }
f46979436c78 Skeleton of the Farsight 2 media backend.
maiku@pidgin.im
parents:
diff changeset
358