Mercurial > pidgin.yaz
annotate libpurple/mediamanager.c @ 26059:18b71033ea6e
Remove connection attribute from PurpleMedia.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Tue, 16 Dec 2008 01:27:51 +0000 |
parents | 431c59a6959d |
children | 0829a08038c6 |
rev | line source |
---|---|
25546 | 1 /** |
25552 | 2 * @file mediamanager.c Media Manager API |
25546 | 3 * @ingroup core |
25715
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25706
diff
changeset
|
4 */ |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25706
diff
changeset
|
5 |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25706
diff
changeset
|
6 /* purple |
25546 | 7 * |
8 * Purple is the legal property of its developers, whose names are too numerous | |
9 * to list here. Please refer to the COPYRIGHT file distributed with this | |
10 * source distribution. | |
11 * | |
12 * This program is free software; you can redistribute it and/or modify | |
13 * it under the terms of the GNU General Public License as published by | |
14 * the Free Software Foundation; either version 2 of the License, or | |
15 * (at your option) any later version. | |
16 * | |
17 * This program is distributed in the hope that it will be useful, | |
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 * GNU General Public License for more details. | |
21 * | |
22 * You should have received a copy of the GNU General Public License | |
23 * along with this program; if not, write to the Free Software | |
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
25 */ | |
26 | |
25552 | 27 #include "internal.h" |
28 | |
25546 | 29 #include "connection.h" |
26006
0baeafee93be
Gracefully handle missing the fsrtpconference GStreamer plugin.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25727
diff
changeset
|
30 #include "debug.h" |
25723
1d9a2296d5d2
Stop additional media sessions within a single conversation for grouped contacts.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
31 #include "marshallers.h" |
25546 | 32 #include "mediamanager.h" |
33 #include "media.h" | |
34 | |
25654
cbe97caec684
Use USE_VV instead of USE_FARSIGHT.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25651
diff
changeset
|
35 #ifdef USE_VV |
25546 | 36 |
25647
e1c8ec1259de
Updates voice and video to use Farsight 2, gets XMPP voice conferences
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25560
diff
changeset
|
37 #include <gst/farsight/fs-conference-iface.h> |
25546 | 38 |
39 struct _PurpleMediaManagerPrivate | |
40 { | |
41 GList *medias; | |
42 }; | |
43 | |
44 #define PURPLE_MEDIA_MANAGER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManagerPrivate)) | |
45 | |
46 static void purple_media_manager_class_init (PurpleMediaManagerClass *klass); | |
47 static void purple_media_manager_init (PurpleMediaManager *media); | |
48 static void purple_media_manager_finalize (GObject *object); | |
49 | |
50 static GObjectClass *parent_class = NULL; | |
51 | |
52 | |
53 | |
54 enum { | |
25548
70cdff43ec76
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@gmail.com>
parents:
25547
diff
changeset
|
55 INIT_MEDIA, |
25546 | 56 LAST_SIGNAL |
57 }; | |
58 static guint purple_media_manager_signals[LAST_SIGNAL] = {0}; | |
59 | |
60 enum { | |
61 PROP_0, | |
62 PROP_FARSIGHT_SESSION, | |
63 PROP_NAME, | |
64 PROP_CONNECTION, | |
65 PROP_MIC_ELEMENT, | |
66 PROP_SPEAKER_ELEMENT, | |
67 }; | |
68 | |
69 GType | |
70 purple_media_manager_get_type() | |
71 { | |
72 static GType type = 0; | |
73 | |
74 if (type == 0) { | |
75 static const GTypeInfo info = { | |
76 sizeof(PurpleMediaManagerClass), | |
77 NULL, | |
78 NULL, | |
79 (GClassInitFunc) purple_media_manager_class_init, | |
80 NULL, | |
81 NULL, | |
82 sizeof(PurpleMediaManager), | |
83 0, | |
25560
750d700098c1
Fix the prplinfo structs and get rid of some compile warnings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
25552
diff
changeset
|
84 (GInstanceInitFunc) purple_media_manager_init, |
750d700098c1
Fix the prplinfo structs and get rid of some compile warnings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
25552
diff
changeset
|
85 NULL |
25546 | 86 }; |
87 type = g_type_register_static(G_TYPE_OBJECT, "PurpleMediaManager", &info, 0); | |
88 } | |
89 return type; | |
90 } | |
91 | |
92 | |
93 static void | |
94 purple_media_manager_class_init (PurpleMediaManagerClass *klass) | |
95 { | |
96 GObjectClass *gobject_class = (GObjectClass*)klass; | |
97 parent_class = g_type_class_peek_parent(klass); | |
98 | |
99 gobject_class->finalize = purple_media_manager_finalize; | |
100 | |
25548
70cdff43ec76
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@gmail.com>
parents:
25547
diff
changeset
|
101 purple_media_manager_signals[INIT_MEDIA] = g_signal_new ("init-media", |
25546 | 102 G_TYPE_FROM_CLASS (klass), |
103 G_SIGNAL_RUN_LAST, | |
104 0, NULL, NULL, | |
26059
18b71033ea6e
Remove connection attribute from PurpleMedia.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26026
diff
changeset
|
105 purple_smarshal_BOOLEAN__OBJECT_POINTER_STRING, |
18b71033ea6e
Remove connection attribute from PurpleMedia.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26026
diff
changeset
|
106 G_TYPE_BOOLEAN, 3, PURPLE_TYPE_MEDIA, |
18b71033ea6e
Remove connection attribute from PurpleMedia.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26026
diff
changeset
|
107 G_TYPE_POINTER, G_TYPE_STRING); |
25547 | 108 g_type_class_add_private(klass, sizeof(PurpleMediaManagerPrivate)); |
25546 | 109 } |
110 | |
111 static void | |
112 purple_media_manager_init (PurpleMediaManager *media) | |
113 { | |
114 media->priv = PURPLE_MEDIA_MANAGER_GET_PRIVATE(media); | |
25547 | 115 media->priv->medias = NULL; |
25546 | 116 } |
117 | |
118 static void | |
119 purple_media_manager_finalize (GObject *media) | |
120 { | |
25727
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
121 PurpleMediaManagerPrivate *priv = PURPLE_MEDIA_MANAGER_GET_PRIVATE(media); |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
122 for (; priv->medias; priv->medias = |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
123 g_list_delete_link(priv->medias, priv->medias)) { |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
124 g_object_unref(priv->medias->data); |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
125 } |
25546 | 126 parent_class->finalize(media); |
127 } | |
128 | |
129 PurpleMediaManager * | |
130 purple_media_manager_get() | |
131 { | |
132 static PurpleMediaManager *manager = NULL; | |
133 | |
134 if (manager == NULL) | |
135 manager = PURPLE_MEDIA_MANAGER(g_object_new(purple_media_manager_get_type(), NULL)); | |
136 return manager; | |
137 } | |
138 | |
25647
e1c8ec1259de
Updates voice and video to use Farsight 2, gets XMPP voice conferences
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25560
diff
changeset
|
139 PurpleMedia * |
e1c8ec1259de
Updates voice and video to use Farsight 2, gets XMPP voice conferences
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25560
diff
changeset
|
140 purple_media_manager_create_media(PurpleMediaManager *manager, |
25546 | 141 PurpleConnection *gc, |
25647
e1c8ec1259de
Updates voice and video to use Farsight 2, gets XMPP voice conferences
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25560
diff
changeset
|
142 const char *conference_type, |
e1c8ec1259de
Updates voice and video to use Farsight 2, gets XMPP voice conferences
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25560
diff
changeset
|
143 const char *remote_user) |
25546 | 144 { |
25651
43b3b9ff6028
Added better Farsight error handling. Fixes several crash bugs related
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25647
diff
changeset
|
145 PurpleMedia *media; |
25647
e1c8ec1259de
Updates voice and video to use Farsight 2, gets XMPP voice conferences
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25560
diff
changeset
|
146 FsConference *conference = FS_CONFERENCE(gst_element_factory_make(conference_type, NULL)); |
25706
1c68f78414b7
Set the media pipeline to PLAYING immediately after initialization
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
147 GstStateChangeReturn ret; |
25723
1d9a2296d5d2
Stop additional media sessions within a single conversation for grouped contacts.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
148 gboolean signal_ret; |
25651
43b3b9ff6028
Added better Farsight error handling. Fixes several crash bugs related
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25647
diff
changeset
|
149 |
26006
0baeafee93be
Gracefully handle missing the fsrtpconference GStreamer plugin.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25727
diff
changeset
|
150 if (conference == NULL) { |
0baeafee93be
Gracefully handle missing the fsrtpconference GStreamer plugin.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25727
diff
changeset
|
151 purple_conv_present_error(remote_user, |
0baeafee93be
Gracefully handle missing the fsrtpconference GStreamer plugin.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25727
diff
changeset
|
152 purple_connection_get_account(gc), |
0baeafee93be
Gracefully handle missing the fsrtpconference GStreamer plugin.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25727
diff
changeset
|
153 _("Error creating conference.")); |
0baeafee93be
Gracefully handle missing the fsrtpconference GStreamer plugin.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25727
diff
changeset
|
154 purple_debug_error("media", "Conference == NULL\n"); |
0baeafee93be
Gracefully handle missing the fsrtpconference GStreamer plugin.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25727
diff
changeset
|
155 return NULL; |
0baeafee93be
Gracefully handle missing the fsrtpconference GStreamer plugin.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25727
diff
changeset
|
156 } |
0baeafee93be
Gracefully handle missing the fsrtpconference GStreamer plugin.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25727
diff
changeset
|
157 |
25651
43b3b9ff6028
Added better Farsight error handling. Fixes several crash bugs related
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25647
diff
changeset
|
158 media = PURPLE_MEDIA(g_object_new(purple_media_get_type(), |
43b3b9ff6028
Added better Farsight error handling. Fixes several crash bugs related
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25647
diff
changeset
|
159 "screenname", remote_user, |
43b3b9ff6028
Added better Farsight error handling. Fixes several crash bugs related
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25647
diff
changeset
|
160 "farsight-conference", conference, |
43b3b9ff6028
Added better Farsight error handling. Fixes several crash bugs related
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25647
diff
changeset
|
161 NULL)); |
25706
1c68f78414b7
Set the media pipeline to PLAYING immediately after initialization
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
162 |
1c68f78414b7
Set the media pipeline to PLAYING immediately after initialization
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
163 ret = gst_element_set_state(purple_media_get_pipeline(media), GST_STATE_PLAYING); |
1c68f78414b7
Set the media pipeline to PLAYING immediately after initialization
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
164 |
1c68f78414b7
Set the media pipeline to PLAYING immediately after initialization
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
165 if (ret == GST_STATE_CHANGE_FAILURE) { |
1c68f78414b7
Set the media pipeline to PLAYING immediately after initialization
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
166 purple_conv_present_error(remote_user, |
1c68f78414b7
Set the media pipeline to PLAYING immediately after initialization
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
167 purple_connection_get_account(gc), |
1c68f78414b7
Set the media pipeline to PLAYING immediately after initialization
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
168 _("Error creating conference.")); |
26006
0baeafee93be
Gracefully handle missing the fsrtpconference GStreamer plugin.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25727
diff
changeset
|
169 purple_debug_error("media", "Failed to start conference.\n"); |
25706
1c68f78414b7
Set the media pipeline to PLAYING immediately after initialization
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
170 g_object_unref(media); |
1c68f78414b7
Set the media pipeline to PLAYING immediately after initialization
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
171 return NULL; |
1c68f78414b7
Set the media pipeline to PLAYING immediately after initialization
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
172 } |
1c68f78414b7
Set the media pipeline to PLAYING immediately after initialization
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
173 |
25723
1d9a2296d5d2
Stop additional media sessions within a single conversation for grouped contacts.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
174 g_signal_emit(manager, purple_media_manager_signals[INIT_MEDIA], 0, |
26059
18b71033ea6e
Remove connection attribute from PurpleMedia.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26026
diff
changeset
|
175 media, gc, remote_user, &signal_ret); |
25723
1d9a2296d5d2
Stop additional media sessions within a single conversation for grouped contacts.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
176 |
1d9a2296d5d2
Stop additional media sessions within a single conversation for grouped contacts.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
177 if (signal_ret == FALSE) { |
1d9a2296d5d2
Stop additional media sessions within a single conversation for grouped contacts.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
178 g_object_unref(media); |
1d9a2296d5d2
Stop additional media sessions within a single conversation for grouped contacts.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
179 return NULL; |
1d9a2296d5d2
Stop additional media sessions within a single conversation for grouped contacts.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
180 } |
1d9a2296d5d2
Stop additional media sessions within a single conversation for grouped contacts.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
181 |
25546 | 182 manager->priv->medias = g_list_append(manager->priv->medias, media); |
183 return media; | |
184 } | |
185 | |
25727
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
186 GList * |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
187 purple_media_manager_get_media(PurpleMediaManager *manager) |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
188 { |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
189 return manager->priv->medias; |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
190 } |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
191 |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
192 void |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
193 purple_media_manager_remove_media(PurpleMediaManager *manager, |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
194 PurpleMedia *media) |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
195 { |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
196 GList *list = g_list_find(manager->priv->medias, media); |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
197 if (list) |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
198 manager->priv->medias = |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
199 g_list_delete_link(manager->priv->medias, list); |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
200 } |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25723
diff
changeset
|
201 |
26026
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
202 GstElement * |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
203 purple_media_manager_get_element(PurpleMediaManager *manager, |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
204 PurpleMediaSessionType type) |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
205 { |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
206 GstElement *ret = NULL; |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
207 GstElement *level = NULL; |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
208 |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
209 /* TODO: If src, retrieve current src */ |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
210 /* TODO: Send a signal here to allow for overriding the source/sink */ |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
211 |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
212 if (type & PURPLE_MEDIA_SEND_AUDIO) |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
213 purple_media_audio_init_src(&ret, &level); |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
214 else if (type & PURPLE_MEDIA_RECV_AUDIO) |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
215 purple_media_audio_init_recv(&ret, &level); |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
216 else if (type & PURPLE_MEDIA_SEND_VIDEO) |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
217 purple_media_video_init_src(&ret); |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
218 else if (type & PURPLE_MEDIA_RECV_VIDEO) |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
219 purple_media_video_init_recv(&ret); |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
220 |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
221 if (ret == NULL) |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
222 purple_debug_error("media", "Error creating source or sink\n"); |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
223 |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
224 return ret; |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
225 } |
431c59a6959d
Add purple_media_manager_get_element.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26006
diff
changeset
|
226 |
25654
cbe97caec684
Use USE_VV instead of USE_FARSIGHT.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25651
diff
changeset
|
227 #endif /* USE_VV */ |