Instead of tracking in-flight seeks across all the sinks in the seeking state handler, move the logic to PlaybackManager to determine the overall status and then notify the state of that status to potentially trigger resumption. The buffering state handler can then share essentially the same logic instead of having the playback manager specifically track the blocked tracks for it.
19 lines
361 B
C++
19 lines
361 B
C++
/*
|
|
* Copyright (c) 2025-2026, Gregory Bertilson <gregory@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include "BufferingStateHandler.h"
|
|
|
|
#include <LibMedia/PlaybackManager.h>
|
|
|
|
namespace Media {
|
|
|
|
void BufferingStateHandler::on_pipeline_status_changed(PipelineStatus status)
|
|
{
|
|
if (status != PipelineStatus::Blocked)
|
|
resume();
|
|
}
|
|
|
|
}
|