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

DASH: Fix number mode bug to make it run. v5.0.96 (#3240)

* Add utc time utility
* Fix calculate duration in fmp4
* Refine dash code, use segment template timeline
* Shrink m4s file and cleanup
* Support play by dash.js
* Use SegmentTemplate timeline mode with $Number$

Co-authored-by: winlin <winlin@vip.126.com>
This commit is contained in:
john 2022-11-24 18:09:50 +08:00 committed by GitHub
parent af192d6184
commit 271afbbf82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 506 additions and 105 deletions

View file

@ -25,6 +25,8 @@ private:
srs_utime_t start_dts;
// Whether current segement contains sequence header.
bool sequence_header;
// The number of this segment, use in dash mpd.
uint64_t number_;
public:
SrsFragment();
virtual ~SrsFragment();
@ -32,6 +34,8 @@ public:
// Append a frame with dts into fragment.
// @dts The dts of frame in ms.
virtual void append(int64_t dts);
// Get the start dts of fragment.
virtual srs_utime_t get_start_dts();
// Get the duration of fragment in srs_utime_t.
virtual srs_utime_t duration();
// Whether the fragment contains any sequence header.
@ -54,6 +58,10 @@ public:
virtual srs_error_t unlink_tmpfile();
// Rename the temp file to final file.
virtual srs_error_t rename();
public:
// Get or set the number of this fragment.
virtual void set_number(uint64_t n);
virtual uint64_t number();
};
// The fragment window manage a series of fragment.