Public media stream snapshot. More...
#include <StormByte/multimedia/stream.hxx>
Public Types | |
| using | Properties |
| Safe video and audio property snapshots, respectively. | |
Public Member Functions | |
| Stream () | |
| Constructs an empty stream snapshot. | |
| Stream (const Stream &other) | |
| Copy constructor. | |
| Stream (Stream &&other) noexcept | |
| Move constructor. | |
| ~Stream () noexcept | |
| Destructor. | |
| Stream & | operator= (const Stream &other) |
| Copies a snapshot and its borrowed codec. | |
| Stream & | operator= (Stream &&other) noexcept |
| Transfers a snapshot and its borrowed codec. | |
| int | Index () const noexcept |
| Container stream index (avformat). | |
| const class Codec & | Codec () const |
| Codec of this stream. | |
| Type | Type () const noexcept |
| Media kind of the codec. | |
| const Metadata::Stream & | Metadata () const noexcept |
| Per-stream tags captured at Open. | |
| const StormByte::Safe::Optional< Property::Duration > & | Duration () const noexcept |
| Stream duration. | |
| const StormByte::Safe::Optional< Property::Video > & | Video () const noexcept |
| Video properties when this stream is video. | |
| const StormByte::Safe::Optional< Property::Audio > & | Audio () const noexcept |
| Audio properties when this stream is audio. | |
Friends | |
| class | File |
Public media stream snapshot.
Multimedia stream facade.
One media stream: registry Codec, duration, properties and tags.
Copies share the same Codec instance. The Codec outlives every Stream. Default construction creates an empty stream with index -1 and Unknown type. Codec() throws for an empty stream. Copies retain a borrowed registry codec. Base, Multimedia and the registry must outlive all snapshots and callbacks.
Safe video and audio property snapshots, respectively.
| StormByte::Multimedia::Stream::Stream | ( | ) |
Constructs an empty stream snapshot.
| StormByte::Exception | Safe storage initialization failed. |
| StormByte::Multimedia::Stream::Stream | ( | const Stream & | other | ) |
Copy constructor.
| other | Snapshot to copy. |
| StormByte::Exception | Safe storage copying failed. |
|
noexcept |
Move constructor.
| other | Snapshot to take. |
|
noexcept |
Destructor.
|
noexcept |
Audio properties when this stream is audio.
| const class Codec & StormByte::Multimedia::Stream::Codec | ( | ) | const |
Codec of this stream.
| StormByte::Multimedia::Exception | This snapshot is empty. |
|
noexcept |
Stream duration.
Header value from Open, or a value filled by File::Duration() after a packet scan. Empty if it cannot be determined.
|
inlinenoexcept |
Container stream index (avformat).
Not the position in File::Streams().
|
inlinenoexcept |
Per-stream tags captured at Open.
Copies a snapshot and its borrowed codec.
| other | Snapshot to copy. |
| StormByte::Exception | Safe storage copying failed. |
Transfers a snapshot and its borrowed codec.
| other | Snapshot to take. |
|
noexcept |
Media kind of the codec.
|
noexcept |
Video properties when this stream is video.
|
friend |