mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SmartPtr: Support shared ptr for RTC source. v6.0.128 (#4085)
--------- Co-authored-by: Haibo Chen <495810242@qq.com>
This commit is contained in:
parent
242152bd6b
commit
9dba99a1cc
17 changed files with 120 additions and 99 deletions
|
@ -70,10 +70,10 @@ extern SrsSrtSourceManager* _srs_srt_sources;
|
|||
class SrsSrtConsumer
|
||||
{
|
||||
public:
|
||||
SrsSrtConsumer(SrsSrtSource* source);
|
||||
SrsSrtConsumer(SrsSharedPtr<SrsSrtSource> source);
|
||||
virtual ~SrsSrtConsumer();
|
||||
private:
|
||||
SrsSrtSource* source;
|
||||
SrsSharedPtr<SrsSrtSource> source_;
|
||||
std::vector<SrsSrtPacket*> queue;
|
||||
// when source id changed, notice all consumers
|
||||
bool should_update_source_id;
|
||||
|
@ -167,7 +167,7 @@ public:
|
|||
public:
|
||||
// Create consumer
|
||||
// @param consumer, output the create consumer.
|
||||
virtual srs_error_t create_consumer(SrsSrtConsumer*& consumer);
|
||||
virtual srs_error_t create_consumer(SrsSharedPtr<SrsSrtSource> source, SrsSrtConsumer*& consumer);
|
||||
// Dumps packets in cache to consumer.
|
||||
virtual srs_error_t consumer_dumps(SrsSrtConsumer* consumer);
|
||||
virtual void on_consumer_destroy(SrsSrtConsumer* consumer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue