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

Improve file writer performance by fwrite with cache. v5.0.133 (#3308)

* SrsFileWriter leverages libc buffer to boost dvr write speed.

* Refactor SrsFileWriter to use libc file functions mockable

* Add utest and refine code.

Co-authored-by: winlin <winlin@vip.126.com>
This commit is contained in:
stone 2023-01-08 12:05:37 +08:00 committed by GitHub
parent fb1790230b
commit 25eb21efe8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 358 additions and 62 deletions

View file

@ -39,6 +39,15 @@ public:
virtual srs_error_t lseek(off_t offset, int whence, off_t* seeked);
};
class MockFileRemover
{
private:
std::string path_;
public:
MockFileRemover(std::string p);
virtual ~MockFileRemover();
};
class MockSrsFileWriter : public SrsFileWriter
{
public: