mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #405, improve the HTTP FLV performance to 6k. 2.0.171
This commit is contained in:
parent
4df19ba99a
commit
d12fc7fcc5
13 changed files with 1193 additions and 922 deletions
|
@ -29,12 +29,18 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
*/
|
||||
#include <srs_core.hpp>
|
||||
|
||||
// for srs-librtmp, @see https://github.com/simple-rtmp-server/srs/issues/213
|
||||
#ifndef _WIN32
|
||||
#include <sys/uio.h>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <srs_kernel_consts.hpp>
|
||||
|
||||
class SrsMessageHeader;
|
||||
class SrsSharedPtrMessage;
|
||||
class ISrsProtocolReaderWriter;
|
||||
|
||||
/**
|
||||
* parse the tcUrl, output the schema, host, vhost, app and port.
|
||||
|
@ -90,29 +96,6 @@ extern std::string srs_generate_tc_url(
|
|||
*/
|
||||
extern bool srs_bytes_equals(void* pa, void* pb, int size);
|
||||
|
||||
/**
|
||||
* generate the c0 chunk header for msg.
|
||||
* @param cache, the cache to write header.
|
||||
* @param nb_cache, the size of cache.
|
||||
* @return the size of header. 0 if cache not enough.
|
||||
*/
|
||||
extern int srs_chunk_header_c0(
|
||||
int perfer_cid, u_int32_t timestamp, int32_t payload_length,
|
||||
int8_t message_type, int32_t stream_id,
|
||||
char* cache, int nb_cache
|
||||
);
|
||||
|
||||
/**
|
||||
* generate the c3 chunk header for msg.
|
||||
* @param cache, the cache to write header.
|
||||
* @param nb_cache, the size of cache.
|
||||
* @return the size of header. 0 if cache not enough.
|
||||
*/
|
||||
extern int srs_chunk_header_c3(
|
||||
int perfer_cid, u_int32_t timestamp,
|
||||
char* cache, int nb_cache
|
||||
);
|
||||
|
||||
/**
|
||||
* create shared ptr message from bytes.
|
||||
* @param data the packet bytes. user should never free it.
|
||||
|
@ -123,5 +106,8 @@ extern int srs_rtmp_create_msg(char type, u_int32_t timestamp, char* data, int s
|
|||
// get the stream identify, vhost/app/stream.
|
||||
extern std::string srs_generate_stream_url(std::string vhost, std::string app, std::string stream);
|
||||
|
||||
// write large numbers of iovs.
|
||||
extern int srs_write_large_iovs(ISrsProtocolReaderWriter* skt, iovec* iovs, int size, ssize_t* pnwrite = NULL);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue