Files
ladybird/Libraries/LibMedia/Sinks/VideoSink.h
Zaggy1024 7e238cd724 LibMedia: Add separate classes managing decoding and displaying video
These are unused in this commit, but will later be used to output video
via PlaybackManager, or to decode video directly to some consumer.
2025-10-27 17:28:49 -07:00

25 lines
606 B
C++

/*
* Copyright (c) 2025, Gregory Bertilson <gregory@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/AtomicRefCounted.h>
#include <AK/RefPtr.h>
#include <LibMedia/Forward.h>
namespace Media {
// A consumer to be attached to a VideoDataProvider in order to receive video frames from a decoding thread.
class VideoSink : public AtomicRefCounted<VideoSink> {
public:
virtual ~VideoSink() = default;
virtual void set_provider(Track const&, RefPtr<VideoDataProvider> const&) = 0;
virtual RefPtr<VideoDataProvider> provider(Track const&) const = 0;
};
}