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
3b5053af
Commit
3b5053af
authored
Sep 12, 2020
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复关闭HLS后,编译失败的问题
parent
be1e872f
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
35 行增加
和
15 行删除
+35
-15
3rdpart/media-server
+1
-1
src/Common/MultiMediaSourceMuxer.h
+6
-4
src/Record/HlsRecorder.h
+1
-7
src/Record/TsMuxer.cpp
+1
-3
src/Record/TsMuxer.h
+23
-0
src/Rtp/PSRtpSender.cpp
+3
-0
没有找到文件。
media-server
@
82a48c57
Subproject commit
729de4b2eebad09457202656ee5b7ee68b1390c5
Subproject commit
82a48c57ae5269aaa70a8c3df8a67dc06b05d0cd
src/Common/MultiMediaSourceMuxer.h
查看文件 @
3b5053af
...
@@ -10,12 +10,14 @@
...
@@ -10,12 +10,14 @@
#ifndef ZLMEDIAKIT_MULTIMEDIASOURCEMUXER_H
#ifndef ZLMEDIAKIT_MULTIMEDIASOURCEMUXER_H
#define ZLMEDIAKIT_MULTIMEDIASOURCEMUXER_H
#define ZLMEDIAKIT_MULTIMEDIASOURCEMUXER_H
#include "Rtsp/RtspMediaSourceMuxer.h"
#include "Rtmp/RtmpMediaSourceMuxer.h"
#include "Common/Stamp.h"
#include "Rtp/PSRtpSender.h"
#include "Record/Recorder.h"
#include "Record/Recorder.h"
#include "Record/HlsMediaSource.h"
#include "Record/HlsRecorder.h"
#include "Record/HlsRecorder.h"
#include "Rtp/PSRtpSender.h"
#include "Record/HlsMediaSource.h"
#include "Rtsp/RtspMediaSourceMuxer.h"
#include "Rtmp/RtmpMediaSourceMuxer.h"
namespace
mediakit
{
namespace
mediakit
{
...
...
src/Record/HlsRecorder.h
查看文件 @
3b5053af
...
@@ -15,11 +15,7 @@
...
@@ -15,11 +15,7 @@
#include "TsMuxer.h"
#include "TsMuxer.h"
namespace
mediakit
{
namespace
mediakit
{
class
HlsRecorder
:
public
MediaSourceEventInterceptor
,
public
std
::
enable_shared_from_this
<
HlsRecorder
>
class
HlsRecorder
:
public
MediaSourceEventInterceptor
,
public
TsMuxer
,
public
std
::
enable_shared_from_this
<
HlsRecorder
>
{
#if defined(ENABLE_HLS)
,
public
TsMuxer
#endif
{
public
:
public
:
typedef
std
::
shared_ptr
<
HlsRecorder
>
Ptr
;
typedef
std
::
shared_ptr
<
HlsRecorder
>
Ptr
;
HlsRecorder
(
const
string
&
m3u8_file
,
const
string
&
params
){
HlsRecorder
(
const
string
&
m3u8_file
,
const
string
&
params
){
...
@@ -63,7 +59,6 @@ public:
...
@@ -63,7 +59,6 @@ public:
return
_clear_cache
?
true
:
_enabled
;
return
_clear_cache
?
true
:
_enabled
;
}
}
#if defined(ENABLE_HLS)
void
inputFrame
(
const
Frame
::
Ptr
&
frame
)
override
{
void
inputFrame
(
const
Frame
::
Ptr
&
frame
)
override
{
if
(
_clear_cache
)
{
if
(
_clear_cache
)
{
_clear_cache
=
false
;
_clear_cache
=
false
;
...
@@ -78,7 +73,6 @@ private:
...
@@ -78,7 +73,6 @@ private:
void
onTs
(
const
void
*
packet
,
int
bytes
,
uint32_t
timestamp
,
bool
is_idr_fast_packet
)
override
{
void
onTs
(
const
void
*
packet
,
int
bytes
,
uint32_t
timestamp
,
bool
is_idr_fast_packet
)
override
{
_hls
->
inputData
((
char
*
)
packet
,
bytes
,
timestamp
,
is_idr_fast_packet
);
_hls
->
inputData
((
char
*
)
packet
,
bytes
,
timestamp
,
is_idr_fast_packet
);
}
}
#endif
private
:
private
:
//默认不生成hls文件,有播放器时再生成
//默认不生成hls文件,有播放器时再生成
...
...
src/Record/TsMuxer.cpp
查看文件 @
3b5053af
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
* may be found in the AUTHORS file in the root of the source tree.
* may be found in the AUTHORS file in the root of the source tree.
*/
*/
#include "TsMuxer.h"
#if defined(ENABLE_HLS)
#if defined(ENABLE_HLS)
#include "TsMuxer.h"
#include "mpeg-ts-proto.h"
#include "mpeg-ts-proto.h"
#include "mpeg-ts.h"
#include "mpeg-ts.h"
#include "Extension/H264.h"
#include "Extension/H264.h"
...
@@ -183,5 +183,4 @@ void TsMuxer::uninit() {
...
@@ -183,5 +183,4 @@ void TsMuxer::uninit() {
}
}
}
//namespace mediakit
}
//namespace mediakit
#endif// defined(ENABLE_HLS)
#endif// defined(ENABLE_HLS)
\ No newline at end of file
src/Record/TsMuxer.h
查看文件 @
3b5053af
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#ifndef TSMUXER_H
#ifndef TSMUXER_H
#define TSMUXER_H
#define TSMUXER_H
#if defined(ENABLE_HLS)
#include <unordered_map>
#include <unordered_map>
#include "Extension/Frame.h"
#include "Extension/Frame.h"
#include "Extension/Track.h"
#include "Extension/Track.h"
...
@@ -72,4 +73,25 @@ private:
...
@@ -72,4 +73,25 @@ private:
};
};
}
//namespace mediakit
}
//namespace mediakit
#else
#include "Common/MediaSink.h"
namespace
mediakit
{
class
TsMuxer
:
public
MediaSinkInterface
{
public
:
TsMuxer
()
{}
~
TsMuxer
()
override
{}
void
addTrack
(
const
Track
::
Ptr
&
track
)
override
{}
void
resetTracks
()
override
{}
void
inputFrame
(
const
Frame
::
Ptr
&
frame
)
override
{}
protected
:
virtual
void
onTs
(
const
void
*
packet
,
int
bytes
,
uint32_t
timestamp
,
bool
is_idr_fast_packet
)
=
0
;
};
}
//namespace mediakit
#endif// defined(ENABLE_HLS)
#endif //TSMUXER_H
#endif //TSMUXER_H
\ No newline at end of file
src/Rtp/PSRtpSender.cpp
查看文件 @
3b5053af
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
* may be found in the AUTHORS file in the root of the source tree.
* may be found in the AUTHORS file in the root of the source tree.
*/
*/
#if defined(ENABLE_RTPPROXY)
#include "PSRtpSender.h"
#include "PSRtpSender.h"
#include "Rtsp/RtspSession.h"
#include "Rtsp/RtspSession.h"
#include "Thread/WorkThreadPool.h"
#include "Thread/WorkThreadPool.h"
...
@@ -163,3 +164,4 @@ void PSRtpSender::onErr(const SockException &ex, bool is_connect) {
...
@@ -163,3 +164,4 @@ void PSRtpSender::onErr(const SockException &ex, bool is_connect) {
}
}
}
//namespace mediakit
}
//namespace mediakit
#endif// defined(ENABLE_RTPPROXY)
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论