2023-07-21 10:41:49 +00:00
|
|
|
// Copyright 2020 Google LLC. All rights reserved.
|
2020-10-20 21:08:46 +00:00
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
|
|
|
|
|
|
|
#include "packager/app/single_thread_job_manager.h"
|
|
|
|
|
|
|
|
#include "packager/media/chunking/sync_point_queue.h"
|
|
|
|
#include "packager/media/origin/origin_handler.h"
|
|
|
|
|
|
|
|
namespace shaka {
|
|
|
|
namespace media {
|
|
|
|
|
|
|
|
SingleThreadJobManager::SingleThreadJobManager(
|
|
|
|
std::unique_ptr<SyncPointQueue> sync_points)
|
|
|
|
: JobManager(std::move(sync_points)) {}
|
|
|
|
|
|
|
|
Status SingleThreadJobManager::RunJobs() {
|
|
|
|
Status status;
|
2023-07-21 10:41:49 +00:00
|
|
|
|
|
|
|
for (auto& job : jobs_)
|
|
|
|
status.Update(job->Run());
|
|
|
|
|
2020-10-20 21:08:46 +00:00
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace media
|
|
|
|
} // namespace shaka
|