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

For #299, Refine init mp4, use fragment

This commit is contained in:
winlin 2017-03-19 12:29:38 +08:00
parent 8d679a6f9a
commit 721a8457c2
4 changed files with 280 additions and 245 deletions

View file

@ -38,6 +38,22 @@ class SrsRequest;
class SrsOriginHub;
class SrsSharedPtrMessage;
class SrsFormat;
class SrsFileWriter;
/**
* The init mp4 for FMP4.
*/
class SrsInitMp4 : public SrsFragment
{
private:
SrsFileWriter* fw;
public:
SrsInitMp4();
virtual ~SrsInitMp4();
public:
// Write the init mp4 file, with the tid(track id).
virtual int write(SrsFormat* format, bool video, int tid);
};
/**
* The FMP4(Fragmented MP4) for DASH streaming.
@ -85,7 +101,7 @@ class SrsDashController
private:
SrsRequest* req;
SrsMpdWriter* mpd;
std::vector<SrsFragmentedMp4*> fragments;
SrsFragmentWindow* fragments;
private:
std::string home;
int video_tack_id;