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

refine code for #277, extract the flv vod stream.

This commit is contained in:
winlin 2015-01-18 09:12:53 +08:00
parent e71bc0cbc5
commit c695a8fcbd
4 changed files with 147 additions and 103 deletions

View file

@ -41,7 +41,21 @@ class SrsHttpParser;
class SrsHttpMessage;
class SrsHttpHandler;
// for http server.
/**
* the flv vod stream supports flv?start=offset-bytes.
* for example, http://server/file.flv?start=10240
* server will write flv header and sequence header,
* then seek(10240) and response flv tag data.
*/
class SrsVodStream : public SrsGoHttpFileServer
{
public:
SrsVodStream(std::string root_dir);
virtual ~SrsVodStream();
protected:
virtual int serve_flv_stream(ISrsGoHttpResponseWriter* w, SrsHttpMessage* r, std::string fullpath, int offset);
};
class SrsHttpServer
{
public: