Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
989d400c
提交
989d400c
authored
3月 26, 2016
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make Xcode happy
上级
704cb4c2
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
16 行增加
和
15 行删除
+16
-15
.gitignore
.gitignore
+1
-0
LogLevel.h
worker/include/LogLevel.h
+3
-3
Logger.h
worker/include/Logger.h
+4
-4
Settings.h
worker/include/Settings.h
+1
-1
configure.py
worker/scripts/configure.py
+1
-1
Settings.cpp
worker/src/Settings.cpp
+6
-6
没有找到文件。
.gitignore
浏览文件 @
989d400c
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
# gyp generated stuff
# gyp generated stuff
/worker/out/
/worker/out/
/worker/**/*.xcodeproj/
# Others
# Others
/npm-debug.log
/npm-debug.log
...
...
worker/include/LogLevel.h
浏览文件 @
989d400c
...
@@ -5,9 +5,9 @@
...
@@ -5,9 +5,9 @@
enum
class
LogLevel
:
uint8_t
enum
class
LogLevel
:
uint8_t
{
{
DEBUG
=
2
,
LOG_
DEBUG
=
2
,
WARN
=
1
,
LOG_
WARN
=
1
,
ERROR
=
0
LOG_
ERROR
=
0
};
};
#endif
#endif
worker/include/Logger.h
浏览文件 @
989d400c
...
@@ -56,7 +56,7 @@ public:
...
@@ -56,7 +56,7 @@ public:
inline
inline
bool
Logger
::
HasDebugLevel
()
bool
Logger
::
HasDebugLevel
()
{
{
return
(
LogLevel
::
DEBUG
==
Settings
::
configuration
.
logLevel
);
return
(
LogLevel
::
LOG_
DEBUG
==
Settings
::
configuration
.
logLevel
);
}
}
// NOTE: Each file including Logger.h MUST define its own MS_CLASS macro.
// NOTE: Each file including Logger.h MUST define its own MS_CLASS macro.
...
@@ -97,7 +97,7 @@ bool Logger::HasDebugLevel()
...
@@ -97,7 +97,7 @@ bool Logger::HasDebugLevel()
#define MS_DEBUG(desc, ...) \
#define MS_DEBUG(desc, ...) \
do \
do \
{ \
{ \
if (LogLevel::DEBUG == Settings::configuration.logLevel) \
if (LogLevel::
LOG_
DEBUG == Settings::configuration.logLevel) \
{ \
{ \
int ms_logger_written = std::snprintf(Logger::buffer, MS_LOGGER_BUFFER_SIZE, "D" _MS_LOG_STR_DESC desc, _MS_LOG_ARG, ##__VA_ARGS__); \
int ms_logger_written = std::snprintf(Logger::buffer, MS_LOGGER_BUFFER_SIZE, "D" _MS_LOG_STR_DESC desc, _MS_LOG_ARG, ##__VA_ARGS__); \
Logger::channel->SendLog(Logger::buffer, ms_logger_written); \
Logger::channel->SendLog(Logger::buffer, ms_logger_written); \
...
@@ -108,7 +108,7 @@ bool Logger::HasDebugLevel()
...
@@ -108,7 +108,7 @@ bool Logger::HasDebugLevel()
#define MS_DEBUG_STD(desc, ...) \
#define MS_DEBUG_STD(desc, ...) \
do \
do \
{ \
{ \
if (LogLevel::DEBUG == Settings::configuration.logLevel) \
if (LogLevel::
LOG_
DEBUG == Settings::configuration.logLevel) \
{ \
{ \
std::fprintf(stdout, _MS_LOG_STR_DESC desc _MS_LOG_SEPARATOR_CHAR_STD, _MS_LOG_ARG, ##__VA_ARGS__); \
std::fprintf(stdout, _MS_LOG_STR_DESC desc _MS_LOG_SEPARATOR_CHAR_STD, _MS_LOG_ARG, ##__VA_ARGS__); \
std::fflush(stdout); \
std::fflush(stdout); \
...
@@ -119,7 +119,7 @@ bool Logger::HasDebugLevel()
...
@@ -119,7 +119,7 @@ bool Logger::HasDebugLevel()
#define MS_WARN(desc, ...) \
#define MS_WARN(desc, ...) \
do \
do \
{ \
{ \
if (LogLevel::WARN <= Settings::configuration.logLevel) \
if (LogLevel::
LOG_
WARN <= Settings::configuration.logLevel) \
{ \
{ \
int ms_logger_written = std::snprintf(Logger::buffer, MS_LOGGER_BUFFER_SIZE, "W" _MS_LOG_STR_DESC desc, _MS_LOG_ARG, ##__VA_ARGS__); \
int ms_logger_written = std::snprintf(Logger::buffer, MS_LOGGER_BUFFER_SIZE, "W" _MS_LOG_STR_DESC desc, _MS_LOG_ARG, ##__VA_ARGS__); \
Logger::channel->SendLog(Logger::buffer, ms_logger_written); \
Logger::channel->SendLog(Logger::buffer, ms_logger_written); \
...
...
worker/include/Settings.h
浏览文件 @
989d400c
...
@@ -14,7 +14,7 @@ public:
...
@@ -14,7 +14,7 @@ public:
// Struct holding the configuration.
// Struct holding the configuration.
struct
Configuration
struct
Configuration
{
{
LogLevel
logLevel
{
LogLevel
::
DEBUG
};
LogLevel
logLevel
{
LogLevel
::
LOG_
DEBUG
};
std
::
string
rtcListenIPv4
;
std
::
string
rtcListenIPv4
;
std
::
string
rtcListenIPv6
;
std
::
string
rtcListenIPv6
;
uint16_t
rtcMinPort
{
10000
};
uint16_t
rtcMinPort
{
10000
};
...
...
worker/scripts/configure.py
浏览文件 @
989d400c
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
# File inspired in https://github.com/indutny/bud
# File inspired in https://github.com/indutny/bud
import
glob
import
platform
import
platform
import
os
import
os
import
subprocess
import
subprocess
...
@@ -54,6 +53,7 @@ if __name__ == '__main__':
...
@@ -54,6 +53,7 @@ if __name__ == '__main__':
# GYP bug.
# GYP bug.
# On msvs it will crash if it gets an absolute path.
# On msvs it will crash if it gets an absolute path.
# On Mac/make it will crash if it doesn't get an absolute path.
# On Mac/make it will crash if it doesn't get an absolute path.
# NOTE ibc: Not sure that it requires absolute path in Mac/make...
if
sys
.
platform
==
'win32'
:
if
sys
.
platform
==
'win32'
:
args
.
append
(
os
.
path
.
join
(
root
,
'mediasoup-worker.gyp'
))
args
.
append
(
os
.
path
.
join
(
root
,
'mediasoup-worker.gyp'
))
common_fn
=
os
.
path
.
join
(
root
,
'common.gypi'
)
common_fn
=
os
.
path
.
join
(
root
,
'common.gypi'
)
...
...
worker/src/Settings.cpp
浏览文件 @
989d400c
...
@@ -26,15 +26,15 @@ bool IsBindableIP(const std::string &ip, int family, int* _bind_err);
...
@@ -26,15 +26,15 @@ bool IsBindableIP(const std::string &ip, int family, int* _bind_err);
struct
Settings
::
Configuration
Settings
::
configuration
;
struct
Settings
::
Configuration
Settings
::
configuration
;
std
::
map
<
std
::
string
,
LogLevel
>
Settings
::
string2LogLevel
=
std
::
map
<
std
::
string
,
LogLevel
>
Settings
::
string2LogLevel
=
{
{
{
"debug"
,
LogLevel
::
DEBUG
},
{
"debug"
,
LogLevel
::
LOG_
DEBUG
},
{
"warn"
,
LogLevel
::
WARN
},
{
"warn"
,
LogLevel
::
LOG_
WARN
},
{
"error"
,
LogLevel
::
ERROR
}
{
"error"
,
LogLevel
::
LOG_
ERROR
}
};
};
std
::
map
<
LogLevel
,
std
::
string
>
Settings
::
logLevel2String
=
std
::
map
<
LogLevel
,
std
::
string
>
Settings
::
logLevel2String
=
{
{
{
LogLevel
::
DEBUG
,
"debug"
},
{
LogLevel
::
LOG_
DEBUG
,
"debug"
},
{
LogLevel
::
WARN
,
"warn"
},
{
LogLevel
::
LOG_
WARN
,
"warn"
},
{
LogLevel
::
ERROR
,
"error"
}
{
LogLevel
::
LOG_
ERROR
,
"error"
}
};
};
/* Class methods. */
/* Class methods. */
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论