mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #179, add dvr plan append.
This commit is contained in:
parent
95b4baee7c
commit
7077b74d03
4 changed files with 57 additions and 4 deletions
|
@ -113,8 +113,9 @@ public:
|
|||
/**
|
||||
* open new segment file, timestamp start at 0 for fresh flv file.
|
||||
* @remark ignore when already open.
|
||||
* @param use_tmp_file whether use tmp file if possible.
|
||||
*/
|
||||
virtual int open();
|
||||
virtual int open(bool use_tmp_file = true);
|
||||
/**
|
||||
* close current segment.
|
||||
* @remark ignore when already closed.
|
||||
|
@ -207,6 +208,19 @@ public:
|
|||
virtual void on_unpublish();
|
||||
};
|
||||
|
||||
/**
|
||||
* always append to flv file, never reap it.
|
||||
*/
|
||||
class SrsDvrAppendPlan : public SrsDvrPlan
|
||||
{
|
||||
public:
|
||||
SrsDvrAppendPlan();
|
||||
virtual ~SrsDvrAppendPlan();
|
||||
public:
|
||||
virtual int on_publish();
|
||||
virtual void on_unpublish();
|
||||
};
|
||||
|
||||
/**
|
||||
* segment plan: reap flv when duration exceed.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue