From f8bdd28de6066bb35acf24071d0606b3b3ffdc25 Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 10 Feb 2015 15:18:20 +0800 Subject: [PATCH] add comments for hls m3u8, target duration may should not changed. --- trunk/src/app/srs_app_hls.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index eb7c333a2..b751e26ef 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -532,6 +532,15 @@ int SrsHlsMuxer::_refresh_m3u8(string m3u8_file) // #EXT-X-TARGETDURATION:4294967295\n int target_duration = 0; + /** + * @see hls-m3u8-draft-pantos-http-live-streaming-12.pdf, page 25 + * The Media Playlist file MUST contain an EXT-X-TARGETDURATION tag. + * Its value MUST be equal to or greater than the EXTINF duration of any + * media segment that appears or will appear in the Playlist file, + * rounded to the nearest integer. Its value MUST NOT change. A + * typical target duration is 10 seconds. + */ + // TODO: FIXME: finger it out whether it should not changed. std::vector::iterator it; for (it = segments.begin(); it != segments.end(); ++it) { SrsHlsSegment* segment = *it;