#include "mediapipe/framework/scheduler.h"
#include <memory>
#include <queue>
#include <utility>
#include <vector>
#include "absl/log/absl_check.h"
#include "absl/memory/memory.h"
#include "absl/synchronization/mutex.h"
#include "mediapipe/framework/calculator_graph.h"
#include "mediapipe/framework/executor.h"
#include "mediapipe/framework/port.h"
#include "mediapipe/framework/port/canonical_errors.h"
#include "mediapipe/framework/port/logging.h"
#include "mediapipe/framework/port/ret_check.h"
#include "mediapipe/framework/port/status.h"
#include "mediapipe/framework/timestamp.h"
#include "mediapipe/framework/tool/status_util.h"
namespace mediapipe {
namespace internal {
Scheduler::Scheduler(CalculatorGraph* graph)
: … { … }
Scheduler::~Scheduler() { … }
void Scheduler::Reset() { … }
void Scheduler::CloseAllSourceNodes() { … }
void Scheduler::SetExecutor(Executor* executor) { … }
absl::Status Scheduler::SetNonDefaultExecutor(const std::string& name,
Executor* executor) { … }
void Scheduler::SetQueuesRunning(bool running) { … }
void Scheduler::SubmitWaitingTasksOnQueues() { … }
void Scheduler::HandleIdle() { … }
void Scheduler::Quit() { … }
void Scheduler::Start() { … }
void Scheduler::AddApplicationThreadTask(std::function<void()> task) { … }
void Scheduler::ThrottledGraphInputStream() { … }
void Scheduler::UnthrottledGraphInputStream() { … }
void Scheduler::WaitUntilGraphInputStreamUnthrottled(
absl::Mutex* secondary_mutex) { … }
void Scheduler::EmittedObservedOutput() { … }
absl::Status Scheduler::WaitForObservedOutput() { … }
absl::Status Scheduler::WaitUntilIdle() { … }
absl::Status Scheduler::WaitUntilDone() { … }
void Scheduler::ApplicationThreadAwait(
const std::function<bool()>& stop_condition) { … }
bool Scheduler::IsIdle() { … }
void Scheduler::AddedPacketToGraphInputStream() { … }
void Scheduler::ClosedAllGraphInputStreams() { … }
void Scheduler::ScheduleNodeIfNotThrottled(
CalculatorNode* node, CalculatorContext* calculator_context) { … }
void Scheduler::ScheduleNodeForOpen(CalculatorNode* node) { … }
void Scheduler::ScheduleUnthrottledReadyNodes(
const std::vector<CalculatorNode*>& nodes_to_schedule) { … }
void Scheduler::CleanupActiveSources() { … }
bool Scheduler::TryToScheduleNextSourceLayer() { … }
void Scheduler::AddUnopenedSourceNode(CalculatorNode* node) { … }
void Scheduler::AddNodeToSourcesQueue(CalculatorNode* node) { … }
void Scheduler::AssignNodeToSchedulerQueue(CalculatorNode* node) { … }
void Scheduler::QueueIdleStateChanged(bool idle) { … }
void Scheduler::Pause() { … }
void Scheduler::Resume() { … }
void Scheduler::Cancel() { … }
bool Scheduler::IsPaused() { … }
bool Scheduler::IsTerminated() { … }
void Scheduler::CleanupAfterRun() { … }
internal::SchedulerTimes Scheduler::GetSchedulerTimes() { … }
}
}