1
0
Fork 0
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:
winlin 2015-02-21 16:52:37 +08:00
parent 95b4baee7c
commit 7077b74d03
4 changed files with 57 additions and 4 deletions

View file

@ -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.
*/