2
frames raw data into Ogg/Vorbis frames.
3
Copyright (C) 2001 Martin Vogt
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU Library General Public License as published by
7
the Free Software Foundation.
9
For more information look at the file COPYRIGHT in this package
24
#include <vorbis/codec.h>
25
#include "../frame/framer.h"
30
This framer works directly on the raw ogg_packet as output
31
Note: the internal setup makes sure, that we initalize
32
the ogg stream to the first found logical bitstream.
33
(For now this should mean: we found vorbis)
34
When the frame goes into the "HAS" state, you have the ogg
35
packet in the in the dest struct from the constructor.
38
class OVFramer : public Framer {
42
ogg_sync_state oy; /* sync and verify incoming physical bitstream */
43
ogg_stream_state os; /* take physical pages, weld into a logical
45
ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */
47
char *buffer; /* sync buffer from ogg */
49
OGGFrame* dest; /* one raw packet of data for decode */
52
// IMPORTANT: because we use this ptr internally the
53
// data to op cannot be on the stack!
54
OVFramer(OGGFrame* dest);
60
int find_frame(RawDataBuffer* input,RawDataBuffer* store);
61
int read_frame(RawDataBuffer* input,RawDataBuffer* store);
63
void unsync(RawDataBuffer* store,int lReset);
64
void printPrivateStates();