Mercurial > pidgin
annotate src/mediastreamer/msringplayer.h @ 12029:1c771536a032
[gaim-migrate @ 14322]
This _compiles_ for me now. Theres still a bunch of "dereferencing type-punned pointer will break strict-aliasing rules" warning and some redefinition warnings from the various config.h's. The deferencing warnings look like a BE<->LE hack but I left them untouched for the time being.
committer: Tailor Script <tailor@pidgin.im>
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Wed, 09 Nov 2005 09:57:33 +0000 |
parents | e67993da8a22 |
children |
rev | line source |
---|---|
12024 | 1 /* |
2 The mediastreamer library aims at providing modular media processing and I/O | |
3 for linphone, but also for any telephony application. | |
4 Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org | |
5 | |
6 This library is free software; you can redistribute it and/or | |
7 modify it under the terms of the GNU Lesser General Public | |
8 License as published by the Free Software Foundation; either | |
9 version 2.1 of the License, or (at your option) any later version. | |
10 | |
11 This library is distributed in the hope that it will be useful, | |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 Lesser General Public License for more details. | |
15 | |
16 You should have received a copy of the GNU Lesser General Public | |
17 License along with this library; if not, write to the Free Software | |
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 */ | |
20 | |
21 #ifndef MSRINGPLAYER_H | |
22 #define MSRINGPLAYER_H | |
23 | |
24 #include "msfilter.h" | |
25 #include "mssync.h" | |
26 | |
27 | |
28 /*this is the class that implements file reading source filter*/ | |
29 | |
30 #define MS_RING_PLAYER_MAX_OUTPUTS 1 /* max output per filter*/ | |
31 | |
32 #define MS_RING_PLAYER_DEF_GRAN 8192 /* the default granularity*/ | |
33 | |
34 #define MS_RING_PLAYER_END_OF_RING_EVENT 1 | |
35 | |
36 struct _MSRingPlayer | |
37 { | |
38 /* the MSRingPlayer derivates from MSFilter, so the MSFilter object MUST be the first of the MSRingPlayer object | |
39 in order to the object mechanism to work*/ | |
40 MSFilter filter; | |
41 MSFifo *foutputs[MS_RING_PLAYER_MAX_OUTPUTS]; | |
42 MSQueue *qoutputs[MS_RING_PLAYER_MAX_OUTPUTS];\ | |
43 MSSync *sync; | |
44 gint gran; | |
45 gint freq; | |
46 gint rate; | |
47 gint channel; /* number of interleaved channels */ | |
48 gint silence; /* silence time between each ring, in seconds */ | |
49 gint state; | |
50 gint fd; /* the file descriptor of the file being read*/ | |
51 gint silence_bytes; /*silence in number of bytes between each ring */ | |
52 gint current_pos; | |
53 gint need_swap; | |
54 }; | |
55 | |
56 typedef struct _MSRingPlayer MSRingPlayer; | |
57 | |
58 struct _MSRingPlayerClass | |
59 { | |
60 /* the MSRingPlayer derivates from MSFilter, so the MSFilter class MUST be the first of the MSRingPlayer class | |
61 in order to the class mechanism to work*/ | |
62 MSFilterClass parent_class; | |
63 }; | |
64 | |
65 typedef struct _MSRingPlayerClass MSRingPlayerClass; | |
66 | |
67 /* PUBLIC */ | |
68 #define MS_RING_PLAYER(filter) ((MSRingPlayer*)(filter)) | |
69 #define MS_RING_PLAYER_CLASS(klass) ((MSRingPlayerClass*)(klass)) | |
70 MSFilter * ms_ring_player_new(char *name, gint seconds); | |
71 gint ms_ring_player_get_sample_freq(MSRingPlayer *obj); | |
72 | |
73 | |
74 /* FOR INTERNAL USE*/ | |
75 void ms_ring_player_init(MSRingPlayer *r); | |
12029
1c771536a032
[gaim-migrate @ 14322]
Gary Kramlich <grim@reaperworld.com>
parents:
12024
diff
changeset
|
76 gint ms_ring_player_set_property(MSRingPlayer *f, MSFilterProperty prop, void *value); |
12024 | 77 void ms_ring_player_class_init(MSRingPlayerClass *klass); |
78 void ms_ring_player_destroy( MSRingPlayer *obj); | |
79 void ms_ring_player_process(MSRingPlayer *r); | |
80 #define ms_ring_player_set_bufsize(filter,sz) (filter)->gran=(sz) | |
81 void ms_ring_player_setup(MSRingPlayer *r,MSSync *sync); | |
82 #endif |