]> sjero.net Git - linphone/blob - coreapi/linphonecore_utils.h
sound daemon: work in progress
[linphone] / coreapi / linphonecore_utils.h
1 /*
2 linphone
3 Copyright (C) 2010 Simon MORLAT (simon.morlat@linphone.org)
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 */
19
20 #ifndef LINPHONECORE_UTILS_H
21 #define LINPHONECORE_UTILS_H
22
23 #ifdef IN_LINPHONE
24 #include "linphonecore.h"
25 #else
26 #include "linphone/linphonecore.h"
27 #endif
28
29 typedef struct _LsdPlayer LsdPlayer;
30 typedef struct _LinphoneSoundDaemon LinphoneSoundDaemon;
31
32 typedef void (*LsdEndOfPlayCallback)(LsdPlayer *p);
33
34 LinphoneSoundDaemon * linphone_sound_daemon_new(const char *cardname);
35
36 LsdPlayer * linphone_sound_daemon_get_player(LinphoneSoundDaemon *lsd);
37 void linphone_sound_daemon_release_player(LinphoneSoundDaemon *lsd, LsdPlayer *lsdplayer);
38
39 MSFilter *linphone_sound_daemon_get_proxy(LinphoneSoundDaemon *obj);
40
41 void linphone_sound_daemon_destroy(LinphoneSoundDaemon *obj);
42
43 void lsd_player_set_callback(LsdPlayer *p, LsdEndOfPlayCallback cb);
44 void lsd_player_set_user_pointer(LsdPlayer *p, void *up);
45 void *lsd_player_get_user_pointer(LsdPlayer *p);
46 int lsd_player_play(LsdPlayer *p, const char *filename);
47 int lsd_player_stop(LsdPlayer *p);
48 void lsd_player_enable_loop(LsdPlayer *p, bool_t loopmode);
49
50 #endif