media-gst.h
Go to the documentation of this file.
1 
6 /* purple
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., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25  */
26 
27 #ifndef _PURPLE_MEDIA_GST_H_
28 #define _PURPLE_MEDIA_GST_H_
29 
30 #include "media.h"
31 #include "mediamanager.h"
32 
33 #include <gst/gst.h>
34 
35 G_BEGIN_DECLS
36 
37 #define PURPLE_TYPE_MEDIA_ELEMENT_TYPE (purple_media_element_type_get_type())
38 #define PURPLE_TYPE_MEDIA_ELEMENT_INFO (purple_media_element_info_get_type())
39 #define PURPLE_MEDIA_ELEMENT_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_ELEMENT_INFO, PurpleMediaElementInfo))
40 #define PURPLE_MEDIA_ELEMENT_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_ELEMENT_INFO, PurpleMediaElementInfo))
41 #define PURPLE_IS_MEDIA_ELEMENT_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_ELEMENT_INFO))
42 #define PURPLE_IS_MEDIA_ELEMENT_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_ELEMENT_INFO))
43 #define PURPLE_MEDIA_ELEMENT_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_ELEMENT_INFO, PurpleMediaElementInfo))
44 
46 typedef struct _PurpleMediaElementInfo PurpleMediaElementInfo;
47 typedef struct _PurpleMediaElementInfoClass PurpleMediaElementInfoClass;
48 typedef GstElement *(*PurpleMediaElementCreateCallback)(PurpleMedia *media,
49  const gchar *session_id, const gchar *participant);
50 
51 typedef enum {
52  PURPLE_MEDIA_ELEMENT_NONE = 0,
75 
76 #ifdef __cplusplus
77 extern "C" {
78 #endif
79 
88 
97 
108 GstElement *purple_media_get_src(PurpleMedia *media, const gchar *sess_id);
109 
121 GstElement *purple_media_get_tee(PurpleMedia *media,
122  const gchar *session_id, const gchar *participant);
123 
124 
135 
148  PurpleMediaSessionType type, PurpleMedia *media,
149  const gchar *session_id, const gchar *participant);
150 
151 PurpleMediaElementInfo *purple_media_manager_get_element_info(
152  PurpleMediaManager *manager, const gchar *name);
153 gboolean purple_media_manager_register_element(PurpleMediaManager *manager,
154  PurpleMediaElementInfo *info);
155 gboolean purple_media_manager_unregister_element(PurpleMediaManager *manager,
156  const gchar *name);
157 gboolean purple_media_manager_set_active_element(PurpleMediaManager *manager,
158  PurpleMediaElementInfo *info);
159 PurpleMediaElementInfo *purple_media_manager_get_active_element(
161 
174  GstCaps *caps);
175 
186 
187 gchar *purple_media_element_info_get_id(PurpleMediaElementInfo *info);
188 gchar *purple_media_element_info_get_name(PurpleMediaElementInfo *info);
189 PurpleMediaElementType purple_media_element_info_get_element_type(
190  PurpleMediaElementInfo *info);
191 GstElement *purple_media_element_info_call_create(
192  PurpleMediaElementInfo *info, PurpleMedia *media,
193  const gchar *session_id, const gchar *participant);
194 
195 #ifdef __cplusplus
196 }
197 #endif
198 
199 G_END_DECLS
200 
201 #endif /* _PURPLE_MEDIA_GST_H_ */