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

for #293, support http ts stream. 2.0.101

This commit is contained in:
winlin 2015-01-22 18:32:10 +08:00
parent dfe385d0c9
commit 2a05783d5c
7 changed files with 419 additions and 375 deletions

View file

@ -52,25 +52,6 @@ class SrsSimpleBuffer;
class SrsTsAacJitter;
class SrsTsCache;
/**
* write data from frame(header info) and buffer(data) to ts file.
* it's a simple object wrapper for utility from nginx-rtmp: SrsMpegtsWriter
*/
class SrsTSMuxer
{
private:
SrsFileWriter* writer;
std::string path;
public:
SrsTSMuxer();
virtual ~SrsTSMuxer();
public:
virtual int open(std::string _path);
virtual int write_audio(SrsMpegtsFrame* af, SrsSimpleBuffer* ab);
virtual int write_video(SrsMpegtsFrame* vf, SrsSimpleBuffer* vb);
virtual void close();
};
/**
* the wrapper of m3u8 segment from specification:
*
@ -89,6 +70,7 @@ public:
// ts full file to write.
std::string full_path;
// the muxer to write ts.
SrsFileWriter* writer;
SrsTSMuxer* muxer;
// current segment start dts for m3u8
int64_t segment_start_dts;