RAII input format context (demuxer).
More...
#include <StormByte/multimedia/ffmpeg/AVFormatContext.hxx>
|
| constexpr | AVPointer (std::decay_t< ::AVFormatContext > *ptr) noexcept |
| | Adopts ptr.
|
| |
| constexpr const std::decay_t< ::AVFormatContext > * | Get () const noexcept |
| | Const view of the raw FFmpeg pointer.
|
| |
| constexpr std::decay_t< ::AVFormatContext > * | Get () noexcept |
| | Mutable view of the raw FFmpeg pointer.
|
| |
| constexpr std::decay_t< ::AVFormatContext > * | Detach () noexcept |
| | Yields the raw pointer and leaves this wrapper empty.
|
| |
| std::decay_t< ::AVFormatContext > * | m_ptr |
| | Owned FFmpeg pointer.
|
| |
RAII input format context (demuxer).
◆ AVFormatContext() [1/2]
| StormByte::Multimedia::FFmpeg::AVFormatContext::AVFormatContext |
( |
const AVFormatContext & |
other | ) |
|
|
delete |
Copy constructor (deleted).
- Parameters
-
◆ AVFormatContext() [2/2]
| StormByte::Multimedia::FFmpeg::AVFormatContext::AVFormatContext |
( |
AVFormatContext && |
other | ) |
|
|
noexcept |
Move constructor.
- Parameters
-
◆ ~AVFormatContext()
| StormByte::Multimedia::FFmpeg::AVFormatContext::~AVFormatContext |
( |
| ) |
|
|
overridenoexcept |
◆ DiscardUnwanted()
| void StormByte::Multimedia::FFmpeg::AVFormatContext::DiscardUnwanted |
( |
const std::unordered_set< int > & |
wanted | ) |
|
|
noexcept |
Marks streams not in wanted as AVDISCARD_ALL.
- Parameters
-
| wanted | Origin indexes to keep (AVDISCARD_DEFAULT). |
◆ Duration()
| std::optional< std::chrono::nanoseconds > StormByte::Multimedia::FFmpeg::AVFormatContext::Duration |
( |
| ) |
const |
|
noexcept |
Container duration in nanoseconds.
- Returns
- Duration, or empty if unknown.
◆ FormatName()
| const char * StormByte::Multimedia::FFmpeg::AVFormatContext::FormatName |
( |
| ) |
const |
|
noexcept |
Demuxer format name (iformat->name).
- Returns
- Name (may be comma-separated ids), or nullptr.
◆ Mp4ToAnnexB()
| std::optional< AVBSF > StormByte::Multimedia::FFmpeg::AVFormatContext::Mp4ToAnnexB |
( |
int |
codec_id, |
|
|
int |
stream_id, |
|
|
const AVCodecParameters & |
params |
|
) |
| const |
|
noexcept |
Returns an mp4→Annex-B BSF when the container and codec require it.
- Parameters
-
- Returns
- BSF or nullopt.
◆ Open() [1/2]
| static ExpectedAVFormatContext StormByte::Multimedia::FFmpeg::AVFormatContext::Open |
( |
const std::filesystem::path & |
path | ) |
|
|
static |
Opens a file and finds stream info.
- Parameters
-
- Returns
- Context or DecoderError.
◆ Open() [2/2]
| static ExpectedAVFormatContext StormByte::Multimedia::FFmpeg::AVFormatContext::Open |
( |
StormByte::Buffer::Consumer |
consumer | ) |
|
|
static |
Opens a Consumer and finds stream info.
- Parameters
-
| consumer | Shared ring handle (copied into the I/O adapter). |
- Returns
- Context or DecoderError.
◆ operator bool()
| StormByte::Multimedia::FFmpeg::AVFormatContext::operator bool |
( |
| ) |
const |
|
explicitnoexcept |
Whether an input context is open.
- Returns
- true after a successful Open().
◆ operator=() [1/2]
Move assignment.
- Parameters
-
- Returns
- *this.
◆ operator=() [2/2]
Copy assignment (deleted).
- Parameters
-
- Returns
- *this.
◆ ReadPacket()
Reads the next packet.
- Parameters
-
| packet | Destination packet. |
- Returns
- Operation result.
◆ Streams()
| Streams StormByte::Multimedia::FFmpeg::AVFormatContext::Streams |
( |
| ) |
const |
|
noexcept |
Non-owning stream views.
- Returns
- Set of streams.
◆ Tag()
| const char * StormByte::Multimedia::FFmpeg::AVFormatContext::Tag |
( |
const char * |
key | ) |
const |
|
noexcept |
Looks up a container metadata tag.
- Parameters
-
- Returns
- Value, or nullptr if missing.
The documentation for this class was generated from the following file: