mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Support include directive for config file (#2878)
* Support include import configuration * Remove support for regular rules * Remove support for regular rules * Fix configuration file parsing bug * Added utest tests for include functionality * Added utest tests for include functionality * Modify the UTest function * optimized code * Config: Refine parse error with state * Config: Reorder functions * Config: Rename parsing type to context * Config: Refine args for include * Config: Add utests for include * Config: Refine code, parsing recursively. * Config: Change the mock from file to buffer * Config: Mock buffer in config * Config: Refine code * Add utests for include * Added utest for include Co-authored-by: pengfei.ma <pengfei.ma@ngaa.com.cn> Co-authored-by: winlin <winlin@vip.126.com>
This commit is contained in:
parent
5e78c1fe88
commit
fde44885d9
5 changed files with 389 additions and 74 deletions
|
@ -32,8 +32,13 @@ class MockSrsConfig : public SrsConfig
|
|||
public:
|
||||
MockSrsConfig();
|
||||
virtual ~MockSrsConfig();
|
||||
private:
|
||||
std::map<std::string, std::string> included_files;
|
||||
public:
|
||||
virtual srs_error_t parse(std::string buf);
|
||||
virtual srs_error_t mock_include(const std::string file_name, const std::string content);
|
||||
protected:
|
||||
virtual srs_error_t build_buffer(std::string src, srs_internal::SrsConfigBuffer** pbuffer);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue