mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SuqashSRS4: Build SRT native
This commit is contained in:
parent
a1d7fe46c1
commit
e3bca883e1
150 changed files with 45007 additions and 398 deletions
|
@ -40,16 +40,16 @@ private:
|
|||
srs_utime_t fast_cache;
|
||||
private:
|
||||
SrsMessageQueue* queue;
|
||||
SrsSource* source;
|
||||
SrsLiveSource* source;
|
||||
SrsRequest* req;
|
||||
SrsCoroutine* trd;
|
||||
public:
|
||||
SrsBufferCache(SrsSource* s, SrsRequest* r);
|
||||
SrsBufferCache(SrsLiveSource* s, SrsRequest* r);
|
||||
virtual ~SrsBufferCache();
|
||||
virtual srs_error_t update_auth(SrsSource* s, SrsRequest* r);
|
||||
virtual srs_error_t update_auth(SrsLiveSource* s, SrsRequest* r);
|
||||
public:
|
||||
virtual srs_error_t start();
|
||||
virtual srs_error_t dump_cache(SrsConsumer* consumer, SrsRtmpJitterAlgorithm jitter);
|
||||
virtual srs_error_t dump_cache(SrsLiveConsumer* consumer, SrsRtmpJitterAlgorithm jitter);
|
||||
// Interface ISrsEndlessThreadHandler.
|
||||
public:
|
||||
virtual srs_error_t cycle();
|
||||
|
@ -72,11 +72,11 @@ public:
|
|||
virtual srs_error_t write_metadata(int64_t timestamp, char* data, int size) = 0;
|
||||
public:
|
||||
// For some stream, for example, mp3 and aac, the audio stream,
|
||||
// we use large gop cache in encoder, for the gop cache of SrsSource is ignore audio.
|
||||
// @return true to use gop cache of encoder; otherwise, use SrsSource.
|
||||
// we use large gop cache in encoder, for the gop cache of SrsLiveSource is ignore audio.
|
||||
// @return true to use gop cache of encoder; otherwise, use SrsLiveSource.
|
||||
virtual bool has_cache() = 0;
|
||||
// Dumps the cache of encoder to consumer.
|
||||
virtual srs_error_t dump_cache(SrsConsumer* consumer, SrsRtmpJitterAlgorithm jitter) = 0;
|
||||
virtual srs_error_t dump_cache(SrsLiveConsumer* consumer, SrsRtmpJitterAlgorithm jitter) = 0;
|
||||
};
|
||||
|
||||
// Transmux RTMP to HTTP Live Streaming.
|
||||
|
@ -95,7 +95,7 @@ public:
|
|||
virtual srs_error_t write_metadata(int64_t timestamp, char* data, int size);
|
||||
public:
|
||||
virtual bool has_cache();
|
||||
virtual srs_error_t dump_cache(SrsConsumer* consumer, SrsRtmpJitterAlgorithm jitter);
|
||||
virtual srs_error_t dump_cache(SrsLiveConsumer* consumer, SrsRtmpJitterAlgorithm jitter);
|
||||
public:
|
||||
// Write the tags in a time.
|
||||
virtual srs_error_t write_tags(SrsSharedPtrMessage** msgs, int count);
|
||||
|
@ -118,7 +118,7 @@ public:
|
|||
virtual srs_error_t write_metadata(int64_t timestamp, char* data, int size);
|
||||
public:
|
||||
virtual bool has_cache();
|
||||
virtual srs_error_t dump_cache(SrsConsumer* consumer, SrsRtmpJitterAlgorithm jitter);
|
||||
virtual srs_error_t dump_cache(SrsLiveConsumer* consumer, SrsRtmpJitterAlgorithm jitter);
|
||||
};
|
||||
|
||||
// Transmux RTMP with AAC stream to HTTP AAC Streaming.
|
||||
|
@ -137,7 +137,7 @@ public:
|
|||
virtual srs_error_t write_metadata(int64_t timestamp, char* data, int size);
|
||||
public:
|
||||
virtual bool has_cache();
|
||||
virtual srs_error_t dump_cache(SrsConsumer* consumer, SrsRtmpJitterAlgorithm jitter);
|
||||
virtual srs_error_t dump_cache(SrsLiveConsumer* consumer, SrsRtmpJitterAlgorithm jitter);
|
||||
};
|
||||
|
||||
// Transmux RTMP with MP3 stream to HTTP MP3 Streaming.
|
||||
|
@ -156,7 +156,7 @@ public:
|
|||
virtual srs_error_t write_metadata(int64_t timestamp, char* data, int size);
|
||||
public:
|
||||
virtual bool has_cache();
|
||||
virtual srs_error_t dump_cache(SrsConsumer* consumer, SrsRtmpJitterAlgorithm jitter);
|
||||
virtual srs_error_t dump_cache(SrsLiveConsumer* consumer, SrsRtmpJitterAlgorithm jitter);
|
||||
};
|
||||
|
||||
// Write stream to http response direclty.
|
||||
|
@ -184,12 +184,12 @@ class SrsLiveStream : public ISrsHttpHandler
|
|||
{
|
||||
private:
|
||||
SrsRequest* req;
|
||||
SrsSource* source;
|
||||
SrsLiveSource* source;
|
||||
SrsBufferCache* cache;
|
||||
public:
|
||||
SrsLiveStream(SrsSource* s, SrsRequest* r, SrsBufferCache* c);
|
||||
SrsLiveStream(SrsLiveSource* s, SrsRequest* r, SrsBufferCache* c);
|
||||
virtual ~SrsLiveStream();
|
||||
virtual srs_error_t update_auth(SrsSource* s, SrsRequest* r);
|
||||
virtual srs_error_t update_auth(SrsLiveSource* s, SrsRequest* r);
|
||||
public:
|
||||
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
|
||||
private:
|
||||
|
@ -211,7 +211,7 @@ public:
|
|||
// We will free the request.
|
||||
SrsRequest* req;
|
||||
// Shared source.
|
||||
SrsSource* source;
|
||||
SrsLiveSource* source;
|
||||
public:
|
||||
// For template, the mount contains variables.
|
||||
// For concrete stream, the mount is url to access.
|
||||
|
@ -249,8 +249,8 @@ public:
|
|||
virtual srs_error_t initialize();
|
||||
public:
|
||||
// HTTP flv/ts/mp3/aac stream
|
||||
virtual srs_error_t http_mount(SrsSource* s, SrsRequest* r);
|
||||
virtual void http_unmount(SrsSource* s, SrsRequest* r);
|
||||
virtual srs_error_t http_mount(SrsLiveSource* s, SrsRequest* r);
|
||||
virtual void http_unmount(SrsLiveSource* s, SrsRequest* r);
|
||||
// Interface ISrsReloadHandler.
|
||||
public:
|
||||
virtual srs_error_t on_reload_vhost_added(std::string vhost);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue