add comments for hls m3u8, target duration may should not changed.
正在显示
1 个修改的文件
包含
9 行增加
和
0 行删除
| @@ -532,6 +532,15 @@ int SrsHlsMuxer::_refresh_m3u8(string m3u8_file) | @@ -532,6 +532,15 @@ int SrsHlsMuxer::_refresh_m3u8(string m3u8_file) | ||
| 532 | 532 | ||
| 533 | // #EXT-X-TARGETDURATION:4294967295\n | 533 | // #EXT-X-TARGETDURATION:4294967295\n |
| 534 | int target_duration = 0; | 534 | int target_duration = 0; |
| 535 | + /** | ||
| 536 | + * @see hls-m3u8-draft-pantos-http-live-streaming-12.pdf, page 25 | ||
| 537 | + * The Media Playlist file MUST contain an EXT-X-TARGETDURATION tag. | ||
| 538 | + * Its value MUST be equal to or greater than the EXTINF duration of any | ||
| 539 | + * media segment that appears or will appear in the Playlist file, | ||
| 540 | + * rounded to the nearest integer. Its value MUST NOT change. A | ||
| 541 | + * typical target duration is 10 seconds. | ||
| 542 | + */ | ||
| 543 | + // TODO: FIXME: finger it out whether it should not changed. | ||
| 535 | std::vector<SrsHlsSegment*>::iterator it; | 544 | std::vector<SrsHlsSegment*>::iterator it; |
| 536 | for (it = segments.begin(); it != segments.end(); ++it) { | 545 | for (it = segments.begin(); it != segments.end(); ++it) { |
| 537 | SrsHlsSegment* segment = *it; | 546 | SrsHlsSegment* segment = *it; |
-
请 注册 或 登录 后发表评论