release 8.0

This commit is contained in:
夏楚
2023-12-09 16:23:51 +08:00
committed by GitHub
parent 44c82752b3
commit bbe8f4a018
346 changed files with 2529 additions and 3435 deletions

View File

@@ -1,9 +1,9 @@
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
* Copyright (c) 2016-present The ZLMediaKit project authors. All Rights Reserved.
*
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/ZLMediaKit/ZLMediaKit).
*
* Use of this source code is governed by MIT license that can be found in the
* Use of this source code is governed by MIT-like license that can be found in the
* LICENSE file in the root of the source tree. All contributing project authors
* may be found in the AUTHORS file in the root of the source tree.
*/
@@ -56,8 +56,6 @@ RtspSession::RtspSession(const Socket::Ptr &sock) : Session(sock) {
sock->setSendTimeOutSecond(keep_alive_sec);
}
RtspSession::~RtspSession() = default;
void RtspSession::onError(const SockException &err) {
bool is_player = !_push_src_ownership;
uint64_t duration = _alive_ticker.createdTime() / 1000;
@@ -679,17 +677,17 @@ void RtspSession::handleReq_Setup(const Parser &parser) {
switch (_rtp_type) {
case Rtsp::RTP_TCP: {
if(_push_src){
//rtsp推流时interleaved由推流者决定
auto key_values = Parser::parseArgs(parser["Transport"],";","=");
int interleaved_rtp = -1 , interleaved_rtcp = -1;
if(2 == sscanf(key_values["interleaved"].data(),"%d-%d",&interleaved_rtp,&interleaved_rtcp)){
if (_push_src) {
// rtsp推流时interleaved由推流者决定
auto key_values = Parser::parseArgs(parser["Transport"], ";", "=");
int interleaved_rtp = -1, interleaved_rtcp = -1;
if (2 == sscanf(key_values["interleaved"].data(), "%d-%d", &interleaved_rtp, &interleaved_rtcp)) {
trackRef->_interleaved = interleaved_rtp;
}else{
} else {
throw SockException(Err_shutdown, "can not find interleaved when setup of rtp over tcp");
}
}else{
//rtsp播放时由于数据共享分发所以interleaved必须由服务器决定
} else {
// rtsp播放时由于数据共享分发所以interleaved必须由服务器决定
trackRef->_interleaved = 2 * trackRef->_type;
}
sendRtspResponse("200 OK",