1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Support RTMP ATC for HLS/HDS to support backup(failover). change to 0.9.35

This commit is contained in:
winlin 2014-03-26 16:25:02 +08:00
parent ebf1139582
commit 0858bd8b6f
8 changed files with 120 additions and 13 deletions

View file

@ -191,6 +191,12 @@ public:
virtual int cache(SrsSharedPtrMessage* msg);
virtual void clear();
virtual int dump(SrsConsumer* consumer, int tba, int tbv);
/**
* used for atc to get the time of gop cache,
* the atc will adjust the sequence header timestamp to gop cache.
*/
virtual bool empty();
virtual int64_t get_start_time();
};
/**
@ -238,6 +244,13 @@ private:
* can publish, true when is not streaming
*/
bool _can_publish;
/**
* atc whether atc(use absolute time and donot adjust time),
* directly use msg time and donot adjust if atc is true,
* otherwise, adjust msg time to start from 0 to make flash happy.
*/
// TODO: FIXME: to support reload atc.
bool atc;
private:
SrsSharedPtrMessage* cache_metadata;
// the cached video sequence header.
@ -279,6 +292,10 @@ public:
virtual int create_consumer(SrsConsumer*& consumer);
virtual void on_consumer_destroy(SrsConsumer* consumer);
virtual void set_cache(bool enabled);
// internal
public:
// for consumer, atc feature.
virtual bool is_atc();
private:
virtual int create_forwarders();
virtual void destroy_forwarders();