Snapshot of a media source: path or Consumer, container, streams and tags.
More...
#include <StormByte/multimedia/file.hxx>
|
| static ExpectedFile | Open (const std::filesystem::path &path) noexcept |
| | Opens and probes path.
|
| |
| static ExpectedFile | Open (const std::filesystem::path &path, std::chrono::nanoseconds duration) noexcept |
| | Opens and probes path with an already known duration.
|
| |
| static ExpectedFile | Open (StormByte::Buffer::Consumer consumer) noexcept |
| | Opens and probes a Consumer.
|
| |
| static ExpectedFile | Open (StormByte::Buffer::Consumer consumer, std::chrono::nanoseconds duration) noexcept |
| | Opens and probes a Consumer with an already known duration.
|
| |
Snapshot of a media source: path or Consumer, container, streams and tags.
Public media file snapshot.
File is move-only. Open() probes with private FFmpeg RAII and drops the demuxer before return. A Consumer origin is kept; its Ring is exclusive to this File for its lifetime. avformat attached pictures (AV_DISPOSITION_ATTACHED_PIC) are stored in Attachments(), not Streams().
◆ File() [1/2]
| StormByte::Multimedia::File::File |
( |
const File & |
| ) |
|
|
delete |
Copy constructor (deleted).
◆ File() [2/2]
| StormByte::Multimedia::File::File |
( |
File && |
| ) |
|
|
noexcept |
◆ ~File()
| StormByte::Multimedia::File::~File |
( |
| ) |
|
|
noexcept |
◆ Attachments()
Container attachments (covers, fonts).
Not listed in Streams().
- Returns
- Attachments captured at Open.
◆ Container()
| const class Container & StormByte::Multimedia::File::Container |
( |
| ) |
const |
|
inlinenoexcept |
Detected container.
- Returns
- Registry container.
◆ Duration()
| const std::optional< Property::Duration > & StormByte::Multimedia::File::Duration |
( |
| ) |
const |
|
noexcept |
Container duration.
- Returns
- Duration, or empty if it cannot be determined.
Returns the header value, the duration passed to Open, or a value cached after the first scan. The first call may read the whole source when Open was used without a duration: even if the container header has a duration, streams that lack one are filled from packet timestamps. After a successful scan the result is reused on this instance. If Open(..., duration) was used, this is that value, there is no I/O, and stream durations stay as probed.
◆ Metadata()
| const Metadata::File & StormByte::Multimedia::File::Metadata |
( |
| ) |
const |
|
inlinenoexcept |
Container-level tags captured at Open.
- Returns
- Metadata snapshot.
◆ Open() [1/4]
| static ExpectedFile StormByte::Multimedia::File::Open |
( |
const std::filesystem::path & |
path | ) |
|
|
staticnoexcept |
◆ Open() [2/4]
| static ExpectedFile StormByte::Multimedia::File::Open |
( |
const std::filesystem::path & |
path, |
|
|
std::chrono::nanoseconds |
duration |
|
) |
| |
|
staticnoexcept |
Opens and probes path with an already known duration.
- Parameters
-
| path | Media file. |
| duration | Authoritative container duration in nanoseconds. |
- Returns
- Snapshot or FileOpenException.
◆ Open() [3/4]
| static ExpectedFile StormByte::Multimedia::File::Open |
( |
StormByte::Buffer::Consumer |
consumer | ) |
|
|
staticnoexcept |
Opens and probes a Consumer.
- Parameters
-
| consumer | Shared ring handle (copied and kept). |
- Returns
- Snapshot or FileOpenException.
◆ Open() [4/4]
| static ExpectedFile StormByte::Multimedia::File::Open |
( |
StormByte::Buffer::Consumer |
consumer, |
|
|
std::chrono::nanoseconds |
duration |
|
) |
| |
|
staticnoexcept |
Opens and probes a Consumer with an already known duration.
- Parameters
-
| consumer | Shared ring handle (copied and kept). |
| duration | Authoritative container duration in nanoseconds. |
- Returns
- Snapshot or FileOpenException.
◆ operator=() [1/2]
| File & StormByte::Multimedia::File::operator= |
( |
const File & |
| ) |
|
|
delete |
Copy assignment (deleted).
- Returns
- *this.
◆ operator=() [2/2]
| File & StormByte::Multimedia::File::operator= |
( |
File && |
| ) |
|
|
delete |
Move assignment (deleted: Container is a reference).
- Returns
- *this.
◆ Path()
| const std::filesystem::path & StormByte::Multimedia::File::Path |
( |
| ) |
const |
|
noexcept |
Filesystem path passed to Open, or empty if the origin is a Consumer.
- Returns
- Path.
◆ Streams()
Real streams in container order.
Attached pictures are omitted.
- Returns
- Immutable list.
◆ Pipeline::Demuxer
The documentation for this class was generated from the following file:
- lib/public/StormByte/multimedia/file.hxx