mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #299, refine the codec to format-frame-sample chain.
This commit is contained in:
parent
c4a510b834
commit
d7458c4e72
18 changed files with 990 additions and 1150 deletions
|
@ -262,58 +262,6 @@ public:
|
|||
bool is_aac();
|
||||
};
|
||||
|
||||
/**
|
||||
* the m3u8 stream handler.
|
||||
*/
|
||||
class SrsHlsM3u8Stream : public ISrsHttpHandler
|
||||
{
|
||||
private:
|
||||
std::string m3u8;
|
||||
public:
|
||||
SrsHlsM3u8Stream();
|
||||
virtual ~SrsHlsM3u8Stream();
|
||||
public:
|
||||
virtual void set_m3u8(std::string v);
|
||||
public:
|
||||
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
|
||||
};
|
||||
|
||||
/**
|
||||
* the ts stream handler.
|
||||
*/
|
||||
class SrsHlsTsStream : public ISrsHttpHandler
|
||||
{
|
||||
private:
|
||||
std::string ts;
|
||||
public:
|
||||
SrsHlsTsStream();
|
||||
virtual ~SrsHlsTsStream();
|
||||
public:
|
||||
virtual void set_ts(std::string v);
|
||||
public:
|
||||
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
|
||||
};
|
||||
|
||||
/**
|
||||
* the srs hls entry.
|
||||
*/
|
||||
// TODO: FIXME: use hte hls template and entry.
|
||||
struct SrsHlsEntry
|
||||
{
|
||||
// for template, the mount contains variables.
|
||||
// for concrete stream, the mount is url to access.
|
||||
std::string mount;
|
||||
|
||||
// the template to create the entry
|
||||
SrsHlsEntry* tmpl;
|
||||
|
||||
// key: the m3u8/ts file path.
|
||||
// value: the http handler.
|
||||
std::map<std::string, ISrsHttpHandler*> streams;
|
||||
|
||||
SrsHlsEntry();
|
||||
};
|
||||
|
||||
/**
|
||||
* the http stream server instance,
|
||||
* serve http stream, for example, flv/ts/mp3/aac live stream.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue