mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Revert "Fix #2142, Async release bridger when unpublish. 4.0.60"
This reverts commit 06adb9dc42
.
This commit is contained in:
parent
06adb9dc42
commit
ed32965aa4
6 changed files with 5 additions and 60 deletions
|
@ -155,7 +155,6 @@ For previous versions, please read:
|
||||||
|
|
||||||
## V4 changes
|
## V4 changes
|
||||||
|
|
||||||
* v4.0, 2021-01-14, For [#2142][bug #2142], Async release bridger when unpublish. 4.0.60
|
|
||||||
* v4.0, 2021-01-08, HTML5 video tag resolution adaptive. 4.0.59
|
* v4.0, 2021-01-08, HTML5 video tag resolution adaptive. 4.0.59
|
||||||
* v4.0, 2021-01-08, Fix memory leak and bugs for RTC. 4.0.58
|
* v4.0, 2021-01-08, Fix memory leak and bugs for RTC. 4.0.58
|
||||||
* v4.0, 2021-01-06, Merge #2109, Refine srs_string_split.
|
* v4.0, 2021-01-06, Merge #2109, Refine srs_string_split.
|
||||||
|
@ -1796,7 +1795,6 @@ Winlin
|
||||||
[bug #1987]: https://github.com/ossrs/srs/issues/1987
|
[bug #1987]: https://github.com/ossrs/srs/issues/1987
|
||||||
[bug #1548]: https://github.com/ossrs/srs/issues/1548
|
[bug #1548]: https://github.com/ossrs/srs/issues/1548
|
||||||
[bug #1694]: https://github.com/ossrs/srs/issues/1694
|
[bug #1694]: https://github.com/ossrs/srs/issues/1694
|
||||||
[bug #2142]: https://github.com/ossrs/srs/issues/2142
|
|
||||||
[bug #yyyyyyyyyyyyy]: https://github.com/ossrs/srs/issues/yyyyyyyyyyyyy
|
[bug #yyyyyyyyyyyyy]: https://github.com/ossrs/srs/issues/yyyyyyyyyyyyy
|
||||||
|
|
||||||
[bug #1631]: https://github.com/ossrs/srs/issues/1631
|
[bug #1631]: https://github.com/ossrs/srs/issues/1631
|
||||||
|
|
|
@ -43,7 +43,6 @@
|
||||||
#include <srs_protocol_json.hpp>
|
#include <srs_protocol_json.hpp>
|
||||||
#include <srs_app_pithy_print.hpp>
|
#include <srs_app_pithy_print.hpp>
|
||||||
#include <srs_app_log.hpp>
|
#include <srs_app_log.hpp>
|
||||||
#include <srs_app_rtc_server.hpp>
|
|
||||||
|
|
||||||
#ifdef SRS_FFMPEG_FIT
|
#ifdef SRS_FFMPEG_FIT
|
||||||
#include <srs_app_rtc_codec.hpp>
|
#include <srs_app_rtc_codec.hpp>
|
||||||
|
@ -324,10 +323,8 @@ SrsRtcStream::~SrsRtcStream()
|
||||||
consumers.clear();
|
consumers.clear();
|
||||||
|
|
||||||
srs_freep(req);
|
srs_freep(req);
|
||||||
|
srs_freep(bridger_);
|
||||||
srs_freep(stream_desc_);
|
srs_freep(stream_desc_);
|
||||||
|
|
||||||
// Async remove the bridger, to notify the sources to clear it.
|
|
||||||
_srs_rtc_manager->remove(bridger_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
srs_error_t SrsRtcStream::initialize(SrsRequest* r)
|
srs_error_t SrsRtcStream::initialize(SrsRequest* r)
|
||||||
|
@ -486,8 +483,7 @@ void SrsRtcStream::on_unpublish()
|
||||||
|
|
||||||
// release unpublish stream description.
|
// release unpublish stream description.
|
||||||
set_stream_desc(NULL);
|
set_stream_desc(NULL);
|
||||||
// Async remove the bridger, to notify the sources to clear it.
|
srs_freep(bridger_);
|
||||||
_srs_rtc_manager->remove(bridger_);
|
|
||||||
|
|
||||||
// TODO: FIXME: Handle by statistic.
|
// TODO: FIXME: Handle by statistic.
|
||||||
}
|
}
|
||||||
|
@ -721,16 +717,6 @@ srs_error_t SrsRtcFromRtmpBridger::on_audio(SrsSharedPtrMessage* msg)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SrsContextId& SrsRtcFromRtmpBridger::get_id()
|
|
||||||
{
|
|
||||||
return _srs_context->get_id();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string SrsRtcFromRtmpBridger::desc()
|
|
||||||
{
|
|
||||||
return "Rtmp2Rtc";
|
|
||||||
}
|
|
||||||
|
|
||||||
srs_error_t SrsRtcFromRtmpBridger::transcode(char* adts_audio, int nn_adts_audio)
|
srs_error_t SrsRtcFromRtmpBridger::transcode(char* adts_audio, int nn_adts_audio)
|
||||||
{
|
{
|
||||||
srs_error_t err = srs_success;
|
srs_error_t err = srs_success;
|
||||||
|
@ -1189,16 +1175,6 @@ void SrsRtcDummyBridger::on_unpublish()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const SrsContextId& SrsRtcDummyBridger::get_id()
|
|
||||||
{
|
|
||||||
return _srs_context->get_id();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string SrsRtcDummyBridger::desc()
|
|
||||||
{
|
|
||||||
return "Rtmp2RtcDummy";
|
|
||||||
}
|
|
||||||
|
|
||||||
SrsCodecPayload::SrsCodecPayload()
|
SrsCodecPayload::SrsCodecPayload()
|
||||||
{
|
{
|
||||||
pt_of_publisher_ = pt_ = 0;
|
pt_of_publisher_ = pt_ = 0;
|
||||||
|
|
|
@ -247,10 +247,6 @@ public:
|
||||||
virtual srs_error_t on_publish();
|
virtual srs_error_t on_publish();
|
||||||
virtual void on_unpublish();
|
virtual void on_unpublish();
|
||||||
virtual srs_error_t on_audio(SrsSharedPtrMessage* msg);
|
virtual srs_error_t on_audio(SrsSharedPtrMessage* msg);
|
||||||
// interface ISrsResource
|
|
||||||
public:
|
|
||||||
virtual const SrsContextId& get_id();
|
|
||||||
virtual std::string desc();
|
|
||||||
private:
|
private:
|
||||||
srs_error_t transcode(char* adts_audio, int nn_adts_audio);
|
srs_error_t transcode(char* adts_audio, int nn_adts_audio);
|
||||||
srs_error_t package_opus(char* data, int size, SrsRtpPacket2** ppkt);
|
srs_error_t package_opus(char* data, int size, SrsRtpPacket2** ppkt);
|
||||||
|
@ -276,10 +272,6 @@ public:
|
||||||
virtual srs_error_t on_audio(SrsSharedPtrMessage* audio);
|
virtual srs_error_t on_audio(SrsSharedPtrMessage* audio);
|
||||||
virtual srs_error_t on_video(SrsSharedPtrMessage* video);
|
virtual srs_error_t on_video(SrsSharedPtrMessage* video);
|
||||||
virtual void on_unpublish();
|
virtual void on_unpublish();
|
||||||
// interface ISrsResource
|
|
||||||
public:
|
|
||||||
virtual const SrsContextId& get_id();
|
|
||||||
virtual std::string desc();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: FIXME: Rename it.
|
// TODO: FIXME: Rename it.
|
||||||
|
|
|
@ -51,7 +51,6 @@ using namespace std;
|
||||||
#include <srs_app_dash.hpp>
|
#include <srs_app_dash.hpp>
|
||||||
#include <srs_protocol_format.hpp>
|
#include <srs_protocol_format.hpp>
|
||||||
#include <srs_app_rtc_source.hpp>
|
#include <srs_app_rtc_source.hpp>
|
||||||
#include <srs_app_rtc_server.hpp>
|
|
||||||
|
|
||||||
#define CONST_MAX_JITTER_MS 250
|
#define CONST_MAX_JITTER_MS 250
|
||||||
#define CONST_MAX_JITTER_MS_NEG -250
|
#define CONST_MAX_JITTER_MS_NEG -250
|
||||||
|
@ -1882,13 +1881,10 @@ SrsSource::SrsSource()
|
||||||
|
|
||||||
_srs_config->subscribe(this);
|
_srs_config->subscribe(this);
|
||||||
atc = false;
|
atc = false;
|
||||||
|
|
||||||
_srs_rtc_manager->subscribe(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SrsSource::~SrsSource()
|
SrsSource::~SrsSource()
|
||||||
{
|
{
|
||||||
_srs_rtc_manager->unsubscribe(this);
|
|
||||||
_srs_config->unsubscribe(this);
|
_srs_config->unsubscribe(this);
|
||||||
|
|
||||||
// never free the consumers,
|
// never free the consumers,
|
||||||
|
@ -1984,18 +1980,6 @@ void SrsSource::bridge_to(ISrsSourceBridger* v)
|
||||||
bridger = v;
|
bridger = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SrsSource::on_before_dispose(ISrsResource* c)
|
|
||||||
{
|
|
||||||
ISrsSourceBridger* pb = dynamic_cast<ISrsSourceBridger*>(c);
|
|
||||||
if (bridger == pb) {
|
|
||||||
bridge_to(NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SrsSource::on_disposing(ISrsResource* c)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
srs_error_t SrsSource::on_reload_vhost_play(string vhost)
|
srs_error_t SrsSource::on_reload_vhost_play(string vhost)
|
||||||
{
|
{
|
||||||
srs_error_t err = srs_success;
|
srs_error_t err = srs_success;
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
#include <srs_app_reload.hpp>
|
#include <srs_app_reload.hpp>
|
||||||
#include <srs_core_performance.hpp>
|
#include <srs_core_performance.hpp>
|
||||||
#include <srs_service_st.hpp>
|
#include <srs_service_st.hpp>
|
||||||
#include <srs_app_conn.hpp>
|
|
||||||
|
|
||||||
class SrsFormat;
|
class SrsFormat;
|
||||||
class SrsRtmpFormat;
|
class SrsRtmpFormat;
|
||||||
|
@ -485,7 +484,7 @@ public:
|
||||||
extern SrsSourceManager* _srs_sources;
|
extern SrsSourceManager* _srs_sources;
|
||||||
|
|
||||||
// For two sources to bridge with each other.
|
// For two sources to bridge with each other.
|
||||||
class ISrsSourceBridger : public ISrsResource
|
class ISrsSourceBridger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ISrsSourceBridger();
|
ISrsSourceBridger();
|
||||||
|
@ -498,7 +497,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
// live streaming source.
|
// live streaming source.
|
||||||
class SrsSource : virtual public ISrsReloadHandler, virtual public ISrsDisposingHandler
|
class SrsSource : public ISrsReloadHandler
|
||||||
{
|
{
|
||||||
friend class SrsOriginHub;
|
friend class SrsOriginHub;
|
||||||
private:
|
private:
|
||||||
|
@ -560,10 +559,6 @@ public:
|
||||||
virtual srs_error_t initialize(SrsRequest* r, ISrsSourceHandler* h);
|
virtual srs_error_t initialize(SrsRequest* r, ISrsSourceHandler* h);
|
||||||
// Bridge to other source, forward packets to it.
|
// Bridge to other source, forward packets to it.
|
||||||
void bridge_to(ISrsSourceBridger* v);
|
void bridge_to(ISrsSourceBridger* v);
|
||||||
// interface ISrsDisposingHandler
|
|
||||||
public:
|
|
||||||
virtual void on_before_dispose(ISrsResource* c);
|
|
||||||
virtual void on_disposing(ISrsResource* c);
|
|
||||||
// Interface ISrsReloadHandler
|
// Interface ISrsReloadHandler
|
||||||
public:
|
public:
|
||||||
virtual srs_error_t on_reload_vhost_play(std::string vhost);
|
virtual srs_error_t on_reload_vhost_play(std::string vhost);
|
||||||
|
|
|
@ -24,6 +24,6 @@
|
||||||
#ifndef SRS_CORE_VERSION4_HPP
|
#ifndef SRS_CORE_VERSION4_HPP
|
||||||
#define SRS_CORE_VERSION4_HPP
|
#define SRS_CORE_VERSION4_HPP
|
||||||
|
|
||||||
#define SRS_VERSION4_REVISION 60
|
#define SRS_VERSION4_REVISION 59
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue