mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
enhanced hls, support deviation for duration. 2.0.151.
This commit is contained in:
parent
cd682ae4be
commit
f6e135943f
7 changed files with 127 additions and 18 deletions
|
@ -172,8 +172,14 @@ private:
|
|||
std::string hls_ts_file;
|
||||
std::string m3u8_dir;
|
||||
double hls_aof_ratio;
|
||||
int hls_fragment;
|
||||
int hls_window;
|
||||
double hls_fragment;
|
||||
double hls_window;
|
||||
private:
|
||||
// whether use floor algorithm for timestamp.
|
||||
bool hls_ts_floor;
|
||||
// the deviation in seconds to adjust the fragment to be more
|
||||
// bigger or smaller.
|
||||
double hls_fragment_deviation;
|
||||
private:
|
||||
int _sequence_no;
|
||||
int target_duration;
|
||||
|
@ -203,6 +209,9 @@ public:
|
|||
virtual ~SrsHlsMuxer();
|
||||
public:
|
||||
virtual int sequence_no();
|
||||
virtual std::string ts_url();
|
||||
virtual double duration();
|
||||
virtual double deviation();
|
||||
public:
|
||||
/**
|
||||
* initialize the hls muxer.
|
||||
|
@ -213,7 +222,7 @@ public:
|
|||
*/
|
||||
virtual int update_config(SrsRequest* r, std::string entry_prefix,
|
||||
std::string path, std::string m3u8_file, std::string ts_file,
|
||||
int fragment, int window, double aof_ratio);
|
||||
double fragment, double window, bool ts_floor, double aof_ratio);
|
||||
/**
|
||||
* open a new segment(a new ts file),
|
||||
* @param segment_start_dts use to calc the segment duration,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue