mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
update dvr, extract flv segment
This commit is contained in:
parent
7ff8df4d97
commit
0c0010d529
2 changed files with 58 additions and 31 deletions
|
@ -107,6 +107,30 @@ private:
|
|||
virtual int write_tag(char* header, int header_size, char* tag, int tag_size);
|
||||
};
|
||||
|
||||
/**
|
||||
* a piece of flv segment.
|
||||
*/
|
||||
class SrsFlvSegment
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* current flv file path.
|
||||
*/
|
||||
std::string current_flv_path;
|
||||
/**
|
||||
* whether current segment has keyframe.
|
||||
*/
|
||||
bool segment_has_keyframe;
|
||||
/**
|
||||
* current segment duration and starttime.
|
||||
*/
|
||||
int64_t duration;
|
||||
int64_t starttime;
|
||||
public:
|
||||
SrsFlvSegment();
|
||||
virtual void reset();
|
||||
};
|
||||
|
||||
/**
|
||||
* the plan for dvr.
|
||||
* use to control the following dvr params:
|
||||
|
@ -127,20 +151,7 @@ protected:
|
|||
SrsSource* _source;
|
||||
SrsRequest* _req;
|
||||
SrsRtmpJitter* jitter;
|
||||
protected:
|
||||
/**
|
||||
* current flv file path.
|
||||
*/
|
||||
std::string current_flv_path;
|
||||
/**
|
||||
* whether current segment has keyframe.
|
||||
*/
|
||||
bool segment_has_keyframe;
|
||||
/**
|
||||
* current segment duration and starttime.
|
||||
*/
|
||||
int64_t duration;
|
||||
int64_t starttime;
|
||||
SrsFlvSegment* segment;
|
||||
public:
|
||||
SrsDvrPlan();
|
||||
virtual ~SrsDvrPlan();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue