|
using | byte_type = std::remove_pointer_t< decltype(ogg_packet::packet)> |
|
Definition at line 236 of file ExportOpus.cpp.
◆ byte_type
◆ OggPacket() [1/3]
OpusExportProcessor::OggPacket::OggPacket |
( |
int64_t |
packetNo, |
|
|
bool |
resizable |
|
) |
| |
|
inline |
◆ OggPacket() [2/3]
OpusExportProcessor::OggPacket::OggPacket |
( |
int64_t |
packetNo | ) |
|
|
inlineexplicit |
Definition at line 247 of file ExportOpus.cpp.
249 {
250 }
OggPacket(int64_t packetNo, bool resizable)
◆ OggPacket() [3/3]
OpusExportProcessor::OggPacket::OggPacket |
( |
int64_t |
packetNo, |
|
|
long |
size, |
|
|
bool |
resizable |
|
) |
| |
|
inline |
◆ GetBuffer()
byte_type * OpusExportProcessor::OggPacket::GetBuffer |
( |
| ) |
|
|
inline |
◆ GetBufferSize()
size_t OpusExportProcessor::OggPacket::GetBufferSize |
( |
| ) |
const |
|
inline |
◆ MarkBOS()
void OpusExportProcessor::OggPacket::MarkBOS |
( |
| ) |
|
|
inlinenoexcept |
◆ MarkEOS()
void OpusExportProcessor::OggPacket::MarkEOS |
( |
| ) |
|
|
inlinenoexcept |
◆ Reset()
void OpusExportProcessor::OggPacket::Reset |
( |
| ) |
|
|
inlinenoexcept |
◆ Resize()
void OpusExportProcessor::OggPacket::Resize |
( |
long |
size | ) |
|
|
inline |
◆ Write() [1/2]
void OpusExportProcessor::OggPacket::Write |
( |
const void * |
data, |
|
|
const long |
length |
|
) |
| |
|
inline |
Definition at line 279 of file ExportOpus.cpp.
280 {
281 const auto nextPos =
packet.bytes + length;
282
283 if (nextPos >
buffer.size())
284 {
287 else
289 XO(
"Buffer overflow in OGG packet"), OPUS_BUFFER_TOO_SMALL);
290 }
291
293 reinterpret_cast<const byte_type*
>(data),
294 reinterpret_cast<const byte_type*
>(data) + length,
296
298 }
void FailExport(const TranslatableString &title, int errorCode=0)
void copy(const T *src, T *dst, int32_t n)
std::remove_pointer_t< decltype(ogg_packet::packet)> byte_type
References buffer, staffpad::vo::copy(), anonymous_namespace{ExportOpus.cpp}::FailExport(), packet, resizable, Resize(), and XO().
Referenced by Write(), OpusExportProcessor::WriteOpusHeader(), and OpusExportProcessor::WriteTags().
◆ Write() [2/2]
template<typename IntType >
void OpusExportProcessor::OggPacket::Write |
( |
IntType |
value | ) |
|
|
inline |
Definition at line 301 of file ExportOpus.cpp.
302 {
303 static_assert(std::is_integral_v<IntType>);
304 if constexpr (sizeof (IntType) == 1)
305 {
307 }
308 else
309 {
311 {
312 Write(&value,
sizeof (IntType));
313 }
314 else
315 {
317 Write(&swapped,
sizeof (IntType));
318 }
319 }
320 }
constexpr IntType SwapIntBytes(IntType value) noexcept
Swap bytes in an integer.
bool IsLittleEndian() noexcept
Check that machine is little-endian.
void Write(const void *data, const long length)
References IsLittleEndian(), SwapIntBytes(), and Write().
◆ buffer
std::vector<byte_type> OpusExportProcessor::OggPacket::buffer |
|
private |
◆ packet
ogg_packet OpusExportProcessor::OggPacket::packet {} |
◆ resizable
bool OpusExportProcessor::OggPacket::resizable { false } |
|
private |
The documentation for this struct was generated from the following file: