Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
ZLMediaKit
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
张翔宇
ZLMediaKit
Commits
df746060
Commit
df746060
authored
3 years ago
by
xiongziliang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
1b663e43
d88fe077
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
9 行增加
和
6 行删除
+9
-6
3rdpart/media-server
+1
-1
server/WebHook.cpp
+2
-0
src/Common/config.cpp
+1
-0
src/Common/config.h
+1
-1
src/Rtmp/RtmpSession.cpp
+1
-1
src/Rtp/RtpProcess.cpp
+1
-1
src/Rtsp/RtspSession.cpp
+1
-1
webrtc/WebRtcTransport.cpp
+1
-1
没有找到文件。
media-server
@
f1ee15ec
Subproject commit
49c146a4e35231ca94e7d0892d421e90a1a14bad
Subproject commit
f1ee15ec36a3bb311d3f1e5ec0816e0caf32639e
This diff is collapsed.
Click to expand it.
server/WebHook.cpp
查看文件 @
df746060
...
...
@@ -277,6 +277,8 @@ void installWebHook(){
body
[
"ip"
]
=
sender
.
get_peer_ip
();
body
[
"port"
]
=
sender
.
get_peer_port
();
body
[
"id"
]
=
sender
.
getIdentifier
();
body
[
"originType"
]
=
(
int
)
type
;
body
[
"originTypeStr"
]
=
getOriginTypeString
(
type
);
//执行hook
do_http_hook
(
hook_publish
,
body
,[
invoker
](
const
Value
&
obj
,
const
string
&
err
){
if
(
err
.
empty
()){
...
...
This diff is collapsed.
Click to expand it.
src/Common/config.cpp
查看文件 @
df746060
...
...
@@ -9,6 +9,7 @@
*/
#include <stdio.h>
#include <assert.h>
#include "Common/config.h"
#include "Util/util.h"
#include "Util/logger.h"
...
...
This diff is collapsed.
Click to expand it.
src/Common/config.h
查看文件 @
df746060
...
...
@@ -72,7 +72,7 @@ typedef std::function<void(const std::string &errMessage, bool enableHls, bool e
//收到rtsp/rtmp推流事件广播,通过该事件控制推流鉴权
extern
const
std
::
string
kBroadcastMediaPublish
;
#define BroadcastMediaPublishArgs const Media
Info &args,
const Broadcast::PublishAuthInvoker &invoker,SockInfo &sender
#define BroadcastMediaPublishArgs const Media
OriginType &type, const MediaInfo &args,
const Broadcast::PublishAuthInvoker &invoker,SockInfo &sender
//播放鉴权结果回调对象
//如果errMessage为空则代表鉴权成功
...
...
This diff is collapsed.
Click to expand it.
src/Rtmp/RtmpSession.cpp
查看文件 @
df746060
...
...
@@ -212,7 +212,7 @@ void RtmpSession::onCmd_publish(AMFDecoder &dec) {
on_res
(
err
,
enableHls
,
enableMP4
);
});
};
auto
flag
=
NoticeCenter
::
Instance
().
emitEvent
(
Broadcast
::
kBroadcastMediaPublish
,
_media_info
,
invoker
,
static_cast
<
SockInfo
&>
(
*
this
));
auto
flag
=
NoticeCenter
::
Instance
().
emitEvent
(
Broadcast
::
kBroadcastMediaPublish
,
MediaOriginType
::
rtmp_push
,
_media_info
,
invoker
,
static_cast
<
SockInfo
&>
(
*
this
));
if
(
!
flag
){
//该事件无人监听,默认鉴权成功
GET_CONFIG
(
bool
,
to_hls
,
General
::
kPublishToHls
);
...
...
This diff is collapsed.
Click to expand it.
src/Rtp/RtpProcess.cpp
查看文件 @
df746060
...
...
@@ -252,7 +252,7 @@ void RtpProcess::emitOnPublish() {
};
//触发推流鉴权事件
auto
flag
=
NoticeCenter
::
Instance
().
emitEvent
(
Broadcast
::
kBroadcastMediaPublish
,
_media_info
,
invoker
,
static_cast
<
SockInfo
&>
(
*
this
));
auto
flag
=
NoticeCenter
::
Instance
().
emitEvent
(
Broadcast
::
kBroadcastMediaPublish
,
MediaOriginType
::
rtp_push
,
_media_info
,
invoker
,
static_cast
<
SockInfo
&>
(
*
this
));
if
(
!
flag
)
{
//该事件无人监听,默认不鉴权
GET_CONFIG
(
bool
,
toHls
,
General
::
kPublishToHls
);
...
...
This diff is collapsed.
Click to expand it.
src/Rtsp/RtspSession.cpp
查看文件 @
df746060
...
...
@@ -299,7 +299,7 @@ void RtspSession::handleReq_ANNOUNCE(const Parser &parser) {
};
//rtsp推流需要鉴权
auto
flag
=
NoticeCenter
::
Instance
().
emitEvent
(
Broadcast
::
kBroadcastMediaPublish
,
_media_info
,
invoker
,
static_cast
<
SockInfo
&>
(
*
this
));
auto
flag
=
NoticeCenter
::
Instance
().
emitEvent
(
Broadcast
::
kBroadcastMediaPublish
,
MediaOriginType
::
rtsp_push
,
_media_info
,
invoker
,
static_cast
<
SockInfo
&>
(
*
this
));
if
(
!
flag
)
{
//该事件无人监听,默认不鉴权
GET_CONFIG
(
bool
,
toHls
,
General
::
kPublishToHls
);
...
...
This diff is collapsed.
Click to expand it.
webrtc/WebRtcTransport.cpp
查看文件 @
df746060
...
...
@@ -1016,7 +1016,7 @@ void push_plugin(Session &sender, const string &offer_sdp, const WebRtcArgs &arg
};
//rtsp推流需要鉴权
auto
flag
=
NoticeCenter
::
Instance
().
emitEvent
(
Broadcast
::
kBroadcastMediaPublish
,
info
,
invoker
,
static_cast
<
SockInfo
&>
(
sender
));
auto
flag
=
NoticeCenter
::
Instance
().
emitEvent
(
Broadcast
::
kBroadcastMediaPublish
,
MediaOriginType
::
rtc_push
,
info
,
invoker
,
static_cast
<
SockInfo
&>
(
sender
));
if
(
!
flag
)
{
//该事件无人监听,默认不鉴权
GET_CONFIG
(
bool
,
to_hls
,
General
::
kPublishToHls
);
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论