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
5d752c89
Commit
5d752c89
authored
4 years ago
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复编译问题
parent
b6cbc877
隐藏空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
34 行增加
和
37 行删除
+34
-37
3rdpart/ZLToolKit
+1
-1
api/tests/server.c
+2
-2
server/FFmpegSource.cpp
+2
-2
server/FFmpegSource.h
+1
-1
server/System.cpp
+4
-5
server/WebApi.cpp
+1
-1
src/Common/MultiMediaSourceMuxer.cpp
+1
-1
src/Http/HlsPlayer.cpp
+1
-1
src/Http/HttpBody.cpp
+3
-3
src/Http/HttpSession.cpp
+1
-1
src/Http/WebSocketSplitter.cpp
+1
-1
src/Http/WebSocketSplitter.h
+6
-6
src/Record/MP4.cpp
+1
-1
src/Rtmp/RtmpPlayer.cpp
+1
-1
src/Rtp/RtpProcess.cpp
+1
-1
src/Rtp/RtpProcess.h
+1
-3
src/Rtp/RtpSelector.cpp
+2
-2
src/Rtp/RtpSession.cpp
+2
-2
src/Rtsp/Rtsp.cpp
+1
-1
src/Rtsp/RtspPusher.cpp
+1
-1
没有找到文件。
ZLToolKit
@
9c5aad98
Subproject commit
3b5de80f9effe28c4a38fef5beec50eadfc916cf
Subproject commit
9c5aad98d0eb50903e643eb9965b8bc34cd9f77d
This diff is collapsed.
Click to expand it.
api/tests/server.c
查看文件 @
5d752c89
...
@@ -371,8 +371,8 @@ void API_CALL on_mk_shell_login(const char *user_name,
...
@@ -371,8 +371,8 @@ void API_CALL on_mk_shell_login(const char *user_name,
* @param peer_port 客户端端口号
* @param peer_port 客户端端口号
*/
*/
void
API_CALL
on_mk_flow_report
(
const
mk_media_info
url_info
,
void
API_CALL
on_mk_flow_report
(
const
mk_media_info
url_info
,
uint64
_t
total_bytes
,
size
_t
total_bytes
,
uint64
_t
total_seconds
,
size
_t
total_seconds
,
int
is_player
,
int
is_player
,
const
mk_sock_info
sender
)
{
const
mk_sock_info
sender
)
{
char
ip
[
64
];
char
ip
[
64
];
...
...
This diff is collapsed.
Click to expand it.
server/FFmpegSource.cpp
查看文件 @
5d752c89
...
@@ -59,7 +59,7 @@ static bool is_local_ip(const string &ip){
...
@@ -59,7 +59,7 @@ static bool is_local_ip(const string &ip){
return
false
;
return
false
;
}
}
void
FFmpegSource
::
setupRecord
(
bool
enable_hls
,
bool
enable_mp4
){
void
FFmpegSource
::
setupRecord
Flag
(
bool
enable_hls
,
bool
enable_mp4
){
_enable_hls
=
enable_hls
;
_enable_hls
=
enable_hls
;
_enable_mp4
=
enable_mp4
;
_enable_mp4
=
enable_mp4
;
}
}
...
@@ -173,7 +173,7 @@ void FFmpegSource::findAsync(int maxWaitMS, const function<void(const MediaSourc
...
@@ -173,7 +173,7 @@ void FFmpegSource::findAsync(int maxWaitMS, const function<void(const MediaSourc
NoticeCenter
::
Instance
().
delListener
(
listener_tag
,
Broadcast
::
kBroadcastMediaChanged
);
NoticeCenter
::
Instance
().
delListener
(
listener_tag
,
Broadcast
::
kBroadcastMediaChanged
);
//切换到自己的线程再回复
//切换到自己的线程再回复
strongSelf
->
_poller
->
async
([
listener_tag
,
weakSelf
,
cb
](){
strongSelf
->
_poller
->
async
([
weakSelf
,
cb
](){
auto
strongSelf
=
weakSelf
.
lock
();
auto
strongSelf
=
weakSelf
.
lock
();
if
(
!
strongSelf
)
{
if
(
!
strongSelf
)
{
return
;
return
;
...
...
This diff is collapsed.
Click to expand it.
server/FFmpegSource.h
查看文件 @
5d752c89
...
@@ -67,7 +67,7 @@ public:
...
@@ -67,7 +67,7 @@ public:
* @param enable_hls 是否开启hls直播或录制
* @param enable_hls 是否开启hls直播或录制
* @param enable_mp4 是否录制mp4
* @param enable_mp4 是否录制mp4
*/
*/
void
setupRecord
(
bool
enable_hls
,
bool
enable_mp4
);
void
setupRecord
Flag
(
bool
enable_hls
,
bool
enable_mp4
);
private
:
private
:
void
findAsync
(
int
maxWaitMS
,
const
function
<
void
(
const
MediaSource
::
Ptr
&
src
)
>
&
cb
);
void
findAsync
(
int
maxWaitMS
,
const
function
<
void
(
const
MediaSource
::
Ptr
&
src
)
>
&
cb
);
...
...
This diff is collapsed.
Click to expand it.
server/System.cpp
查看文件 @
5d752c89
...
@@ -51,11 +51,6 @@ string System::execute(const string &cmd) {
...
@@ -51,11 +51,6 @@ string System::execute(const string &cmd) {
}
}
#if !defined(ANDROID) && !defined(_WIN32)
#if !defined(ANDROID) && !defined(_WIN32)
static
string
addr2line
(
const
string
&
address
)
{
string
cmd
=
StrPrinter
<<
"addr2line -C -f -e "
<<
exePath
()
<<
" "
<<
address
;
return
System
::
execute
(
cmd
);
}
static
void
sig_crash
(
int
sig
)
{
static
void
sig_crash
(
int
sig
)
{
signal
(
sig
,
SIG_DFL
);
signal
(
sig
,
SIG_DFL
);
void
*
array
[
MAX_STACK_FRAMES
];
void
*
array
[
MAX_STACK_FRAMES
];
...
@@ -68,6 +63,10 @@ static void sig_crash(int sig) {
...
@@ -68,6 +63,10 @@ static void sig_crash(int sig) {
std
::
string
symbol
(
strings
[
i
]);
std
::
string
symbol
(
strings
[
i
]);
ref
.
emplace_back
(
symbol
);
ref
.
emplace_back
(
symbol
);
#if defined(__linux) || defined(__linux__)
#if defined(__linux) || defined(__linux__)
static
auto
addr2line
=
[](
const
string
&
address
)
{
string
cmd
=
StrPrinter
<<
"addr2line -C -f -e "
<<
exePath
()
<<
" "
<<
address
;
return
System
::
execute
(
cmd
);
};
size_t
pos1
=
symbol
.
find_first_of
(
"["
);
size_t
pos1
=
symbol
.
find_first_of
(
"["
);
size_t
pos2
=
symbol
.
find_last_of
(
"]"
);
size_t
pos2
=
symbol
.
find_last_of
(
"]"
);
std
::
string
address
=
symbol
.
substr
(
pos1
+
1
,
pos2
-
pos1
-
1
);
std
::
string
address
=
symbol
.
substr
(
pos1
+
1
,
pos2
-
pos1
-
1
);
...
...
This diff is collapsed.
Click to expand it.
server/WebApi.cpp
查看文件 @
5d752c89
...
@@ -683,7 +683,7 @@ void installWebApi() {
...
@@ -683,7 +683,7 @@ void installWebApi() {
lock_guard
<
decltype
(
s_ffmpegMapMtx
)
>
lck
(
s_ffmpegMapMtx
);
lock_guard
<
decltype
(
s_ffmpegMapMtx
)
>
lck
(
s_ffmpegMapMtx
);
s_ffmpegMap
.
erase
(
key
);
s_ffmpegMap
.
erase
(
key
);
});
});
ffmpeg
->
setupRecord
(
enable_hls
,
enable_mp4
);
ffmpeg
->
setupRecord
Flag
(
enable_hls
,
enable_mp4
);
ffmpeg
->
play
(
src_url
,
dst_url
,
timeout_ms
,
[
cb
,
key
](
const
SockException
&
ex
)
{
ffmpeg
->
play
(
src_url
,
dst_url
,
timeout_ms
,
[
cb
,
key
](
const
SockException
&
ex
)
{
if
(
ex
)
{
if
(
ex
)
{
lock_guard
<
decltype
(
s_ffmpegMapMtx
)
>
lck
(
s_ffmpegMapMtx
);
lock_guard
<
decltype
(
s_ffmpegMapMtx
)
>
lck
(
s_ffmpegMapMtx
);
...
...
This diff is collapsed.
Click to expand it.
src/Common/MultiMediaSourceMuxer.cpp
查看文件 @
5d752c89
...
@@ -260,7 +260,7 @@ static string getTrackInfoStr(const TrackSource *track_src){
...
@@ -260,7 +260,7 @@ static string getTrackInfoStr(const TrackSource *track_src){
break
;
break
;
}
}
}
}
return
codec_info
;
return
std
::
move
(
codec_info
)
;
}
}
void
MultiMuxerPrivate
::
onAllTrackReady
()
{
void
MultiMuxerPrivate
::
onAllTrackReady
()
{
...
...
This diff is collapsed.
Click to expand it.
src/Http/HlsPlayer.cpp
查看文件 @
5d752c89
...
@@ -83,7 +83,7 @@ void HlsPlayer::playNextTs(bool force){
...
@@ -83,7 +83,7 @@ void HlsPlayer::playNextTs(bool force){
strongSelf
->
playNextTs
(
true
);
strongSelf
->
playNextTs
(
true
);
}
else
{
}
else
{
//下一个切片慢点播放
//下一个切片慢点播放
strongSelf
->
_timer_ts
.
reset
(
new
Timer
(
delay
/
1000.0
f
,
[
weakSelf
,
delay
]()
{
strongSelf
->
_timer_ts
.
reset
(
new
Timer
(
delay
/
1000.0
f
,
[
weakSelf
]()
{
auto
strongSelf
=
weakSelf
.
lock
();
auto
strongSelf
=
weakSelf
.
lock
();
if
(
!
strongSelf
)
{
if
(
!
strongSelf
)
{
return
false
;
return
false
;
...
...
This diff is collapsed.
Click to expand it.
src/Http/HttpBody.cpp
查看文件 @
5d752c89
...
@@ -144,7 +144,7 @@ Buffer::Ptr HttpFileBody::readData(size_t size) {
...
@@ -144,7 +144,7 @@ Buffer::Ptr HttpFileBody::readData(size_t size) {
//读到数据了
//读到数据了
ret
->
setSize
(
iRead
);
ret
->
setSize
(
iRead
);
_offset
+=
iRead
;
_offset
+=
iRead
;
return
ret
;
return
std
::
move
(
ret
)
;
}
}
//读取文件异常,文件真实长度小于声明长度
//读取文件异常,文件真实长度小于声明长度
_offset
=
_max_size
;
_offset
=
_max_size
;
...
@@ -218,7 +218,7 @@ string HttpMultiFormBody::multiFormBodySuffix(const string &boundary){
...
@@ -218,7 +218,7 @@ string HttpMultiFormBody::multiFormBodySuffix(const string &boundary){
string
endMPboundary
=
MPboundary
+
"--"
;
string
endMPboundary
=
MPboundary
+
"--"
;
_StrPrinter
body
;
_StrPrinter
body
;
body
<<
"
\r\n
"
<<
endMPboundary
;
body
<<
"
\r\n
"
<<
endMPboundary
;
return
body
;
return
std
::
move
(
body
)
;
}
}
size_t
HttpMultiFormBody
::
fileSize
(
FILE
*
fp
)
{
size_t
HttpMultiFormBody
::
fileSize
(
FILE
*
fp
)
{
...
@@ -244,7 +244,7 @@ string HttpMultiFormBody::multiFormBodyPrefix(const HttpArgs &args,const string
...
@@ -244,7 +244,7 @@ string HttpMultiFormBody::multiFormBodyPrefix(const HttpArgs &args,const string
body
<<
MPboundary
<<
"
\r\n
"
;
body
<<
MPboundary
<<
"
\r\n
"
;
body
<<
"Content-Disposition: form-data; name=
\"
"
<<
"file"
<<
"
\"
;filename=
\"
"
<<
fileName
<<
"
\"\r\n
"
;
body
<<
"Content-Disposition: form-data; name=
\"
"
<<
"file"
<<
"
\"
;filename=
\"
"
<<
fileName
<<
"
\"\r\n
"
;
body
<<
"Content-Type: application/octet-stream
\r\n\r\n
"
;
body
<<
"Content-Type: application/octet-stream
\r\n\r\n
"
;
return
body
;
return
std
::
move
(
body
)
;
}
}
}
//namespace mediakit
}
//namespace mediakit
This diff is collapsed.
Click to expand it.
src/Http/HttpSession.cpp
查看文件 @
5d752c89
...
@@ -674,7 +674,7 @@ void HttpSession::Handle_Req_POST(size_t &content_len) {
...
@@ -674,7 +674,7 @@ void HttpSession::Handle_Req_POST(size_t &content_len) {
//返回不固定长度的content
//返回不固定长度的content
content_len
=
-
1
;
content_len
=
-
1
;
auto
parserCopy
=
_parser
;
auto
parserCopy
=
_parser
;
std
::
shared_ptr
<
size_t
>
recvedContentLen
=
std
::
make_shared
<
uint64
_t
>
(
0
);
std
::
shared_ptr
<
size_t
>
recvedContentLen
=
std
::
make_shared
<
size
_t
>
(
0
);
bool
bClose
=
!
strcasecmp
(
_parser
[
"Connection"
].
data
(),
"close"
);
bool
bClose
=
!
strcasecmp
(
_parser
[
"Connection"
].
data
(),
"close"
);
_contentCallBack
=
[
this
,
parserCopy
,
totalContentLen
,
recvedContentLen
,
bClose
](
const
char
*
data
,
size_t
len
){
_contentCallBack
=
[
this
,
parserCopy
,
totalContentLen
,
recvedContentLen
,
bClose
](
const
char
*
data
,
size_t
len
){
...
...
This diff is collapsed.
Click to expand it.
src/Http/WebSocketSplitter.cpp
查看文件 @
5d752c89
...
@@ -53,7 +53,7 @@ do{ \
...
@@ -53,7 +53,7 @@ do{ \
} \
} \
}while(0) \
}while(0) \
void
WebSocketSplitter
::
decode
(
uint8_t
*
data
,
size_t
len
)
{
void
WebSocketSplitter
::
decode
(
uint8_t
*
data
,
size_t
len
)
{
uint8_t
*
ptr
=
data
;
uint8_t
*
ptr
=
data
;
if
(
!
_got_header
)
{
if
(
!
_got_header
)
{
//还没有获取数据头
//还没有获取数据头
...
...
This diff is collapsed.
Click to expand it.
src/Http/WebSocketSplitter.h
查看文件 @
5d752c89
...
@@ -95,7 +95,7 @@ public:
...
@@ -95,7 +95,7 @@ public:
* @param data 需要解包的数据,可能是不完整的包或多个包
* @param data 需要解包的数据,可能是不完整的包或多个包
* @param len 数据长度
* @param len 数据长度
*/
*/
void
decode
(
uint8_t
*
data
,
uint64
_t
len
);
void
decode
(
uint8_t
*
data
,
size
_t
len
);
/**
/**
* 编码一个数据包
* 编码一个数据包
...
@@ -119,7 +119,7 @@ protected:
...
@@ -119,7 +119,7 @@ protected:
* @param len 负载数据长度
* @param len 负载数据长度
* @param recved 已接收数据长度(包含本次数据长度),等于header._payload_len时则接受完毕
* @param recved 已接收数据长度(包含本次数据长度),等于header._payload_len时则接受完毕
*/
*/
virtual
void
onWebSocketDecodePayload
(
const
WebSocketHeader
&
header
,
const
uint8_t
*
ptr
,
uint64_t
len
,
uint64
_t
recved
)
{};
virtual
void
onWebSocketDecodePayload
(
const
WebSocketHeader
&
header
,
const
uint8_t
*
ptr
,
size_t
len
,
size
_t
recved
)
{};
/**
/**
* 接收到完整的一个webSocket数据包后回调
* 接收到完整的一个webSocket数据包后回调
...
@@ -135,13 +135,13 @@ protected:
...
@@ -135,13 +135,13 @@ protected:
virtual
void
onWebSocketEncodeData
(
Buffer
::
Ptr
buffer
){};
virtual
void
onWebSocketEncodeData
(
Buffer
::
Ptr
buffer
){};
private
:
private
:
void
onPayloadData
(
uint8_t
*
data
,
uint64
_t
len
);
void
onPayloadData
(
uint8_t
*
data
,
size
_t
len
);
private
:
private
:
string
_remain_data
;
int
_mask_offset
=
0
;
bool
_got_header
=
false
;
bool
_got_header
=
false
;
uint64_t
_payload_offset
=
0
;
int
_mask_offset
=
0
;
size_t
_payload_offset
=
0
;
string
_remain_data
;
};
};
}
/* namespace mediakit */
}
/* namespace mediakit */
...
...
This diff is collapsed.
Click to expand it.
src/Record/MP4.cpp
查看文件 @
5d752c89
...
@@ -121,7 +121,7 @@ static struct mov_buffer_t s_io = {
...
@@ -121,7 +121,7 @@ static struct mov_buffer_t s_io = {
},
},
[](
void
*
ctx
)
{
[](
void
*
ctx
)
{
MP4FileIO
*
thiz
=
(
MP4FileIO
*
)
ctx
;
MP4FileIO
*
thiz
=
(
MP4FileIO
*
)
ctx
;
return
thiz
->
onTell
();
return
(
uint64_t
)
thiz
->
onTell
();
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/Rtmp/RtmpPlayer.cpp
查看文件 @
5d752c89
...
@@ -214,7 +214,7 @@ inline void RtmpPlayer::send_play() {
...
@@ -214,7 +214,7 @@ inline void RtmpPlayer::send_play() {
AMFEncoder
enc
;
AMFEncoder
enc
;
enc
<<
"play"
<<
++
_send_req_id
<<
nullptr
<<
_stream_id
<<
(
double
)
_stream_index
;
enc
<<
"play"
<<
++
_send_req_id
<<
nullptr
<<
_stream_id
<<
(
double
)
_stream_index
;
sendRequest
(
MSG_CMD
,
enc
.
data
());
sendRequest
(
MSG_CMD
,
enc
.
data
());
auto
fun
=
[
this
](
AMFValue
&
val
)
{
auto
fun
=
[](
AMFValue
&
val
)
{
//TraceL << "play onStatus";
//TraceL << "play onStatus";
auto
level
=
val
[
"level"
].
as_string
();
auto
level
=
val
[
"level"
].
as_string
();
auto
code
=
val
[
"code"
].
as_string
();
auto
code
=
val
[
"code"
].
as_string
();
...
...
This diff is collapsed.
Click to expand it.
src/Rtp/RtpProcess.cpp
查看文件 @
5d752c89
...
@@ -192,7 +192,7 @@ string RtpProcess::getIdentifier() const {
...
@@ -192,7 +192,7 @@ string RtpProcess::getIdentifier() const {
return
_media_info
.
_streamid
;
return
_media_info
.
_streamid
;
}
}
int
RtpProcess
::
t
otalReaderCount
()
{
int
RtpProcess
::
getT
otalReaderCount
()
{
return
_muxer
?
_muxer
->
totalReaderCount
()
:
0
;
return
_muxer
?
_muxer
->
totalReaderCount
()
:
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/Rtp/RtpProcess.h
查看文件 @
5d752c89
...
@@ -15,8 +15,6 @@
...
@@ -15,8 +15,6 @@
#include "ProcessInterface.h"
#include "ProcessInterface.h"
#include "Common/MultiMediaSourceMuxer.h"
#include "Common/MultiMediaSourceMuxer.h"
using
namespace
mediakit
;
namespace
mediakit
{
namespace
mediakit
{
class
RtpProcess
:
public
SockInfo
,
public
MediaSinkInterface
,
public
MediaSourceEventInterceptor
,
public
std
::
enable_shared_from_this
<
RtpProcess
>
{
class
RtpProcess
:
public
SockInfo
,
public
MediaSinkInterface
,
public
MediaSourceEventInterceptor
,
public
std
::
enable_shared_from_this
<
RtpProcess
>
{
...
@@ -65,7 +63,7 @@ public:
...
@@ -65,7 +63,7 @@ public:
uint16_t
get_peer_port
()
override
;
uint16_t
get_peer_port
()
override
;
string
getIdentifier
()
const
override
;
string
getIdentifier
()
const
override
;
int
t
otalReaderCount
();
int
getT
otalReaderCount
();
void
setListener
(
const
std
::
weak_ptr
<
MediaSourceEvent
>
&
listener
);
void
setListener
(
const
std
::
weak_ptr
<
MediaSourceEvent
>
&
listener
);
protected
:
protected
:
...
...
This diff is collapsed.
Click to expand it.
src/Rtp/RtpSelector.cpp
查看文件 @
5d752c89
...
@@ -138,7 +138,7 @@ void RtpProcessHelper::attachEvent() {
...
@@ -138,7 +138,7 @@ void RtpProcessHelper::attachEvent() {
bool
RtpProcessHelper
::
close
(
MediaSource
&
sender
,
bool
force
)
{
bool
RtpProcessHelper
::
close
(
MediaSource
&
sender
,
bool
force
)
{
//此回调在其他线程触发
//此回调在其他线程触发
if
(
!
_process
||
(
!
force
&&
_process
->
t
otalReaderCount
()))
{
if
(
!
_process
||
(
!
force
&&
_process
->
getT
otalReaderCount
()))
{
return
false
;
return
false
;
}
}
auto
parent
=
_parent
.
lock
();
auto
parent
=
_parent
.
lock
();
...
@@ -151,7 +151,7 @@ bool RtpProcessHelper::close(MediaSource &sender, bool force) {
...
@@ -151,7 +151,7 @@ bool RtpProcessHelper::close(MediaSource &sender, bool force) {
}
}
int
RtpProcessHelper
::
totalReaderCount
(
MediaSource
&
sender
)
{
int
RtpProcessHelper
::
totalReaderCount
(
MediaSource
&
sender
)
{
return
_process
?
_process
->
t
otalReaderCount
()
:
sender
.
totalReaderCount
();
return
_process
?
_process
->
getT
otalReaderCount
()
:
sender
.
totalReaderCount
();
}
}
RtpProcess
::
Ptr
&
RtpProcessHelper
::
getProcess
()
{
RtpProcess
::
Ptr
&
RtpProcessHelper
::
getProcess
()
{
...
...
This diff is collapsed.
Click to expand it.
src/Rtp/RtpSession.cpp
查看文件 @
5d752c89
...
@@ -79,7 +79,7 @@ void RtpSession::onRtpPacket(const char *data, size_t len) {
...
@@ -79,7 +79,7 @@ void RtpSession::onRtpPacket(const char *data, size_t len) {
bool
RtpSession
::
close
(
MediaSource
&
sender
,
bool
force
)
{
bool
RtpSession
::
close
(
MediaSource
&
sender
,
bool
force
)
{
//此回调在其他线程触发
//此回调在其他线程触发
if
(
!
_process
||
(
!
force
&&
_process
->
t
otalReaderCount
())){
if
(
!
_process
||
(
!
force
&&
_process
->
getT
otalReaderCount
())){
return
false
;
return
false
;
}
}
string
err
=
StrPrinter
<<
"close media:"
<<
sender
.
getSchema
()
<<
"/"
<<
sender
.
getVhost
()
<<
"/"
<<
sender
.
getApp
()
<<
"/"
<<
sender
.
getId
()
<<
" "
<<
force
;
string
err
=
StrPrinter
<<
"close media:"
<<
sender
.
getSchema
()
<<
"/"
<<
sender
.
getVhost
()
<<
"/"
<<
sender
.
getApp
()
<<
"/"
<<
sender
.
getId
()
<<
" "
<<
force
;
...
@@ -89,7 +89,7 @@ bool RtpSession::close(MediaSource &sender, bool force) {
...
@@ -89,7 +89,7 @@ bool RtpSession::close(MediaSource &sender, bool force) {
int
RtpSession
::
totalReaderCount
(
MediaSource
&
sender
)
{
int
RtpSession
::
totalReaderCount
(
MediaSource
&
sender
)
{
//此回调在其他线程触发
//此回调在其他线程触发
return
_process
?
_process
->
t
otalReaderCount
()
:
sender
.
totalReaderCount
();
return
_process
?
_process
->
getT
otalReaderCount
()
:
sender
.
totalReaderCount
();
}
}
}
//namespace mediakit
}
//namespace mediakit
...
...
This diff is collapsed.
Click to expand it.
src/Rtsp/Rtsp.cpp
查看文件 @
5d752c89
...
@@ -121,7 +121,7 @@ string SdpTrack::toString() const {
...
@@ -121,7 +121,7 @@ string SdpTrack::toString() const {
default
:
default
:
break
;
break
;
}
}
return
_printer
;
return
std
::
move
(
_printer
)
;
}
}
static
TrackType
toTrackType
(
const
string
&
str
)
{
static
TrackType
toTrackType
(
const
string
&
str
)
{
...
...
This diff is collapsed.
Click to expand it.
src/Rtsp/RtspPusher.cpp
查看文件 @
5d752c89
...
@@ -309,7 +309,7 @@ void RtspPusher::handleResSetup(const Parser &parser, unsigned int track_idx) {
...
@@ -309,7 +309,7 @@ void RtspPusher::handleResSetup(const Parser &parser, unsigned int track_idx) {
}
}
void
RtspPusher
::
sendOptions
()
{
void
RtspPusher
::
sendOptions
()
{
_on_res_func
=
[
this
](
const
Parser
&
parser
)
{};
_on_res_func
=
[](
const
Parser
&
parser
)
{};
sendRtspRequest
(
"OPTIONS"
,
_content_base
);
sendRtspRequest
(
"OPTIONS"
,
_content_base
);
}
}
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论