feat: add minimal HarmonyOS native napi skeleton
This commit is contained in:
1 parent
e328780ee5
commit
8b6e24fa61
11 files changed
+565
No files matched your search
@@ -0,0 +1,37 @@
|
||||
#ifndef MRP_RUNTIME_MRP_RUNTIME_H
|
||||
#define MRP_RUNTIME_MRP_RUNTIME_H
|
||||
|
||||
#include "../platform/MrpFacade.h"
|
||||
|
||||
class MrpRuntime {
|
||||
public:
|
||||
CommonResult Init(int32_t width, int32_t height, bool debug);
|
||||
CommonResult LoadPackage(const std::string &packagePath);
|
||||
CommonResult Start();
|
||||
CommonResult Pause();
|
||||
CommonResult Resume();
|
||||
CommonResult Release();
|
||||
|
||||
int32_t Width() const;
|
||||
int32_t Height() const;
|
||||
int64_t NextFrameId();
|
||||
int64_t CurrentFrameId() const;
|
||||
|
||||
private:
|
||||
enum class State {
|
||||
Idle,
|
||||
Initialized,
|
||||
Loaded,
|
||||
Running,
|
||||
Paused,
|
||||
Released,
|
||||
};
|
||||
|
||||
State state_ = State::Idle;
|
||||
int32_t width_ = 240;
|
||||
int32_t height_ = 320;
|
||||
bool debug_ = false;
|
||||
int64_t frameId_ = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user