mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #375, fix hls bug, keep cc continous between ts files. 2.0.159.
This commit is contained in:
parent
29ac4c724b
commit
546be09219
6 changed files with 72 additions and 27 deletions
|
@ -47,6 +47,7 @@ class SrsTsAdaptationField;
|
|||
class SrsTsPayload;
|
||||
class SrsTsMessage;
|
||||
class SrsTsPacket;
|
||||
class SrsTsContext;
|
||||
|
||||
// Transport Stream packets are 188 bytes in length.
|
||||
#define SRS_TS_PACKET_SIZE 188
|
||||
|
@ -258,7 +259,7 @@ public:
|
|||
// generally, the video IDR(I frame, the keyframe of h.264) carray the pcr info.
|
||||
bool write_pcr;
|
||||
// whether got discontinuity ts, for example, sequence header changed.
|
||||
bool discontinuity;
|
||||
bool is_discontinuity;
|
||||
public:
|
||||
// the timestamp in 90khz
|
||||
int64_t dts;
|
||||
|
@ -343,6 +344,11 @@ private:
|
|||
public:
|
||||
SrsTsContext();
|
||||
virtual ~SrsTsContext();
|
||||
public:
|
||||
/**
|
||||
* reset the context for a new ts segment start.
|
||||
*/
|
||||
virtual void reset();
|
||||
// codec
|
||||
public:
|
||||
/**
|
||||
|
@ -1533,7 +1539,7 @@ private:
|
|||
SrsFileWriter* writer;
|
||||
std::string path;
|
||||
public:
|
||||
SrsTSMuxer(SrsFileWriter* w, SrsCodecAudio ac, SrsCodecVideo vc);
|
||||
SrsTSMuxer(SrsFileWriter* w, SrsTsContext* c, SrsCodecAudio ac, SrsCodecVideo vc);
|
||||
virtual ~SrsTSMuxer();
|
||||
public:
|
||||
/**
|
||||
|
@ -1608,6 +1614,7 @@ private:
|
|||
SrsCodecSample* sample;
|
||||
SrsTsCache* cache;
|
||||
SrsTSMuxer* muxer;
|
||||
SrsTsContext* context;
|
||||
public:
|
||||
SrsTsEncoder();
|
||||
virtual ~SrsTsEncoder();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue