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

Refine SrsFragment.duration in time unit.

This commit is contained in:
winlin 2019-04-12 08:04:06 +08:00
parent 0879bef9b2
commit bc1189caee
8 changed files with 109 additions and 29 deletions

View file

@ -36,8 +36,8 @@
class SrsFragment
{
private:
// The duration in ms.
int64_t dur;
// The duration in srs_utime_t.
srs_utime_t dur;
// The full file path of fragment.
std::string filepath;
// The start DTS in ms of segment.
@ -51,9 +51,8 @@ public:
// Append a frame with dts into fragment.
// @dts The dts of frame in ms.
virtual void append(int64_t dts);
// Get the duration of fragment in ms.
// TODO: FIXME: Refine to time unit.
virtual int64_t duration();
// Get the duration of fragment in srs_utime_t.
virtual srs_utime_t duration();
// Whether the fragment contains any sequence header.
virtual bool is_sequence_header();
// Set whether contains sequence header.