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:
parent
e71bc0cbc5
commit
c695a8fcbd
4 changed files with 147 additions and 103 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue