7 #include <vorbis/codec.h>
8 #include <theora/theoradec.h>
31 explicit Frame(
const th_ycbcr_buffer& yuv);
48 bool seek(
size_t frame,
size_t sample);
52 [[nodiscard]]
size_t getFrames()
const {
return totalFrames; }
56 [[nodiscard]]
bool stopFrame(
size_t frame)
const;
57 [[nodiscard]]
size_t getChapter(
int chapterNo)
const;
61 void readTheora(ogg_packet* packet);
62 void theoraHeaderPage(ogg_page* page, th_info& ti, th_comment& tc,
64 void readMetadata(th_comment& tc);
65 void readVorbis(ogg_packet* packet);
66 void vorbisHeaderPage(ogg_page* page);
67 bool nextPage(ogg_page* page);
69 void recycleAudio(std::unique_ptr<AudioFragment> audio);
70 void vorbisFoundPosition();
71 size_t frameNo(ogg_packet* packet)
const;
73 size_t findOffset(
size_t frame,
size_t sample);
74 size_t bisection(
size_t frame,
size_t sample,
75 size_t maxOffset,
size_t maxSamples,
size_t maxFrames);
90 ogg_stream_state vorbisStream, theoraStream;
106 std::vector<std::unique_ptr<Frame>> recycleFrameList;
114 size_t currentSample;
117 std::list<std::unique_ptr<AudioFragment>> audioList;
121 std::vector<size_t> stopFrames;
122 std::vector<std::pair<int, size_t>> chapters;
This implements a queue on top of circular_buffer (not part of boost).
This class represents a filename.
bool stopFrame(size_t frame) const
void getFrameNo(RawFrame &frame, size_t frameno)
const AudioFragment * getAudio(size_t sample)
OggReader(const OggReader &)=delete
unsigned getSampleRate() const
size_t getChapter(int chapterNo) const
OggReader & operator=(const OggReader &)=delete
bool seek(size_t frame, size_t sample)
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
This file implemented 3 utility functions:
constexpr const char *const filename
static constexpr size_t UNKNOWN_POS
float pcm[2][MAX_SAMPLES]
static constexpr unsigned MAX_SAMPLES
Frame(const th_ycbcr_buffer &yuv)