monitor.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _ASTERISK_MONITOR_H
00024 #define _ASTERISK_MONITOR_H
00025
00026 #include "asterisk/channel.h"
00027 #include "asterisk/optional_api.h"
00028
00029 enum AST_MONITORING_STATE {
00030 AST_MONITOR_RUNNING,
00031 AST_MONITOR_PAUSED
00032 };
00033
00034
00035 #define X_REC_IN 1
00036 #define X_REC_OUT 2
00037 #define X_JOIN 4
00038
00039
00040 struct ast_channel_monitor {
00041 struct ast_filestream *read_stream;
00042 struct ast_filestream *write_stream;
00043 char read_filename[FILENAME_MAX];
00044 char write_filename[FILENAME_MAX];
00045 char filename_base[FILENAME_MAX];
00046 int filename_changed;
00047 char *format;
00048 int joinfiles;
00049 enum AST_MONITORING_STATE state;
00050 int (*stop)(struct ast_channel *chan, int need_lock);
00051 };
00052
00053
00054 AST_OPTIONAL_API(int, ast_monitor_start,
00055 (struct ast_channel *chan, const char *format_spec,
00056 const char *fname_base, int need_lock, int stream_action),
00057 { return -1; });
00058
00059
00060 AST_OPTIONAL_API(int, ast_monitor_stop,
00061 (struct ast_channel *chan, int need_lock),
00062 { return -1; });
00063
00064
00065 AST_OPTIONAL_API(int, ast_monitor_change_fname,
00066 (struct ast_channel *chan, const char *fname_base,
00067 int need_lock),
00068 { return -1; });
00069
00070 AST_OPTIONAL_API(void, ast_monitor_setjoinfiles,
00071 (struct ast_channel *chan, int turnon),
00072 { return; });
00073
00074
00075 AST_OPTIONAL_API(int, ast_monitor_pause,
00076 (struct ast_channel *chan),
00077 { return -1; });
00078
00079
00080 AST_OPTIONAL_API(int, ast_monitor_unpause,
00081 (struct ast_channel *chan),
00082 { return -1; });
00083
00084 #endif