Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
6f89e253
提交
6f89e253
authored
2月 26, 2013
作者:
William King
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Moving all rtmp specific logging to use the rtmp uuid rather than the session uuid.
上级
fa6d4657
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
46 行增加
和
44 行删除
+46
-44
rtmp.c
src/mod/endpoints/mod_rtmp/rtmp.c
+28
-26
rtmp_sig.c
src/mod/endpoints/mod_rtmp/rtmp_sig.c
+7
-7
rtmp_tcp.c
src/mod/endpoints/mod_rtmp/rtmp_tcp.c
+11
-11
没有找到文件。
src/mod/endpoints/mod_rtmp/rtmp.c
浏览文件 @
6f89e253
差异被折叠。
点击展开。
src/mod/endpoints/mod_rtmp/rtmp_sig.c
浏览文件 @
6f89e253
...
...
@@ -118,7 +118,7 @@ RTMP_INVOKE_FUNCTION(rtmp_i_connect)
amf0_null_new
(),
amf0_str
(
rsession
->
uuid
),
NULL
);
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_NOTICE
,
"Sent connect reply
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_
UUID_LOG
(
rsession
->
uuid
)
,
SWITCH_LOG_NOTICE
,
"Sent connect reply
\n
"
);
return
SWITCH_STATUS_SUCCESS
;
}
...
...
@@ -133,7 +133,7 @@ RTMP_INVOKE_FUNCTION(rtmp_i_createStream)
amf0_number_new
(
rsession
->
next_streamid
),
NULL
);
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_INFO
,
"Replied to createStream (%u)
\n
"
,
rsession
->
next_streamid
);
switch_log_printf
(
SWITCH_CHANNEL_
UUID_LOG
(
rsession
->
uuid
)
,
SWITCH_LOG_INFO
,
"Replied to createStream (%u)
\n
"
,
rsession
->
next_streamid
);
rsession
->
next_streamid
++
;
...
...
@@ -156,7 +156,7 @@ RTMP_INVOKE_FUNCTION(rtmp_i_receiveaudio)
switch_clear_flag
(
rsession
,
SFLAG_AUDIO
);
}
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_INFO
,
"%sending audio
\n
"
,
enabled
?
"S"
:
"Not s"
);
switch_log_printf
(
SWITCH_CHANNEL_
UUID_LOG
(
rsession
->
uuid
)
,
SWITCH_LOG_INFO
,
"%sending audio
\n
"
,
enabled
?
"S"
:
"Not s"
);
return
SWITCH_STATUS_SUCCESS
;
}
...
...
@@ -174,7 +174,7 @@ RTMP_INVOKE_FUNCTION(rtmp_i_receivevideo)
switch_clear_flag
(
rsession
,
SFLAG_VIDEO
);
}
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_INFO
,
"%sending video
\n
"
,
enabled
?
"S"
:
"Not s"
);
switch_log_printf
(
SWITCH_CHANNEL_
UUID_LOG
(
rsession
->
uuid
)
,
SWITCH_LOG_INFO
,
"%sending video
\n
"
,
enabled
?
"S"
:
"Not s"
);
return
SWITCH_STATUS_SUCCESS
;
}
...
...
@@ -185,7 +185,7 @@ RTMP_INVOKE_FUNCTION(rtmp_i_play)
amf0_data
*
obj
=
amf0_object_new
();
amf0_data
*
object
=
amf0_object_new
();
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_DEBUG
,
"Got play for %s on stream %d
\n
"
,
switch_str_nil
(
amf0_get_string
(
argv
[
1
])),
switch_log_printf
(
SWITCH_CHANNEL_
UUID_LOG
(
rsession
->
uuid
)
,
SWITCH_LOG_DEBUG
,
"Got play for %s on stream %d
\n
"
,
switch_str_nil
(
amf0_get_string
(
argv
[
1
])),
state
->
stream_id
);
/* Set outgoing chunk size to 1024 bytes */
...
...
@@ -271,7 +271,7 @@ RTMP_INVOKE_FUNCTION(rtmp_i_publish)
NULL
);
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_INFO
,
"Got publish on stream %u.
\n
"
,
state
->
stream_id
);
switch_log_printf
(
SWITCH_CHANNEL_
UUID_LOG
(
rsession
->
uuid
)
,
SWITCH_LOG_INFO
,
"Got publish on stream %u.
\n
"
,
state
->
stream_id
);
return
SWITCH_STATUS_SUCCESS
;
}
...
...
@@ -783,7 +783,7 @@ RTMP_INVOKE_FUNCTION(rtmp_i_sendevent)
uuid
=
amf0_get_string
(
argv
[
1
]);
obj
=
argv
[
2
];
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_ERROR
,
"Bad argument for sendevent"
);
switch_log_printf
(
SWITCH_CHANNEL_
UUID_LOG
(
rsession
->
uuid
)
,
SWITCH_LOG_ERROR
,
"Bad argument for sendevent"
);
return
SWITCH_STATUS_FALSE
;
}
...
...
src/mod/endpoints/mod_rtmp/rtmp_tcp.c
浏览文件 @
6f89e253
...
...
@@ -70,7 +70,7 @@ static void rtmp_tcp_alter_pollfd(rtmp_session_t *rsession, switch_bool_t pollou
if
(
pollout
)
{
io_pvt
->
pollfd
->
reqevents
|=
SWITCH_POLLOUT
;
}
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_NOTICE
,
"Pollout: %s
\n
"
,
switch_log_printf
(
SWITCH_CHANNEL_
UUID_LOG
(
rsession
->
uuid
)
,
SWITCH_LOG_NOTICE
,
"Pollout: %s
\n
"
,
pollout
?
"true"
:
"false"
);
switch_pollset_add
(
io
->
pollset
,
io_pvt
->
pollfd
);
...
...
@@ -153,7 +153,7 @@ static switch_status_t rtmp_tcp_write(rtmp_session_t *rsession, const unsigned c
}
/* We didnt send it all... add it to the sendq*/
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_DEBUG
,
"%"
SWITCH_SIZE_T_FMT
" bytes added to sendq.
\n
"
,
(
orig_len
-
*
len
));
switch_log_printf
(
SWITCH_CHANNEL_
UUID_LOG
(
rsession
->
uuid
)
,
SWITCH_LOG_DEBUG
,
"%"
SWITCH_SIZE_T_FMT
" bytes added to sendq.
\n
"
,
(
orig_len
-
*
len
));
switch_buffer_write
(
io_pvt
->
sendq
,
(
buf
+
*
len
),
orig_len
-
*
len
);
...
...
@@ -217,7 +217,7 @@ void *SWITCH_THREAD_FUNC rtmp_io_tcp_thread(switch_thread_t *thread, void *obj)
return
NULL
;
}
}
else
{
rtmp_session_t
*
new
session
;
rtmp_session_t
*
r
session
;
if
(
switch_socket_opt_set
(
newsocket
,
SWITCH_SO_NONBLOCK
,
TRUE
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_WARNING
,
"Couldn't set socket as non-blocking
\n
"
);
...
...
@@ -227,7 +227,7 @@ void *SWITCH_THREAD_FUNC rtmp_io_tcp_thread(switch_thread_t *thread, void *obj)
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_WARNING
,
"Couldn't disable Nagle.
\n
"
);
}
if
(
rtmp_session_request
(
io
->
base
.
profile
,
&
new
session
)
!=
SWITCH_STATUS_SUCCESS
)
{
if
(
rtmp_session_request
(
io
->
base
.
profile
,
&
r
session
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"RTMP session request failed
\n
"
);
switch_socket_close
(
newsocket
);
}
else
{
...
...
@@ -235,20 +235,20 @@ void *SWITCH_THREAD_FUNC rtmp_io_tcp_thread(switch_thread_t *thread, void *obj)
char
ipbuf
[
200
];
/* Create out private data and attach it to the rtmp session structure */
rtmp_tcp_io_private_t
*
pvt
=
switch_core_alloc
(
new
session
->
pool
,
sizeof
(
*
pvt
));
new
session
->
io_private
=
pvt
;
rtmp_tcp_io_private_t
*
pvt
=
switch_core_alloc
(
r
session
->
pool
,
sizeof
(
*
pvt
));
r
session
->
io_private
=
pvt
;
pvt
->
socket
=
newsocket
;
switch_socket_create_pollfd
(
&
pvt
->
pollfd
,
newsocket
,
SWITCH_POLLIN
|
SWITCH_POLLERR
,
newsession
,
new
session
->
pool
);
switch_socket_create_pollfd
(
&
pvt
->
pollfd
,
newsocket
,
SWITCH_POLLIN
|
SWITCH_POLLERR
,
rsession
,
r
session
->
pool
);
switch_pollset_add
(
io
->
pollset
,
pvt
->
pollfd
);
switch_buffer_create_dynamic
(
&
pvt
->
sendq
,
512
,
1024
,
0
);
/* Get the remote address/port info */
switch_socket_addr_get
(
&
addr
,
SWITCH_TRUE
,
newsocket
);
switch_get_addr
(
ipbuf
,
sizeof
(
ipbuf
),
addr
);
newsession
->
remote_address
=
switch_core_strdup
(
new
session
->
pool
,
ipbuf
);
new
session
->
remote_port
=
switch_sockaddr_get_port
(
addr
);
switch_log_printf
(
SWITCH_CHANNEL_UUID_LOG
(
new
session
->
uuid
),
SWITCH_LOG_INFO
,
"Rtmp connection from %s:%i
\n
"
,
newsession
->
remote_address
,
new
session
->
remote_port
);
rsession
->
remote_address
=
switch_core_strdup
(
r
session
->
pool
,
ipbuf
);
r
session
->
remote_port
=
switch_sockaddr_get_port
(
addr
);
switch_log_printf
(
SWITCH_CHANNEL_UUID_LOG
(
r
session
->
uuid
),
SWITCH_LOG_INFO
,
"Rtmp connection from %s:%i
\n
"
,
rsession
->
remote_address
,
r
session
->
remote_port
);
}
}
}
else
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论