1 #ifndef _library__opus_ogg__hpp__included__
2 #define _library__opus_ogg__hpp__included__
11 * OggOpus header structure.
25 * Parse Ogg packet as OggOpus header.
27 * Parameter pacekt: The packet to parse.
28 * Throws std::runtime_error: Not valid OggOpus header page.
30 void parse(struct ogg::packet
& packet
) throw(std::runtime_error
);
32 * Serialize OggOpus header as an Ogg page.
34 * Returns: The serialized page.
35 * Throws std::runtime_error: Not valid OggOpus header packet.
37 struct ogg::page
serialize() throw(std::runtime_error
);
41 * OggOpus tags structure
46 std::vector
<std::string
> comments
;
48 * Parse Ogg packet as OggOpus comment.
50 * Parameter packet: The packet to parse.
51 * Throws std::runtime_error: Not valid OggOpus comment packet.
53 void parse(struct ogg::packet
& packet
) throw(std::bad_alloc
, std::runtime_error
);
55 * Serialize OggOpus comments as Ogg pages.
57 * Parameter output: Callback to call on each serialized page on turn.
58 * Parameter strmid: The stream id to use.
59 * Returns: Next sequence number to use.
60 * Throws std::runtime_error: Not valid OggOpus comments.
62 uint32_t serialize(std::function
<void(const ogg::page
& p
)> output
, uint32_t strmid
)
63 throw(std::bad_alloc
, std::runtime_error
);