2023-12-01 17:32:19 +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
|
|
|
|
|
2023-12-01 17:32:19 +00:00
|
|
|
#include <packager/app/single_thread_job_manager.h>
|
2020-10-20 21:08:46 +00:00
|
|
|
|
2023-12-01 17:32:19 +00:00
|
|
|
#include <packager/media/chunking/sync_point_queue.h>
|
|
|
|
#include <packager/media/origin/origin_handler.h>
|
2020-10-20 21:08:46 +00:00
|
|
|
|
|
|
|
namespace shaka {
|
|
|
|
namespace media {
|
|
|
|
|
|
|
|
SingleThreadJobManager::SingleThreadJobManager(
|
|
|
|
std::unique_ptr<SyncPointQueue> sync_points)
|
|
|
|
: JobManager(std::move(sync_points)) {}
|
|
|
|
|
|
|
|
Status SingleThreadJobManager::RunJobs() {
|
|
|
|
Status status;
|
2023-12-01 17:32:19 +00:00
|
|
|
|
|
|
|
for (auto& job : jobs_)
|
|
|
|
status.Update(job->Run());
|
|
|
|
|
2020-10-20 21:08:46 +00:00
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace media
|
|
|
|
} // namespace shaka
|