mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-14 02:46:57 +02:00
The way that other classes interact with IncrementallyPopulatedStream is now through a virtual interface MediaStream and MediaStreamCursor. This way, we can have simpler implementations of reading media data that will not require an RB tree and synchronization.
32 lines
720 B
C++
32 lines
720 B
C++
/*
|
|
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Error.h>
|
|
#include <AK/NonnullOwnPtr.h>
|
|
#include <AK/NonnullRefPtr.h>
|
|
#include <LibMedia/FFmpeg/FFmpegForward.h>
|
|
#include <LibMedia/Forward.h>
|
|
|
|
namespace Media::FFmpeg {
|
|
|
|
class FFmpegIOContext {
|
|
public:
|
|
explicit FFmpegIOContext(NonnullRefPtr<MediaStreamCursor>, AVIOContext*);
|
|
~FFmpegIOContext();
|
|
|
|
static ErrorOr<NonnullOwnPtr<FFmpegIOContext>> create(NonnullRefPtr<MediaStreamCursor>);
|
|
|
|
AVIOContext* avio_context() const { return m_avio_context; }
|
|
|
|
private:
|
|
NonnullRefPtr<MediaStreamCursor> m_stream_cursor;
|
|
AVIOContext* m_avio_context { nullptr };
|
|
};
|
|
|
|
}
|