mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-17 05:25:57 +08:00
release 8.0
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user