Mercurial > pidgin
comparison libpurple/media-gst.h @ 32819:2c6510167895 default tip
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24)
to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 02 Jun 2012 02:30:49 +0000 |
parents | 98520ee78f12 |
children |
comparison
equal
deleted
inserted
replaced
32818:01ff09d4a463 | 32819:2c6510167895 |
---|---|
29 | 29 |
30 #include "media.h" | 30 #include "media.h" |
31 #include "mediamanager.h" | 31 #include "mediamanager.h" |
32 | 32 |
33 #include <gst/gst.h> | 33 #include <gst/gst.h> |
34 | |
35 G_BEGIN_DECLS | |
36 | 34 |
37 #define PURPLE_TYPE_MEDIA_ELEMENT_TYPE (purple_media_element_type_get_type()) | 35 #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()) | 36 #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)) | 37 #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)) | 38 #define PURPLE_MEDIA_ELEMENT_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_ELEMENT_INFO, PurpleMediaElementInfo)) |
71 | 69 |
72 PURPLE_MEDIA_ELEMENT_SRC = 1 << 9, /** can be set as an active src */ | 70 PURPLE_MEDIA_ELEMENT_SRC = 1 << 9, /** can be set as an active src */ |
73 PURPLE_MEDIA_ELEMENT_SINK = 1 << 10, /** can be set as an active sink */ | 71 PURPLE_MEDIA_ELEMENT_SINK = 1 << 10, /** can be set as an active sink */ |
74 } PurpleMediaElementType; | 72 } PurpleMediaElementType; |
75 | 73 |
76 #ifdef __cplusplus | 74 G_BEGIN_DECLS |
77 extern "C" { | |
78 #endif | |
79 | 75 |
80 /** | 76 /** |
81 * Gets the element type's GType. | 77 * Gets the element type's GType. |
82 * | 78 * |
83 * @return The element type's GType. | 79 * @return The element type's GType. |
84 * | |
85 * @since 2.6.0 | |
86 */ | 80 */ |
87 GType purple_media_element_type_get_type(void); | 81 GType purple_media_element_type_get_type(void); |
88 | 82 |
89 /** | 83 /** |
90 * Gets the element info's GType. | 84 * Gets the element info's GType. |
91 * | 85 * |
92 * @return The element info's GType. | 86 * @return The element info's GType. |
93 * | |
94 * @since 2.6.0 | |
95 */ | 87 */ |
96 GType purple_media_element_info_get_type(void); | 88 GType purple_media_element_info_get_type(void); |
97 | 89 |
98 /** | 90 /** |
99 * Gets the source from a session | 91 * Gets the source from a session |
100 * | 92 * |
101 * @param media The media object the session is in. | 93 * @param media The media object the session is in. |
102 * @param sess_id The session id of the session to get the source from. | 94 * @param sess_id The session id of the session to get the source from. |
103 * | 95 * |
104 * @return The source retrieved. | 96 * @return The source retrieved. |
105 * | |
106 * @since 2.6.0 | |
107 */ | 97 */ |
108 GstElement *purple_media_get_src(PurpleMedia *media, const gchar *sess_id); | 98 GstElement *purple_media_get_src(PurpleMedia *media, const gchar *sess_id); |
109 | 99 |
110 /** | 100 /** |
111 * Gets the tee from a given session/stream. | 101 * Gets the tee from a given session/stream. |
113 * @param media The instance to get the tee from. | 103 * @param media The instance to get the tee from. |
114 * @param session_id The id of the session to get the tee from. | 104 * @param session_id The id of the session to get the tee from. |
115 * @param participant Optionally, the participant of the stream to get the tee from. | 105 * @param participant Optionally, the participant of the stream to get the tee from. |
116 * | 106 * |
117 * @return The GstTee element from the chosen session/stream. | 107 * @return The GstTee element from the chosen session/stream. |
118 * | |
119 * @since 2.6.0 | |
120 */ | 108 */ |
121 GstElement *purple_media_get_tee(PurpleMedia *media, | 109 GstElement *purple_media_get_tee(PurpleMedia *media, |
122 const gchar *session_id, const gchar *participant); | 110 const gchar *session_id, const gchar *participant); |
123 | 111 |
124 | 112 |
126 * Gets the pipeline from the media manager. | 114 * Gets the pipeline from the media manager. |
127 * | 115 * |
128 * @param manager The media manager to get the pipeline from. | 116 * @param manager The media manager to get the pipeline from. |
129 * | 117 * |
130 * @return The pipeline. | 118 * @return The pipeline. |
131 * | |
132 * @since 2.6.0 | |
133 */ | 119 */ |
134 GstElement *purple_media_manager_get_pipeline(PurpleMediaManager *manager); | 120 GstElement *purple_media_manager_get_pipeline(PurpleMediaManager *manager); |
135 | 121 |
136 /** | 122 /** |
137 * Returns a GStreamer source or sink for audio or video. | 123 * Returns a GStreamer source or sink for audio or video. |
139 * @param manager The media manager to use to obtain the source/sink. | 125 * @param manager The media manager to use to obtain the source/sink. |
140 * @param type The type of source/sink to get. | 126 * @param type The type of source/sink to get. |
141 * @param media The media call this element is requested for. | 127 * @param media The media call this element is requested for. |
142 * @param session_id The id of the session this element is requested for or NULL. | 128 * @param session_id The id of the session this element is requested for or NULL. |
143 * @param participant The remote user this element is requested for or NULL. | 129 * @param participant The remote user this element is requested for or NULL. |
144 * | |
145 * @since 2.6.0 | |
146 */ | 130 */ |
147 GstElement *purple_media_manager_get_element(PurpleMediaManager *manager, | 131 GstElement *purple_media_manager_get_element(PurpleMediaManager *manager, |
148 PurpleMediaSessionType type, PurpleMedia *media, | 132 PurpleMediaSessionType type, PurpleMedia *media, |
149 const gchar *session_id, const gchar *participant); | 133 const gchar *session_id, const gchar *participant); |
150 | 134 |
165 * Useful to force negotiation of smaller picture resolution more suitable for | 149 * Useful to force negotiation of smaller picture resolution more suitable for |
166 * use with particular codec and communication protocol without rescaling. | 150 * use with particular codec and communication protocol without rescaling. |
167 * | 151 * |
168 * @param manager The media manager to set the media formats. | 152 * @param manager The media manager to set the media formats. |
169 * @param caps Set of allowed media formats. | 153 * @param caps Set of allowed media formats. |
170 * | |
171 * @since 2.8.0 | |
172 */ | 154 */ |
173 void purple_media_manager_set_video_caps(PurpleMediaManager *manager, | 155 void purple_media_manager_set_video_caps(PurpleMediaManager *manager, |
174 GstCaps *caps); | 156 GstCaps *caps); |
175 | 157 |
176 /** | 158 /** |
177 * Returns current set of media formats limiting the output from video source. | 159 * Returns current set of media formats limiting the output from video source. |
178 * | 160 * |
179 * @param manager The media manager to get the media formats from. | 161 * @param manager The media manager to get the media formats from. |
180 * | 162 * |
181 * @return @c GstCaps limiting the video source's formats. | 163 * @return @c GstCaps limiting the video source's formats. |
182 * | |
183 * @since 2.8.0 | |
184 */ | 164 */ |
185 GstCaps *purple_media_manager_get_video_caps(PurpleMediaManager *manager); | 165 GstCaps *purple_media_manager_get_video_caps(PurpleMediaManager *manager); |
186 | 166 |
187 gchar *purple_media_element_info_get_id(PurpleMediaElementInfo *info); | 167 gchar *purple_media_element_info_get_id(PurpleMediaElementInfo *info); |
188 gchar *purple_media_element_info_get_name(PurpleMediaElementInfo *info); | 168 gchar *purple_media_element_info_get_name(PurpleMediaElementInfo *info); |
190 PurpleMediaElementInfo *info); | 170 PurpleMediaElementInfo *info); |
191 GstElement *purple_media_element_info_call_create( | 171 GstElement *purple_media_element_info_call_create( |
192 PurpleMediaElementInfo *info, PurpleMedia *media, | 172 PurpleMediaElementInfo *info, PurpleMedia *media, |
193 const gchar *session_id, const gchar *participant); | 173 const gchar *session_id, const gchar *participant); |
194 | 174 |
195 #ifdef __cplusplus | |
196 } | |
197 #endif | |
198 | |
199 G_END_DECLS | 175 G_END_DECLS |
200 | 176 |
201 #endif /* _PURPLE_MEDIA_GST_H_ */ | 177 #endif /* _PURPLE_MEDIA_GST_H_ */ |