refactor(synthetic): use RootProcessor as root node

This commit is contained in:
TinyOh 2019-03-02 10:08:45 +08:00
parent 95d733b2b4
commit 469ffe5075
2 changed files with 4 additions and 5 deletions

View File

@ -266,13 +266,11 @@ bool Synthetic::HasStreamCallback(const Stream &stream) const {
} }
void Synthetic::StartVideoStreaming() { void Synthetic::StartVideoStreaming() {
auto processor_root = static_cast<RootProcessor*>(&(*processor_)); processor_->StartVideoStreaming();
processor_root->StartVideoStreaming();
} }
void Synthetic::StopVideoStreaming() { void Synthetic::StopVideoStreaming() {
auto processor_root = static_cast<RootProcessor*>(&(*processor_)); processor_->StopVideoStreaming();
processor_root->StopVideoStreaming();
} }
void Synthetic::WaitForStreams() { void Synthetic::WaitForStreams() {

View File

@ -29,6 +29,7 @@ MYNTEYE_BEGIN_NAMESPACE
class API; class API;
class Plugin; class Plugin;
class Processor; class Processor;
class RootProcessor;
struct Object; struct Object;
@ -136,7 +137,7 @@ class Synthetic {
API *api_; API *api_;
std::shared_ptr<Processor> processor_; std::shared_ptr<RootProcessor> processor_;
std::shared_ptr<Plugin> plugin_; std::shared_ptr<Plugin> plugin_;