Sat, 29 Dec 2007 16:54:15 +0000
Fix the prplinfo structs and get rid of some compile warnings.
| 19883 | 1 | /** |
| 19889 | 2 | * @file media.h Media API |
| 19883 | 3 | * @ingroup core |
| 4 | * | |
| 5 | * purple | |
| 6 | * | |
| 7 | * Purple is the legal property of its developers, whose names are too numerous | |
| 8 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 | * source distribution. | |
| 10 | * | |
| 11 | * This program is free software; you can redistribute it and/or modify | |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | */ | |
| 25 | ||
| 26 | #ifndef __MEDIA_H_ | |
| 27 | #define __MEDIA_H_ | |
| 28 | ||
| 29 | #ifdef HAVE_CONFIG_H | |
| 30 | #include "config.h" | |
| 31 | #endif | |
| 32 | ||
| 33 | #ifdef USE_FARSIGHT | |
| 34 | ||
| 35 | #include <farsight/farsight.h> | |
| 36 | #include <glib.h> | |
| 37 | #include <glib-object.h> | |
| 38 | ||
| 39 | #include "connection.h" | |
| 40 | ||
| 41 | G_BEGIN_DECLS | |
| 42 | ||
| 43 | #define PURPLE_TYPE_MEDIA (purple_media_get_type()) | |
| 44 | #define PURPLE_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA, PurpleMedia)) | |
| 45 | #define PURPLE_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA, PurpleMediaClass)) | |
| 46 | #define PURPLE_IS_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA)) | |
| 47 | #define PURPLE_IS_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA)) | |
| 48 | #define PURPLE_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA, PurpleMediaClass)) | |
| 49 | ||
| 50 | typedef struct _PurpleMedia PurpleMedia; | |
| 51 | typedef struct _PurpleMediaClass PurpleMediaClass; | |
| 52 | typedef struct _PurpleMediaPrivate PurpleMediaPrivate; | |
| 53 | ||
| 54 | typedef enum { | |
| 55 | PURPLE_MEDIA_RECV_AUDIO = 1 << 0, | |
| 56 | PURPLE_MEDIA_SEND_AUDIO = 1 << 1, | |
| 57 | PURPLE_MEDIA_RECV_VIDEO = 1 << 2, | |
| 58 | PURPLE_MEDIA_SEND_VIDEO = 1 << 3, | |
| 59 | } PurpleMediaStreamType; | |
| 60 | ||
| 61 | struct _PurpleMediaClass | |
| 62 | { | |
| 63 | GObjectClass parent_class; | |
| 64 | }; | |
| 65 | ||
| 66 | struct _PurpleMedia | |
| 67 | { | |
| 68 | GObject parent; | |
| 69 | PurpleMediaPrivate *priv; | |
| 70 | }; | |
| 71 | ||
|
22071
4c47e360e467
Fix the prplinfo structs and get rid of some compile warnings.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19889
diff
changeset
|
72 | GType purple_media_get_type(void); |
| 19883 | 73 | |
|
19885
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
74 | void purple_media_get_elements(PurpleMedia *media, GstElement **audio_src, GstElement **audio_sink, |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
75 | GstElement **video_src, GstElement **video_sink); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
76 | |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
77 | void purple_media_set_audio_src(PurpleMedia *media, GstElement *video_src); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
78 | void purple_media_set_audio_sink(PurpleMedia *media, GstElement *video_src); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
79 | void purple_media_set_video_src(PurpleMedia *media, GstElement *video_src); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
80 | void purple_media_set_video_sink(PurpleMedia *media, GstElement *video_src); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
81 | |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
82 | GstElement *purple_media_get_audio_src(PurpleMedia *media); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
83 | GstElement *purple_media_get_audio_sink(PurpleMedia *media); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
84 | GstElement *purple_media_get_video_src(PurpleMedia *media); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
85 | GstElement *purple_media_get_video_sink(PurpleMedia *media); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
86 | |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
87 | GstElement *purple_media_get_audio_pipeline(PurpleMedia *media); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
88 | |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
89 | PurpleConnection *purple_media_get_connection(PurpleMedia *media); |
|
19887
fbaae9a97218
Cute little compile errors.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19885
diff
changeset
|
90 | const char *purple_media_get_screenname(PurpleMedia *media); |
|
19885
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
91 | void purple_media_ready(PurpleMedia *media); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
92 | void purple_media_accept(PurpleMedia *media); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
93 | void purple_media_reject(PurpleMedia *media); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
94 | void purple_media_hangup(PurpleMedia *media); |
|
593613a22e57
You can actually receive Google Talk voice calls with crappy UI now
Sean Egan <seanegan@pidgin.im>
parents:
19883
diff
changeset
|
95 | void purple_media_got_hangup(PurpleMedia *media); |
| 19883 | 96 | G_END_DECLS |
| 97 | ||
| 98 | #endif /* USE_FARSIGHT */ | |
| 99 | ||
| 100 | ||
| 101 | #endif /* __MEDIA_H_ */ |