MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
output_dash_mp4.h
Go to the documentation of this file.
1 #include "output_http.h"
2 #include <mist/mp4_generic.h>
3 #include <mist/http_parser.h>
4 
5 namespace Mist {
6  class OutDashMP4 : public HTTPOutput {
7  public:
9  ~OutDashMP4();
10  static void init(Util::Config * cfg);
11  void onHTTP();
12  void sendNext();
13  void sendHeader();
14  void initialize();
15  protected:
16  std::string makeTime(long long unsigned int time);
17  std::string buildManifest();
18  void buildFtyp(unsigned int trackid);
19  void buildStyp(unsigned int trackid);
20  std::string buildMoov(unsigned int trackid);
21  std::string buildSidx(unsigned int trackid);
22  std::string buildSidx(unsigned int trackid, unsigned int keynum);
23  std::string buildMoof(unsigned int trackid, unsigned int keynum);
24  void buildMdat(unsigned int trackid, unsigned int keynum);
25  std::map<unsigned int, std::map<unsigned int, long long unsigned int> > fragmentSizes;
26  std::string buildNalUnit(unsigned int len, const char * data);
27  void parseRange(std::string header, long long & byteStart, long long & byteEnd);
28  int getKeyFromRange(unsigned int tid, long long int byteStart);
29  std::map<int,std::string> moovBoxes;
30 
31  std::string h264init(const std::string & initData);
32  std::string h265init(const std::string & initData);
33  };
34 }
35 
std::string buildMoof(unsigned int trackid, unsigned int keynum)
Definition: output_dash_mp4.cpp:174
std::string buildNalUnit(unsigned int len, const char *data)
Definition: output_dash_mp4.cpp:270
std::string h264init(const std::string &initData)
Definition: output_dash_mp4.cpp:348
std::string h265init(const std::string &initData)
Definition: output_dash_mp4.cpp:358
void buildMdat(unsigned int trackid, unsigned int keynum)
Definition: output_dash_mp4.cpp:280
void onHTTP()
Definition: output_dash_mp4.cpp:538
Mist::OutDashMP4 mistOut
Definition: output_dash_mp4.h:36
Recording to file.
Definition: input.cpp:13
void buildStyp(unsigned int trackid)
void sendNext()
Definition: output_dash_mp4.cpp:618
std::map< unsigned int, std::map< unsigned int, long long unsigned int > > fragmentSizes
Definition: output_dash_mp4.h:25
std::string buildMoov(unsigned int trackid)
Definition: output_dash_mp4.cpp:31
int getKeyFromRange(unsigned int tid, long long int byteStart)
Definition: output_dash_mp4.cpp:515
Deals with parsing configuration from commandline options.
Definition: config.h:18
~OutDashMP4()
Definition: output_dash_mp4.cpp:11
static void init(Util::Config *cfg)
Definition: output_dash_mp4.cpp:486
OutDashMP4(Socket::Connection &conn)
Definition: output_dash_mp4.cpp:10
std::string buildManifest()
Definition: output_dash_mp4.cpp:371
Definition: output_http.h:8
void parseRange(std::string header, long long &byteStart, long long &byteEnd)
Parses a "Range: " header, setting byteStart, byteEnd and seekPoint using data from metadata and trac...
Definition: output_dash_mp4.cpp:507
std::string makeTime(long long unsigned int time)
Definition: output_dash_mp4.cpp:13
std::string buildSidx(unsigned int trackid)
void buildFtyp(unsigned int trackid)
Definition: output_dash_mp4.cpp:19
void initialize()
Definition: output_dash_mp4.cpp:529
This class is for easy communicating through sockets, either TCP or Unix.
Definition: socket.h:47
Definition: output_dash_mp4.h:6
void sendHeader()
Definition: output_dash_mp4.cpp:619
std::map< int, std::string > moovBoxes
Definition: output_dash_mp4.h:29