41#include <StormByte/buffer/consumer.hxx>
50#include <unordered_set>
62 class AVCodecParameters;
71 friend class StormByte::Multimedia::Backend::Pipeline::Demuxer;
130 const
char*
Tag(const
char* key) const noexcept;
136 std::optional<std::chrono::nanoseconds>
Duration() const noexcept;
164 explicit operator
bool() const noexcept;
175 std::unique_ptr<ConsumerIO> m_io;
187 void HarvestSideData() noexcept;
201 void Free() noexcept override;
const char * FormatName() const noexcept
Demuxer format name (iformat->name).
Streams Streams() const noexcept
Non-owning stream views.
AVFormatContext(AVFormatContext &&other) noexcept
Move constructor.
std::optional< std::chrono::nanoseconds > Duration() const noexcept
Container duration in nanoseconds.
void DiscardUnwanted(const std::unordered_set< int > &wanted) noexcept
Marks streams not in wanted as AVDISCARD_ALL.
const char * Tag(const char *key) const noexcept
Looks up a container metadata tag.
OperationResult ReadPacket(AVPacket &packet) noexcept
Reads the next packet.
AVFormatContext(const AVFormatContext &other)=delete
Copy constructor (deleted).
~AVFormatContext() noexcept override
Destructor.
std::optional< AVBSF > Mp4ToAnnexB(int codec_id, int stream_id, const AVCodecParameters ¶ms) const noexcept
Returns an mp4→Annex-B BSF when the container and codec require it.
static ExpectedAVFormatContext Open(const std::filesystem::path &path)
Opens a file and finds stream info.
Incomplete FFmpeg types for RAII headers.
Hopper and Sink live in StormByte-Buffer.
#define STORMBYTE_MULTIMEDIA_PUBLIC
Imported symbol.
Definition visibility.h:47