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

for #304, use stringstream to generate m3u8, add hls_td_ratio. 2.0.116.

This commit is contained in:
winlin 2015-02-12 13:34:59 +08:00
parent 103ce78b35
commit 25af6c6847
7 changed files with 60 additions and 52 deletions

View file

@ -47,6 +47,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define SRS_CONF_DEFAULT_MAX_CONNECTIONS 1000
#define SRS_CONF_DEFAULT_HLS_PATH "./objs/nginx/html"
#define SRS_CONF_DEFAULT_HLS_FRAGMENT 10
#define SRS_CONF_DEFAULT_HLS_TD_RATIO 1.5
#define SRS_CONF_DEFAULT_HLS_WINDOW 60
#define SRS_CONF_DEFAULT_HLS_ON_ERROR_IGNORE "ignore"
#define SRS_CONF_DEFAULT_HLS_ON_ERROR_DISCONNECT "disconnect"
@ -896,6 +897,11 @@ public:
*/
virtual double get_hls_fragment(std::string vhost);
/**
* get the hls td(target duration) ratio.
* a fragment is a ts file.
*/
virtual double get_hls_td_ratio(std::string vhost);
/**
* get the hls window time, in seconds.
* a window is a set of ts, the ts collection in m3u8.
* @remark SRS will delete the ts exceed the window.