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.
29 lines
663 B
C++
29 lines
663 B
C++
/*
|
|
* Copyright (c) 2025-2026, Gregory Bertilson <gregory@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibMedia/PlaybackManager.h>
|
|
#include <LibMedia/PlaybackStates/SeekingStateHandler.h>
|
|
|
|
#include "PlaybackStateHandler.h"
|
|
|
|
namespace Media {
|
|
|
|
AK::Duration PlaybackStateHandler::current_time() const
|
|
{
|
|
return manager().m_time_provider->current_time();
|
|
}
|
|
|
|
void PlaybackStateHandler::seek(AK::Duration timestamp, SeekMode mode)
|
|
{
|
|
manager().replace_state_handler<SeekingStateHandler>(manager().is_playing(), timestamp, mode);
|
|
}
|
|
|
|
void PlaybackStateHandler::on_pipeline_status_changed(PipelineStatus status)
|
|
{
|
|
(void)status;
|
|
}
|
|
|
|
}
|