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

Squash: Merge SRS 4.0

This commit is contained in:
winlin 2021-10-10 12:05:26 +08:00
parent 6c597facfb
commit a81aa2edc5
65 changed files with 276 additions and 5990 deletions

View file

@ -13,7 +13,6 @@
#include <vector>
#include <string>
// For srs-librtmp, @see https://github.com/ossrs/srs/issues/213
#ifndef _WIN32
#include <sys/uio.h>
#endif
@ -161,7 +160,6 @@ private:
std::map<int, SrsChunkStream*> chunk_streams;
// Cache some frequently used chunk header.
// cs_cache, the chunk stream cache.
// @see https://github.com/ossrs/srs/issues/249
SrsChunkStream** cs_cache;
// The bytes buffer cache, recv from skt, provide services for stream.
SrsFastStream* in_buffer;
@ -179,7 +177,6 @@ private:
bool show_debug_info;
// Whether auto response when recv messages.
// default to true for it's very easy to use the protocol stack.
// @see: https://github.com/ossrs/srs/issues/217
bool auto_response_when_recv;
// When not auto response message, manual flush the messages in queue.
std::vector<SrsPacket*> manual_response_queue;
@ -208,7 +205,6 @@ public:
public:
// Set the auto response message when recv for protocol stack.
// @param v, whether auto response message when recv message.
// @see: https://github.com/ossrs/srs/issues/217
virtual void set_auto_response(bool v);
// Flush for manual response when the auto response is disabled
// by set_auto_response(false), we default use auto response, so donot
@ -222,13 +218,11 @@ public:
// that is, we merge some data to read together.
// @param v true to ename merged read.
// @param handler the handler when merge read is enabled.
// @see https://github.com/ossrs/srs/issues/241
virtual void set_merge_read(bool v, IMergeReadHandler* handler);
// Create buffer with specifeid size.
// @param buffer the size of buffer.
// @remark when MR(SRS_PERF_MERGED_READ) disabled, always set to 8K.
// @remark when buffer changed, the previous ptr maybe invalid.
// @see https://github.com/ossrs/srs/issues/241
virtual void set_recv_buffer(int buffer_size);
#endif
public:
@ -429,7 +423,6 @@ public:
std::string stream;
// For play live stream,
// used to specified the stop when exceed the duration.
// @see https://github.com/ossrs/srs/issues/45
// in srs_utime_t.
srs_utime_t duration;
// The token in the connect request,
@ -620,7 +613,6 @@ public:
public:
// Set the auto response message when recv for protocol stack.
// @param v, whether auto response message when recv message.
// @see: https://github.com/ossrs/srs/issues/217
virtual void set_auto_response(bool v);
#ifdef SRS_PERF_MERGED_READ
// To improve read performance, merge some packets then read,
@ -628,13 +620,11 @@ public:
// that is, we merge some data to read together.
// @param v true to ename merged read.
// @param handler the handler when merge read is enabled.
// @see https://github.com/ossrs/srs/issues/241
virtual void set_merge_read(bool v, IMergeReadHandler* handler);
// Create buffer with specifeid size.
// @param buffer the size of buffer.
// @remark when MR(SRS_PERF_MERGED_READ) disabled, always set to 8K.
// @remark when buffer changed, the previous ptr maybe invalid.
// @see https://github.com/ossrs/srs/issues/241
virtual void set_recv_buffer(int buffer_size);
#endif
// To set/get the recv timeout in srs_utime_t.
@ -675,7 +665,6 @@ public:
// @param stream_id, the stream id of packet to send over, 0 for control message.
//
// @remark performance issue, to support 6k+ 250kbps client,
// @see https://github.com/ossrs/srs/issues/194
virtual srs_error_t send_and_free_messages(SrsSharedPtrMessage** msgs, int nb_msgs, int stream_id);
// Send the RTMP packet and always free it.
// user must never free or use the packet after this method,
@ -1336,11 +1325,9 @@ public:
// Name of command. Set to "|RtmpSampleAccess".
std::string command_name;
// Whether allow access the sample of video.
// @see: https://github.com/ossrs/srs/issues/49
// @see: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#videoSampleAccess
bool video_sample_access;
// Whether allow access the sample of audio.
// @see: https://github.com/ossrs/srs/issues/49
// @see: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#audioSampleAccess
bool audio_sample_access;
public: