mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
125b703ea9
6
AUTHORS
6
AUTHORS
@ -23,12 +23,12 @@ sunhui <sunhui200475@163.com>
|
||||
mirs <fangpengcheng@bilibili.com>
|
||||
Kevin Cheng <kevin__cheng@outlook.com>
|
||||
Liu Jiang <root@oopy.org>
|
||||
along <alongl@users.noreply.github.com>
|
||||
along(https://github.com/alongl)
|
||||
qingci <xpy66swsry@gmail.com>
|
||||
lyg1949 <zh.ghlong@qq.com>
|
||||
zhlong <zh.ghlong@qq.com>
|
||||
Luke <automan@easydarwin.org>
|
||||
大裤衩 <3503207480@qq.com>
|
||||
droid.chow <droid.chow@gmail.com>
|
||||
[陈晓林](https://github.com/musicwood)
|
||||
[老衲不出家](https://github.com/monktan89)
|
||||
[老衲不出家](https://github.com/monktan89)
|
||||
big panda <2381267071@qq.com>
|
@ -143,7 +143,7 @@ bash build_docker_images.sh
|
||||
- [基于ZLMediaKit分支的管理WEB网站](https://github.com/chenxiaolei/ZLMediaKit_NVR_UI)
|
||||
|
||||
- 流媒体管理平台
|
||||
- [功能强大的流媒体控制管理接口平台,支持GB28181](https://github.com/chatop2020/StreamNode)
|
||||
- [功能强大的流媒体控制管理接口平台,支持GB28181](https://github.com/chatop2020/AKStream)
|
||||
- [GB28181-2016网络视频平台](https://github.com/648540858/wvp-GB28181-pro)
|
||||
- [node-js版本的GB28181平台](https://gitee.com/hfwudao/GB28181_Node_Http)
|
||||
- [Go实现的海康ehome服务器](https://github.com/tsingeye/FreeEhome)
|
||||
@ -218,11 +218,10 @@ bash build_docker_images.sh
|
||||
[mirs](fangpengcheng@bilibili.com>)
|
||||
[Kevin Cheng](kevin__cheng@outlook.com>)
|
||||
[Liu Jiang](root@oopy.org>)
|
||||
[along](alongl@users.noreply.github.com>)
|
||||
[along](https://github.com/alongl)
|
||||
[qingci](xpy66swsry@gmail.com>)
|
||||
[lyg1949](zh.ghlong@qq.com>)
|
||||
[zhlong](zh.ghlong@qq.com>)
|
||||
[Luke](automan@easydarwin.org>)
|
||||
[大裤衩](3503207480@qq.com>)
|
||||
[droid.chow](droid.chow@gmail.com>)
|
||||
[陈晓林](https://github.com/musicwood)
|
||||
@ -240,6 +239,6 @@ bash build_docker_images.sh
|
||||
欢迎捐赠以便更好的推动项目的发展,谢谢您的支持!
|
||||
同时欢迎捐赠公网服务器用于在线展示效果。
|
||||
|
||||
[支付宝](https://gitee.com/xia-chu/other/raw/master/IMG_3919.JPG)
|
||||
[支付宝](https://github.com/xia-chu/other/blob/master/IMG_3919.JPG)
|
||||
|
||||
[微信](https://gitee.com/xia-chu/other/raw/master/IMG_3920.JPG)
|
||||
[微信](https://github.com/xia-chu/other/blob/master/IMG_3920.JPG)
|
||||
|
@ -48,9 +48,9 @@ void release_pusher(mk_media *ptr) {
|
||||
|
||||
void release_context(Context **ptr){
|
||||
if (ptr && *ptr) {
|
||||
release_pusher((*ptr)->pusher);
|
||||
release_media((*ptr)->media);
|
||||
release_player((*ptr)->player);
|
||||
release_pusher(&(*ptr)->pusher);
|
||||
release_media(&(*ptr)->media);
|
||||
release_player(&(*ptr)->player);
|
||||
free(*ptr);
|
||||
*ptr = NULL;
|
||||
}
|
||||
@ -91,7 +91,7 @@ void API_CALL on_mk_play_event_func(void *user_data, int err_code, const char *e
|
||||
if (err_code == 0) {
|
||||
//success
|
||||
log_debug("play success!");
|
||||
ctx->media = mk_media_create("__defaultVost__", "live", "test", 0, 0, 0);
|
||||
ctx->media = mk_media_create("__defaultVhost__", "live", "test", 0, 0, 0);
|
||||
|
||||
int video_codec = mk_player_video_codecId(ctx->player);
|
||||
int audio_codec = mk_player_audio_codecId(ctx->player);
|
||||
@ -108,6 +108,7 @@ void API_CALL on_mk_play_event_func(void *user_data, int err_code, const char *e
|
||||
mk_player_audio_channel(ctx->player),
|
||||
mk_player_audio_bit(ctx->player));
|
||||
}
|
||||
mk_media_init_complete(ctx->media);
|
||||
mk_media_set_on_regist(ctx->media, on_mk_media_source_regist_func, ctx);
|
||||
|
||||
} else {
|
||||
|
@ -512,6 +512,12 @@
|
||||
"value": null,
|
||||
"description": "rtsp拉流时,拉流方式,0:tcp,1:udp,2:组播",
|
||||
"disabled": true
|
||||
},
|
||||
{
|
||||
"key": "timeout_sec",
|
||||
"value": "10",
|
||||
"description": "拉流超时时间,单位秒,float类型",
|
||||
"disabled": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -600,6 +600,7 @@ void installWebApi() {
|
||||
bool enable_hls,
|
||||
bool enable_mp4,
|
||||
int rtp_type,
|
||||
float timeoutSec,
|
||||
const function<void(const SockException &ex,const string &key)> &cb){
|
||||
auto key = getProxyKey(vhost,app,stream);
|
||||
lock_guard<recursive_mutex> lck(s_proxyMapMtx);
|
||||
@ -614,6 +615,12 @@ void installWebApi() {
|
||||
|
||||
//指定RTP over TCP(播放rtsp时有效)
|
||||
(*player)[kRtpType] = rtp_type;
|
||||
|
||||
if (timeoutSec > 0.1) {
|
||||
//播放握手超时时间
|
||||
(*player)[kTimeoutMS] = timeoutSec * 1000;
|
||||
}
|
||||
|
||||
//开始播放,如果播放失败或者播放中止,将会自动重试若干次,默认一直重试
|
||||
player->setPlayCallbackOnce([cb,key](const SockException &ex){
|
||||
if(ex){
|
||||
@ -643,6 +650,7 @@ void installWebApi() {
|
||||
allArgs["enable_hls"],/* 是否hls转发 */
|
||||
allArgs["enable_mp4"],/* 是否MP4录制 */
|
||||
allArgs["rtp_type"],
|
||||
allArgs["timeout_sec"],
|
||||
[invoker,val,headerOut](const SockException &ex,const string &key) mutable{
|
||||
if (ex) {
|
||||
val["code"] = API::OtherFailed;
|
||||
@ -1133,6 +1141,7 @@ void installWebApi() {
|
||||
true,/* 开启hls转发 */
|
||||
false,/* 禁用MP4录制 */
|
||||
0,//rtp over tcp方式拉流
|
||||
10,//10秒超时
|
||||
[invoker,val,headerOut](const SockException &ex,const string &key) mutable{
|
||||
if(ex){
|
||||
val["code"] = API::OtherFailed;
|
||||
|
@ -190,16 +190,10 @@ namespace Rtp {
|
||||
//RTP打包最大MTU,公网情况下更小
|
||||
const string kVideoMtuSize = RTP_FIELD"videoMtuSize";
|
||||
const string kAudioMtuSize = RTP_FIELD"audioMtuSize";
|
||||
//RTP排序缓存最大个数
|
||||
const string kMaxRtpCount = RTP_FIELD"maxRtpCount";
|
||||
//如果RTP序列正确次数累计达到该数字就启动清空排序缓存
|
||||
const string kClearCount = RTP_FIELD"clearCount";
|
||||
|
||||
onceToken token([](){
|
||||
mINI::Instance()[kVideoMtuSize] = 1400;
|
||||
mINI::Instance()[kAudioMtuSize] = 600;
|
||||
mINI::Instance()[kMaxRtpCount] = 50;
|
||||
mINI::Instance()[kClearCount] = 10;
|
||||
},nullptr);
|
||||
} //namespace Rtsp
|
||||
|
||||
|
@ -247,10 +247,6 @@ namespace Rtp {
|
||||
extern const string kVideoMtuSize;
|
||||
//RTP打包最大MTU,公网情况下更小
|
||||
extern const string kAudioMtuSize;
|
||||
//RTP排序缓存最大个数
|
||||
extern const string kMaxRtpCount;
|
||||
//如果RTP序列正确次数累计达到该数字就启动清空排序缓存
|
||||
extern const string kClearCount;
|
||||
} //namespace Rtsp
|
||||
|
||||
////////////组播配置///////////
|
||||
|
Loading…
Reference in New Issue
Block a user