OpenTok C SDK
src
otkit
include
opentok
base.h
Go to the documentation of this file.
1
7
#ifndef BASE_H
8
#define BASE_H
9
10
#include "config.h"
11
12
OTC_BEGIN_DECL
13
16
enum
otc_video_reason
{
17
OTC_VIDEO_REASON_PUBLISH_VIDEO
=
18
1,
19
OTC_VIDEO_REASON_SUBSCRIBE_TO_VIDEO
=
20
2,
21
OTC_VIDEO_REASON_QUALITY
= 3,
23
OTC_VIDEO_REASON_CODEC_NOT_SUPPORTED
= 4
26
};
27
31
enum
otc_constant
{
32
OTC_SUCCESS
= 0,
33
OTC_FALSE
= 0,
34
OTC_TRUE
= !
OTC_FALSE
35
};
36
40
enum
otc_error_code
{
45
OTC_INVALID_PARAM
= 1,
50
OTC_FATAL
= 2,
55
OTC_INVALID_VIDEO_FORMAT
= 3,
61
OTC_CONNECTION_DROPPED
= 1022,
68
OTC_UNABLE_TO_FORCE_MUTE
= 1540,
73
OTC_CONNECTION_TIMED_OUT
= 1542,
78
OTC_UNKNOWN_PUBLISHER_INSTANCE
= 2003,
83
OTC_UNKNOWN_SUBSCRIBER_INSTANCE
= 2004,
88
OTC_VIDEO_CAPTURE_FAILED
= 3000,
93
OTC_CAMERA_FAILED
= 3010,
98
OTC_VIDEO_RENDER_FAILED
= 4000,
103
OT_UNABLE_TO_ACCESS_MEDIA_ENGINE
= 5000,
104
};
105
110
enum
otc_log_level
{
111
OTC_LOG_LEVEL_DISABLED
= 0,
112
OTC_LOG_LEVEL_ERROR
= 1,
113
OTC_LOG_LEVEL_WARN
= 2,
114
OTC_LOG_LEVEL_INFO
= 3,
115
OTC_LOG_LEVEL_DEBUG
= 4,
117
OTC_LOG_LEVEL_FATAL
=
OTC_LOG_LEVEL_ERROR
,
118
OTC_LOG_LEVEL_MSG
=
OTC_LOG_LEVEL_DEBUG
,
119
OTC_LOG_LEVEL_TRACE
=
OTC_LOG_LEVEL_DEBUG
,
120
OTC_LOG_LEVEL_ALL
=
OTC_LOG_LEVEL_DEBUG
121
};
122
127
typedef
int
otc_bool
;
128
133
typedef
struct
otc_on_mute_forced_info
{
138
otc_bool
active
;
139
}
otc_on_mute_forced_info
;
140
153
typedef
int
otc_status
;
154
161
typedef
void (*
otc_logger_callback
)(
const
char
* message);
162
170
OTC_DECL(
otc_status
)
otc_init
(
void
* reserved);
171
177
OTC_DECL(
otc_status
)
otc_destroy
();
178
186
OTC_DECL(
void
)
otc_log_set_logger_callback
(
otc_logger_callback
callback);
187
194
OTC_DECL(
void
)
otc_log_enable
(
enum
otc_log_level
log_level);
195
201
OTC_DECL(
enum
otc_log_level
)
otc_get_log_level
();
202
203
OTC_END_DECL
204
205
#endif // BASE_H
otc_destroy
otc_status otc_destroy()
otc_status
int otc_status
Definition:
base.h:153
OTC_FATAL
Definition:
base.h:50
OTC_FALSE
Definition:
base.h:33
OTC_INVALID_VIDEO_FORMAT
Definition:
base.h:55
OTC_UNKNOWN_SUBSCRIBER_INSTANCE
Definition:
base.h:83
OTC_TRUE
Definition:
base.h:34
otc_get_log_level
enum otc_log_level otc_get_log_level()
otc_error_code
otc_error_code
Definition:
base.h:40
OTC_LOG_LEVEL_MSG
Definition:
base.h:118
otc_log_enable
void otc_log_enable(enum otc_log_level log_level)
OTC_CONNECTION_TIMED_OUT
Definition:
base.h:73
OTC_LOG_LEVEL_WARN
Definition:
base.h:113
OTC_LOG_LEVEL_DEBUG
Definition:
base.h:115
OTC_INVALID_PARAM
Definition:
base.h:45
otc_logger_callback
void(* otc_logger_callback)(const char *message)
Definition:
base.h:161
OTC_VIDEO_REASON_PUBLISH_VIDEO
Definition:
base.h:17
OTC_LOG_LEVEL_DISABLED
Definition:
base.h:111
otc_on_mute_forced_info::active
otc_bool active
Definition:
base.h:138
OTC_LOG_LEVEL_FATAL
Definition:
base.h:117
OTC_CONNECTION_DROPPED
Definition:
base.h:61
OTC_VIDEO_REASON_SUBSCRIBE_TO_VIDEO
Definition:
base.h:19
OTC_UNABLE_TO_FORCE_MUTE
Definition:
base.h:68
OTC_VIDEO_REASON_QUALITY
Definition:
base.h:21
otc_on_mute_forced_info
Definition:
base.h:133
otc_constant
otc_constant
Definition:
base.h:31
OTC_LOG_LEVEL_ALL
Definition:
base.h:120
OTC_CAMERA_FAILED
Definition:
base.h:93
OTC_UNKNOWN_PUBLISHER_INSTANCE
Definition:
base.h:78
otc_log_set_logger_callback
void otc_log_set_logger_callback(otc_logger_callback callback)
OTC_LOG_LEVEL_ERROR
Definition:
base.h:112
OTC_VIDEO_CAPTURE_FAILED
Definition:
base.h:88
otc_log_level
otc_log_level
Definition:
base.h:110
OTC_LOG_LEVEL_INFO
Definition:
base.h:114
OT_UNABLE_TO_ACCESS_MEDIA_ENGINE
Definition:
base.h:103
otc_bool
int otc_bool
Definition:
base.h:127
otc_video_reason
otc_video_reason
Definition:
base.h:16
OTC_SUCCESS
Definition:
base.h:32
otc_init
otc_status otc_init(void *reserved)
OTC_VIDEO_REASON_CODEC_NOT_SUPPORTED
Definition:
base.h:23
OTC_LOG_LEVEL_TRACE
Definition:
base.h:119
OTC_VIDEO_RENDER_FAILED
Definition:
base.h:98
Generated on Thu Jun 27 2024 12:39:27 for OpenTok C SDK by
1.8.15