StormByte-Multimedia 3.3.2
C++26 multimedia processing module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Multimedia::Attachment Class Reference

Container attachment (cover, fonts). More...

#include <StormByte/multimedia/attachment.hxx>

Public Member Functions

 Attachment ()
 Constructs an empty attachment.
 Attachment (StormByte::Safe::Optional< StormByte::Safe::String > fileName, StormByte::Safe::Optional< StormByte::Safe::String > mimeType, StormByte::Buffer::FIFO payload) noexcept
 Builds an attachment.
 Attachment (const Attachment &other)
 Copies attachment metadata and payload state.
 Attachment (Attachment &&other) noexcept
 Move constructor.
 ~Attachment () noexcept
 Destructor.
Attachment & operator= (const Attachment &other)
 Copies attachment metadata and payload state.
Attachment & operator= (Attachment &&other) noexcept
 Move assignment.
const StormByte::Safe::Optional< StormByte::Safe::String > & FileName () const noexcept
 Original file name.
const StormByte::Safe::Optional< StormByte::Safe::String > & MimeType () const noexcept
 MIME type.
const StormByte::Buffer::FIFO & Payload () const noexcept
 Attachment bytes.

Detailed Description

Container attachment (cover, fonts).

Not a Stream.

avformat exposes Matroska attached files as fake video tracks (AV_DISPOSITION_ATTACHED_PIC). This type is the real contract. Metadata and payload retain creator-owned storage. Base, Buffer and Multimedia providers must remain loaded while attachments are in use.

Constructor & Destructor Documentation

◆ Attachment() [1/4]

StormByte::Multimedia::Attachment::Attachment ( )

Constructs an empty attachment.

Exceptions
StormByte::ExceptionSafe metadata initialization failed.

◆ Attachment() [2/4]

StormByte::Multimedia::Attachment::Attachment ( StormByte::Safe::Optional< StormByte::Safe::String > fileName,
StormByte::Safe::Optional< StormByte::Safe::String > mimeType,
StormByte::Buffer::FIFO payload )
noexcept

Builds an attachment.

Parameters
fileNameSource file name, if known.
mimeTypeMIME type, if known.
payloadFile bytes.

◆ Attachment() [3/4]

StormByte::Multimedia::Attachment::Attachment ( const Attachment & other)

Copies attachment metadata and payload state.

Parameters
otherAttachment to copy.
Exceptions
StormByte::ExceptionSafe metadata copying failed.

◆ Attachment() [4/4]

StormByte::Multimedia::Attachment::Attachment ( Attachment && other)
noexcept

Move constructor.

Parameters
otherAttachment to take.

◆ ~Attachment()

StormByte::Multimedia::Attachment::~Attachment ( )
noexcept

Destructor.

Member Function Documentation

◆ FileName()

const StormByte::Safe::Optional< StormByte::Safe::String > & StormByte::Multimedia::Attachment::FileName ( ) const
noexcept

Original file name.

Returns
Borrowed Safe optional, empty when the name is unknown.

◆ MimeType()

const StormByte::Safe::Optional< StormByte::Safe::String > & StormByte::Multimedia::Attachment::MimeType ( ) const
noexcept

MIME type.

Returns
Borrowed Safe optional, empty when the type is unknown.

◆ operator=() [1/2]

Attachment & StormByte::Multimedia::Attachment::operator= ( Attachment && other)
noexcept

Move assignment.

Parameters
otherAttachment to take.
Returns
*this.

◆ operator=() [2/2]

Attachment & StormByte::Multimedia::Attachment::operator= ( const Attachment & other)

Copies attachment metadata and payload state.

Parameters
otherAttachment to copy.
Returns
*this.
Exceptions
StormByte::ExceptionSafe storage copying failed.

◆ Payload()

const StormByte::Buffer::FIFO & StormByte::Multimedia::Attachment::Payload ( ) const
noexcept

Attachment bytes.

Returns
Borrowed FIFO, valid while this attachment is alive.

The documentation for this class was generated from the following file: