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
1168174c
Commit
1168174c
authored
Mar 20, 2020
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tab统一替换为4个空格键:#242
parent
2a0d78fd
显示空白字符变更
内嵌
并排
正在显示
84 个修改的文件
包含
36 行增加
和
15 行删除
+36
-15
3rdpart/ZLToolKit
+1
-1
api/include/mk_common.h
+0
-0
api/source/mk_player.cpp
+0
-0
server/FFmpegSource.cpp
+0
-0
server/Process.cpp
+0
-0
server/WebApi.cpp
+0
-0
server/main.cpp
+0
-0
src/Codec/AACEncoder.cpp
+0
-0
src/Codec/AACEncoder.h
+0
-0
src/Codec/H264Encoder.cpp
+0
-0
src/Codec/H264Encoder.h
+0
-0
src/Common/Device.cpp
+0
-0
src/Common/Device.h
+0
-0
src/Common/config.cpp
+0
-0
src/Extension/H264Rtp.cpp
+0
-0
src/Extension/H265.cpp
+0
-0
src/Extension/H265.h
+0
-0
src/Extension/SPSParser.c
+0
-0
src/Extension/SPSParser.h
+0
-0
src/Extension/Track.h
+0
-0
src/Http/HttpClient.h
+0
-0
src/Http/HttpClientImp.cpp
+0
-0
src/Http/HttpClientImp.h
+0
-0
src/Http/HttpDownloader.cpp
+0
-0
src/Http/HttpDownloader.h
+0
-0
src/Http/HttpSession.cpp
+0
-0
src/Http/HttpSession.h
+0
-0
src/Http/strCoding.cpp
+0
-0
src/Http/strCoding.h
+0
-0
src/Player/MediaPlayer.cpp
+0
-0
src/Player/MediaPlayer.h
+0
-0
src/Player/PlayerBase.cpp
+0
-0
src/Player/PlayerBase.h
+0
-0
src/Player/PlayerProxy.cpp
+0
-0
src/Player/PlayerProxy.h
+0
-0
src/Record/HlsMediaSource.h
+0
-0
src/Record/MP4Muxer.cpp
+0
-0
src/Record/MP4Reader.cpp
+0
-0
src/Record/MP4Reader.h
+0
-0
src/Record/MP4Recorder.cpp
+0
-0
src/Record/MP4Recorder.h
+0
-0
src/Record/Recorder.h
+0
-0
src/Rtmp/RtmpDemuxer.h
+0
-0
src/Rtmp/RtmpMediaSource.h
+0
-0
src/Rtmp/RtmpMediaSourceImp.h
+0
-0
src/Rtmp/RtmpPlayer.cpp
+0
-0
src/Rtmp/RtmpPlayer.h
+0
-0
src/Rtmp/RtmpPlayerImp.h
+0
-0
src/Rtmp/RtmpProtocol.cpp
+0
-0
src/Rtmp/RtmpProtocol.h
+0
-0
src/Rtmp/RtmpPusher.cpp
+0
-0
src/Rtmp/RtmpPusher.h
+0
-0
src/Rtmp/RtmpSession.cpp
+0
-0
src/Rtmp/RtmpSession.h
+0
-0
src/Rtmp/amf.cpp
+0
-0
src/Rtmp/amf.h
+0
-0
src/Rtmp/utils.cpp
+0
-0
src/Rtsp/RtpMultiCaster.cpp
+0
-0
src/Rtsp/RtpMultiCaster.h
+0
-0
src/Rtsp/RtpReceiver.cpp
+0
-0
src/Rtsp/Rtsp.cpp
+0
-0
src/Rtsp/Rtsp.h
+0
-0
src/Rtsp/RtspDemuxer.cpp
+0
-0
src/Rtsp/RtspDemuxer.h
+0
-0
src/Rtsp/RtspMediaSource.h
+0
-0
src/Rtsp/RtspMediaSourceImp.h
+0
-0
src/Rtsp/RtspPlayer.cpp
+0
-0
src/Rtsp/RtspPlayer.h
+0
-0
src/Rtsp/RtspPlayerImp.h
+0
-0
src/Rtsp/RtspSession.cpp
+0
-0
src/Rtsp/RtspSession.h
+0
-0
src/Rtsp/UDPServer.cpp
+0
-0
src/Rtsp/UDPServer.h
+0
-0
src/Shell/ShellSession.cpp
+0
-0
src/Shell/ShellSession.h
+0
-0
tests/DeviceHK/DeviceHK.cpp
+0
-0
tests/DeviceHK/DeviceHK.h
+0
-0
tests/H264Decoder.h
+0
-0
tests/YuvDisplayer.h
+0
-0
tests/bom.cpp
+2
-1
tests/tab.cpp
+33
-13
tests/test_httpApi.cpp
+0
-0
tests/test_pusherMp4.cpp
+0
-0
tests/test_server.cpp
+0
-0
没有找到文件。
ZLToolKit
@
d985d49f
Subproject commit
34b42499ce9ee055b5c7cac9a270239984d0e839
Subproject commit
d985d49f28b441216bf50020b7c6587edb5f43dc
api/include/mk_common.h
查看文件 @
1168174c
api/source/mk_player.cpp
查看文件 @
1168174c
server/FFmpegSource.cpp
查看文件 @
1168174c
server/Process.cpp
查看文件 @
1168174c
server/WebApi.cpp
查看文件 @
1168174c
server/main.cpp
查看文件 @
1168174c
src/Codec/AACEncoder.cpp
查看文件 @
1168174c
src/Codec/AACEncoder.h
查看文件 @
1168174c
src/Codec/H264Encoder.cpp
查看文件 @
1168174c
src/Codec/H264Encoder.h
查看文件 @
1168174c
src/Common/Device.cpp
查看文件 @
1168174c
src/Common/Device.h
查看文件 @
1168174c
src/Common/config.cpp
查看文件 @
1168174c
src/Extension/H264Rtp.cpp
查看文件 @
1168174c
src/Extension/H265.cpp
查看文件 @
1168174c
src/Extension/H265.h
查看文件 @
1168174c
src/Extension/SPSParser.c
查看文件 @
1168174c
src/Extension/SPSParser.h
查看文件 @
1168174c
src/Extension/Track.h
查看文件 @
1168174c
src/Http/HttpClient.h
查看文件 @
1168174c
src/Http/HttpClientImp.cpp
查看文件 @
1168174c
src/Http/HttpClientImp.h
查看文件 @
1168174c
src/Http/HttpDownloader.cpp
查看文件 @
1168174c
src/Http/HttpDownloader.h
查看文件 @
1168174c
src/Http/HttpSession.cpp
查看文件 @
1168174c
src/Http/HttpSession.h
查看文件 @
1168174c
src/Http/strCoding.cpp
查看文件 @
1168174c
src/Http/strCoding.h
查看文件 @
1168174c
src/Player/MediaPlayer.cpp
查看文件 @
1168174c
src/Player/MediaPlayer.h
查看文件 @
1168174c
src/Player/PlayerBase.cpp
查看文件 @
1168174c
src/Player/PlayerBase.h
查看文件 @
1168174c
src/Player/PlayerProxy.cpp
查看文件 @
1168174c
src/Player/PlayerProxy.h
查看文件 @
1168174c
src/Record/HlsMediaSource.h
查看文件 @
1168174c
src/Record/MP4Muxer.cpp
查看文件 @
1168174c
src/Record/MP4Reader.cpp
查看文件 @
1168174c
src/Record/MP4Reader.h
查看文件 @
1168174c
src/Record/MP4Recorder.cpp
查看文件 @
1168174c
src/Record/MP4Recorder.h
查看文件 @
1168174c
src/Record/Recorder.h
查看文件 @
1168174c
src/Rtmp/RtmpDemuxer.h
查看文件 @
1168174c
src/Rtmp/RtmpMediaSource.h
查看文件 @
1168174c
src/Rtmp/RtmpMediaSourceImp.h
查看文件 @
1168174c
src/Rtmp/RtmpPlayer.cpp
查看文件 @
1168174c
src/Rtmp/RtmpPlayer.h
查看文件 @
1168174c
src/Rtmp/RtmpPlayerImp.h
查看文件 @
1168174c
src/Rtmp/RtmpProtocol.cpp
查看文件 @
1168174c
src/Rtmp/RtmpProtocol.h
查看文件 @
1168174c
src/Rtmp/RtmpPusher.cpp
查看文件 @
1168174c
src/Rtmp/RtmpPusher.h
查看文件 @
1168174c
src/Rtmp/RtmpSession.cpp
查看文件 @
1168174c
src/Rtmp/RtmpSession.h
查看文件 @
1168174c
src/Rtmp/amf.cpp
查看文件 @
1168174c
src/Rtmp/amf.h
查看文件 @
1168174c
src/Rtmp/utils.cpp
查看文件 @
1168174c
src/Rtsp/RtpMultiCaster.cpp
查看文件 @
1168174c
src/Rtsp/RtpMultiCaster.h
查看文件 @
1168174c
src/Rtsp/RtpReceiver.cpp
查看文件 @
1168174c
src/Rtsp/Rtsp.cpp
查看文件 @
1168174c
src/Rtsp/Rtsp.h
查看文件 @
1168174c
src/Rtsp/RtspDemuxer.cpp
查看文件 @
1168174c
src/Rtsp/RtspDemuxer.h
查看文件 @
1168174c
src/Rtsp/RtspMediaSource.h
查看文件 @
1168174c
src/Rtsp/RtspMediaSourceImp.h
查看文件 @
1168174c
src/Rtsp/RtspPlayer.cpp
查看文件 @
1168174c
src/Rtsp/RtspPlayer.h
查看文件 @
1168174c
src/Rtsp/RtspPlayerImp.h
查看文件 @
1168174c
src/Rtsp/RtspSession.cpp
查看文件 @
1168174c
src/Rtsp/RtspSession.h
查看文件 @
1168174c
src/Rtsp/UDPServer.cpp
查看文件 @
1168174c
src/Rtsp/UDPServer.h
查看文件 @
1168174c
src/Shell/ShellSession.cpp
查看文件 @
1168174c
src/Shell/ShellSession.h
查看文件 @
1168174c
tests/DeviceHK/DeviceHK.cpp
查看文件 @
1168174c
tests/DeviceHK/DeviceHK.h
查看文件 @
1168174c
tests/H264Decoder.h
查看文件 @
1168174c
tests/YuvDisplayer.h
查看文件 @
1168174c
tests/bom.cpp
查看文件 @
1168174c
...
@@ -126,6 +126,7 @@ void process_file(const char *file,bool rm_bom){
...
@@ -126,6 +126,7 @@ void process_file(const char *file,bool rm_bom){
InfoL
<<
(
rm_bom
?
"删除"
:
"添加"
)
<<
"bom:"
<<
file
;
InfoL
<<
(
rm_bom
?
"删除"
:
"添加"
)
<<
"bom:"
<<
file
;
}
}
/// 这个程序是为了统一添加或删除utf-8 bom头
int
main
(
int
argc
,
char
*
argv
[])
{
int
main
(
int
argc
,
char
*
argv
[])
{
CMD_main
cmd_main
;
CMD_main
cmd_main
;
try
{
try
{
...
@@ -148,7 +149,7 @@ int main(int argc, char *argv[]) {
...
@@ -148,7 +149,7 @@ int main(int argc, char *argv[]) {
bool
no_filter
=
filter_set
.
find
(
"*"
)
!=
filter_set
.
end
();
bool
no_filter
=
filter_set
.
find
(
"*"
)
!=
filter_set
.
end
();
//设置日志
//设置日志
Logger
::
Instance
().
add
(
std
::
make_shared
<
ConsoleChannel
>
());
Logger
::
Instance
().
add
(
std
::
make_shared
<
ConsoleChannel
>
());
path
=
File
::
absolutePath
(
path
,
""
);
for_each_file
(
path
.
data
(),[
&
](
const
char
*
path
){
for_each_file
(
path
.
data
(),[
&
](
const
char
*
path
){
if
(
!
no_filter
){
if
(
!
no_filter
){
//开启了过滤器
//开启了过滤器
...
...
tests/tab.cpp
查看文件 @
1168174c
#
include
<
stdlib
.
h
>
#
include
<
memory
.
h
>
#include <memory.h>
#if !defined(_WIN32)
#include <dirent.h>
#endif //!defined(_WIN32)
#include <set>
#include <set>
#include "Util/CMD.h"
#include "Util/CMD.h"
#include "Util/util.h"
#include "Util/util.h"
#include "Util/logger.h"
#include "Util/logger.h"
#include "Util/File.h"
#include "Util/File.h"
#include "Util/uv_errno.h"
using
namespace
std
;
using
namespace
std
;
using
namespace
toolkit
;
using
namespace
toolkit
;
...
@@ -41,17 +32,40 @@ public:
...
@@ -41,17 +32,40 @@ public:
virtual
~
CMD_main
()
{}
virtual
~
CMD_main
()
{}
};
};
vector
<
string
>
split
(
const
string
&
s
,
const
char
*
delim
)
{
vector
<
string
>
ret
;
int
last
=
0
;
int
index
=
s
.
find
(
delim
,
last
);
while
(
index
!=
string
::
npos
)
{
if
(
index
-
last
>=
0
)
{
ret
.
push_back
(
s
.
substr
(
last
,
index
-
last
));
}
last
=
index
+
strlen
(
delim
);
index
=
s
.
find
(
delim
,
last
);
}
if
(
!
s
.
size
()
||
s
.
size
()
-
last
>=
0
)
{
ret
.
push_back
(
s
.
substr
(
last
));
}
return
ret
;
}
void
process_file
(
const
char
*
file
)
{
void
process_file
(
const
char
*
file
)
{
auto
str
=
File
::
loadFile
(
file
);
auto
str
=
File
::
loadFile
(
file
);
if
(
str
.
empty
())
{
if
(
str
.
empty
())
{
return
;
return
;
}
}
auto
lines
=
split
(
str
,
"
\n
"
);
auto
lines
=
::
split
(
str
,
"
\n
"
);
deque
<
string
>
lines_copy
;
deque
<
string
>
lines_copy
;
for
(
auto
&
line
:
lines
)
{
for
(
auto
&
line
:
lines
)
{
if
(
line
.
empty
()){
lines_copy
.
push_back
(
""
);
continue
;
}
string
line_copy
;
string
line_copy
;
bool
flag
=
false
;
bool
flag
=
false
;
int
i
=
0
;
for
(
auto
&
ch
:
line
)
{
for
(
auto
&
ch
:
line
)
{
++
i
;
switch
(
ch
)
{
switch
(
ch
)
{
case
'\t'
:
case
'\t'
:
line_copy
.
append
(
" "
);
line_copy
.
append
(
" "
);
...
@@ -65,6 +79,7 @@ void process_file(const char *file) {
...
@@ -65,6 +79,7 @@ void process_file(const char *file) {
break
;
break
;
}
}
if
(
flag
)
{
if
(
flag
)
{
line_copy
.
append
(
line
.
substr
(
i
));
break
;
break
;
}
}
}
}
...
@@ -75,9 +90,13 @@ void process_file(const char *file) {
...
@@ -75,9 +90,13 @@ void process_file(const char *file) {
str
.
append
(
line
);
str
.
append
(
line
);
str
.
push_back
(
'\n'
);
str
.
push_back
(
'\n'
);
}
}
if
(
!
lines_copy
.
empty
()){
str
.
pop_back
();
}
File
::
saveFile
(
str
,
file
);
File
::
saveFile
(
str
,
file
);
}
}
/// 这个程序是为了统一替换tab为4个空格
int
main
(
int
argc
,
char
*
argv
[])
{
int
main
(
int
argc
,
char
*
argv
[])
{
CMD_main
cmd_main
;
CMD_main
cmd_main
;
try
{
try
{
...
@@ -87,10 +106,9 @@ int main(int argc, char *argv[]) {
...
@@ -87,10 +106,9 @@ int main(int argc, char *argv[]) {
return
-
1
;
return
-
1
;
}
}
bool
rm_bom
=
cmd_main
.
hasKey
(
"rm"
);
string
path
=
cmd_main
[
"in"
];
string
path
=
cmd_main
[
"in"
];
string
filter
=
cmd_main
[
"filter"
];
string
filter
=
cmd_main
[
"filter"
];
auto
vec
=
split
(
filter
,
","
);
auto
vec
=
::
split
(
filter
,
","
);
set
<
string
>
filter_set
;
set
<
string
>
filter_set
;
for
(
auto
ext
:
vec
)
{
for
(
auto
ext
:
vec
)
{
...
@@ -100,6 +118,8 @@ int main(int argc, char *argv[]) {
...
@@ -100,6 +118,8 @@ int main(int argc, char *argv[]) {
bool
no_filter
=
filter_set
.
find
(
"*"
)
!=
filter_set
.
end
();
bool
no_filter
=
filter_set
.
find
(
"*"
)
!=
filter_set
.
end
();
//设置日志
//设置日志
Logger
::
Instance
().
add
(
std
::
make_shared
<
ConsoleChannel
>
());
Logger
::
Instance
().
add
(
std
::
make_shared
<
ConsoleChannel
>
());
path
=
File
::
absolutePath
(
path
,
""
);
DebugL
<<
path
;
File
::
scanDir
(
path
,
[
&
](
const
string
&
path
,
bool
isDir
)
{
File
::
scanDir
(
path
,
[
&
](
const
string
&
path
,
bool
isDir
)
{
if
(
isDir
)
{
if
(
isDir
)
{
return
true
;
return
true
;
...
...
tests/test_httpApi.cpp
查看文件 @
1168174c
tests/test_pusherMp4.cpp
查看文件 @
1168174c
tests/test_server.cpp
查看文件 @
1168174c
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论