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
477475a6
Commit
477475a6
authored
May 18, 2020
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量添加bom头、批量替换tab字符
parent
7bc7d952
显示空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
27 行增加
和
60 行删除
+27
-60
api/include/mk_common.h
+0
-0
src/Common/Device.h
+0
-0
src/Extension/Factory.cpp
+0
-0
src/Extension/Opus.cpp
+1
-1
src/Extension/Opus.h
+1
-1
src/Http/HlsParser.cpp
+1
-1
src/Http/HlsParser.h
+1
-1
src/Http/HlsPlayer.cpp
+1
-1
src/Http/HlsPlayer.h
+1
-1
src/Http/HttpTSPlayer.cpp
+1
-1
src/Http/HttpTSPlayer.h
+1
-1
src/Record/MP4.cpp
+1
-1
src/Record/MP4.h
+1
-1
src/Record/MP4Demuxer.cpp
+1
-1
src/Record/MP4Demuxer.h
+1
-1
src/Rtsp/RtspSession.cpp
+0
-0
tests/bom.cpp
+13
-44
tests/tab.cpp
+0
-2
tests/test_player.cpp
+1
-1
tests/test_rtp.cpp
+1
-1
没有找到文件。
api/include/mk_common.h
查看文件 @
477475a6
src/Common/Device.h
查看文件 @
477475a6
src/Extension/Factory.cpp
查看文件 @
477475a6
src/Extension/Opus.cpp
查看文件 @
477475a6
/*
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
src/Extension/Opus.h
查看文件 @
477475a6
/*
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
src/Http/HlsParser.cpp
查看文件 @
477475a6
/*
/*
* Copyright (c) 2020 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2020 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
src/Http/HlsParser.h
查看文件 @
477475a6
/*
/*
* Copyright (c) 2020 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2020 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
src/Http/HlsPlayer.cpp
查看文件 @
477475a6
/*
/*
* Copyright (c) 2020 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2020 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
src/Http/HlsPlayer.h
查看文件 @
477475a6
/*
/*
* Copyright (c) 2020 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2020 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
src/Http/HttpTSPlayer.cpp
查看文件 @
477475a6
/*
/*
* Copyright (c) 2020 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2020 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
src/Http/HttpTSPlayer.h
查看文件 @
477475a6
/*
/*
* Copyright (c) 2020 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2020 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
src/Record/MP4.cpp
查看文件 @
477475a6
/*
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
src/Record/MP4.h
查看文件 @
477475a6
/*
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
src/Record/MP4Demuxer.cpp
查看文件 @
477475a6
/*
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
src/Record/MP4Demuxer.h
查看文件 @
477475a6
/*
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
src/Rtsp/RtspSession.cpp
查看文件 @
477475a6
tests/bom.cpp
查看文件 @
477475a6
...
@@ -61,40 +61,6 @@ public:
...
@@ -61,40 +61,6 @@ public:
}
}
};
};
void
get_file_path
(
const
char
*
path
,
const
char
*
file_name
,
char
*
file_path
)
{
strcpy
(
file_path
,
path
);
if
(
file_path
[
strlen
(
file_path
)
-
1
]
!=
'/'
)
{
strcat
(
file_path
,
"/"
);
}
strcat
(
file_path
,
file_name
);
}
template
<
typename
FUNC
>
void
for_each_file
(
const
char
*
path
,
FUNC
&&
func
){
DIR
*
dir
;
dirent
*
dir_info
;
char
file_path
[
PATH_MAX
];
if
(
File
::
is_file
(
path
))
{
func
(
path
);
return
;
}
if
(
File
::
is_dir
(
path
))
{
if
((
dir
=
opendir
(
path
))
==
NULL
)
{
closedir
(
dir
);
return
;
}
while
((
dir_info
=
readdir
(
dir
))
!=
NULL
)
{
if
(
File
::
is_special_dir
(
dir_info
->
d_name
))
{
continue
;
}
get_file_path
(
path
,
dir_info
->
d_name
,
file_path
);
for_each_file
(
file_path
,
std
::
forward
<
FUNC
>
(
func
));
}
closedir
(
dir
);
return
;
}
}
static
const
char
s_bom
[]
=
"
\xEF\xBB\xBF
"
;
static
const
char
s_bom
[]
=
"
\xEF\xBB\xBF
"
;
void
add_or_rm_bom
(
const
char
*
file
,
bool
rm_bom
){
void
add_or_rm_bom
(
const
char
*
file
,
bool
rm_bom
){
...
@@ -159,23 +125,26 @@ int main(int argc, char *argv[]) {
...
@@ -159,23 +125,26 @@ 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
,
""
);
File
::
scanDir
(
path
,
[
&
](
const
string
&
path
,
bool
isDir
)
{
for_each_file
(
path
.
data
(),[
&
](
const
char
*
path
){
if
(
isDir
)
{
if
(
!
no_filter
){
return
true
;
}
if
(
!
no_filter
)
{
//开启了过滤器
//开启了过滤器
auto
pos
=
strstr
(
path
,
"."
);
auto
pos
=
strstr
(
path
.
data
(),
"."
);
if
(
pos
==
nullptr
)
{
if
(
pos
==
nullptr
)
{
//没有后缀
//没有后缀
return
;
return
true
;
}
}
auto
ext
=
pos
+
1
;
auto
ext
=
pos
+
1
;
if
(
filter_set
.
find
(
ext
)
==
filter_set
.
end
())
{
if
(
filter_set
.
find
(
ext
)
==
filter_set
.
end
())
{
//后缀不匹配
//后缀不匹配
return
;
return
true
;
}
}
}
}
//该文件匹配
//该文件匹配
process_file
(
path
,
rm_bom
);
process_file
(
path
.
data
(),
rm_bom
);
});
return
true
;
},
true
);
return
0
;
return
0
;
}
}
tests/tab.cpp
查看文件 @
477475a6
...
@@ -128,8 +128,6 @@ int main(int argc, char *argv[]) {
...
@@ -128,8 +128,6 @@ 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_player.cpp
查看文件 @
477475a6
/*
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
tests/test_rtp.cpp
查看文件 @
477475a6
/*
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论