r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / filevorbis.h
blob686ed4a6a8ba9d5ddcde62203b2c3f065ea7d369
1 #ifndef FILEVORBIS_H
2 #define FILEVORBIS_H
4 #include "file.inc"
5 #include "filebase.h"
6 #include "vorbis/vorbisenc.h"
7 #include "vorbis/vorbisfile.h"
8 #include "mutex.h"
9 #include "resample.inc"
16 class FileVorbis : public FileBase
18 public:
19 FileVorbis(Asset *asset, File *file);
20 ~FileVorbis();
22 static void get_parameters(BC_WindowBase *parent_window,
23 Asset *asset,
24 BC_WindowBase* &format_window,
25 int audio_options,
26 int video_options);
27 int reset_parameters_derived();
29 static int check_sig(Asset *asset);
30 int open_file(int rd, int wr);
31 int close_file();
32 int write_samples(double **buffer,
33 int64_t len);
35 int read_samples(double *buffer, int64_t len);
37 // Decoding
38 OggVorbis_File vf;
39 FILE *fd;
40 double **pcm_history;
41 #define HISTORY_MAX 0x100000
42 int history_size;
43 int history_start;
45 // Encoding
46 vorbis_info vi;
47 vorbis_comment vc;
48 vorbis_dsp_state vd;
49 vorbis_block vb;
50 ogg_stream_state os;
51 ogg_page og;
52 ogg_packet op;
56 class VorbisConfigAudio;
59 class VorbisFixedBitrate : public BC_Radial
61 public:
62 VorbisFixedBitrate(int x, int y, VorbisConfigAudio *gui);
63 int handle_event();
64 VorbisConfigAudio *gui;
67 class VorbisVariableBitrate : public BC_Radial
69 public:
70 VorbisVariableBitrate(int x, int y, VorbisConfigAudio *gui);
71 int handle_event();
72 VorbisConfigAudio *gui;
75 class VorbisMinBitrate : public BC_TextBox
77 public:
78 VorbisMinBitrate(int x,
79 int y,
80 VorbisConfigAudio *gui,
81 char *text);
82 int handle_event();
83 VorbisConfigAudio *gui;
86 class VorbisMaxBitrate : public BC_TextBox
88 public:
89 VorbisMaxBitrate(int x,
90 int y,
91 VorbisConfigAudio *gui,
92 char *text);
93 int handle_event();
94 VorbisConfigAudio *gui;
97 class VorbisAvgBitrate : public BC_TextBox
99 public:
100 VorbisAvgBitrate(int x,
101 int y,
102 VorbisConfigAudio *gui,
103 char *text);
104 int handle_event();
105 VorbisConfigAudio *gui;
108 class VorbisConfigAudio : public BC_Window
110 public:
111 VorbisConfigAudio(BC_WindowBase *parent_window, Asset *asset);
112 ~VorbisConfigAudio();
114 int create_objects();
115 int close_event();
117 VorbisFixedBitrate *fixed_bitrate;
118 VorbisVariableBitrate *variable_bitrate;
119 BC_WindowBase *parent_window;
120 char string[BCTEXTLEN];
121 Asset *asset;
126 #endif