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:
parent
fb1790230b
commit
25eb21efe8
9 changed files with 358 additions and 62 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue