Merge into develop

This commit is contained in:
John Zhao 2019-03-06 15:58:24 +08:00
commit 1f51ab8fa2
2 changed files with 2 additions and 2 deletions

View File

@ -152,6 +152,8 @@ bool Processor::Process(std::shared_ptr<Object> in) {
std::shared_ptr<Object> Processor::GetOutput() {
std::lock_guard<std::mutex> lk(mtx_result_);
return std::shared_ptr<Object>(std::move(output_result_));
// to make sure that one frame can just be get once!
output_result_ = nullptr;
}
std::uint64_t Processor::GetDroppedCount() {
@ -209,7 +211,6 @@ void Processor::Run() {
}
bool ok = false;
try {
std::unique_lock<std::mutex> lk(mtx_data_process_unique_);
if (callback_) {
if (callback_(input_.get(), output_.get(), parent_)) {
ok = true;

View File

@ -103,7 +103,6 @@ class Processor :
bool input_ready_;
std::mutex mtx_input_ready_;
std::mutex mtx_data_process_unique_;
std::condition_variable cond_input_ready_;
bool idle_;