r1053: Add Russian translation.
[cinelerra_cv.git] / cinelerra / filevorbis.h
blob6baa4decef4ab1cdc16e056e75cb0a737753482b
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 "resample.inc"
15 class FileVorbis : public FileBase
17 public:
18 FileVorbis(Asset *asset, File *file);
19 ~FileVorbis();
21 static void get_parameters(BC_WindowBase *parent_window,
22 Asset *asset,
23 BC_WindowBase* &format_window,
24 int audio_options,
25 int video_options);
26 int reset_parameters_derived();
28 static int check_sig(Asset *asset);
29 int open_file(int rd, int wr);
30 int close_file();
31 int write_samples(double **buffer,
32 int64_t len);
34 int read_samples(double *buffer, int64_t len);
35 int read_samples_float(float *buffer, int64_t len);
36 int prefer_samples_float();
38 // Decoding
39 OggVorbis_File vf;
40 FILE *fd;
41 double **pcm_history;
42 float **pcm_history_float;
43 #define HISTORY_MAX 0x100000
44 int history_size;
45 int history_start;
47 // Encoding
48 vorbis_info vi;
49 vorbis_comment vc;
50 vorbis_dsp_state vd;
51 vorbis_block vb;
52 ogg_stream_state os;
53 ogg_page og;
54 ogg_packet op;
58 class VorbisConfigAudio;
61 class VorbisFixedBitrate : public BC_Radial
63 public:
64 VorbisFixedBitrate(int x, int y, VorbisConfigAudio *gui);
65 int handle_event();
66 VorbisConfigAudio *gui;
69 class VorbisVariableBitrate : public BC_Radial
71 public:
72 VorbisVariableBitrate(int x, int y, VorbisConfigAudio *gui);
73 int handle_event();
74 VorbisConfigAudio *gui;
77 class VorbisMinBitrate : public BC_TextBox
79 public:
80 VorbisMinBitrate(int x,
81 int y,
82 VorbisConfigAudio *gui,
83 char *text);
84 int handle_event();
85 VorbisConfigAudio *gui;
88 class VorbisMaxBitrate : public BC_TextBox
90 public:
91 VorbisMaxBitrate(int x,
92 int y,
93 VorbisConfigAudio *gui,
94 char *text);
95 int handle_event();
96 VorbisConfigAudio *gui;
99 class VorbisAvgBitrate : public BC_TextBox
101 public:
102 VorbisAvgBitrate(int x,
103 int y,
104 VorbisConfigAudio *gui,
105 char *text);
106 int handle_event();
107 VorbisConfigAudio *gui;
110 class VorbisConfigAudio : public BC_Window
112 public:
113 VorbisConfigAudio(BC_WindowBase *parent_window, Asset *asset);
114 ~VorbisConfigAudio();
116 int create_objects();
117 int close_event();
119 VorbisFixedBitrate *fixed_bitrate;
120 VorbisVariableBitrate *variable_bitrate;
121 BC_WindowBase *parent_window;
122 char string[BCTEXTLEN];
123 Asset *asset;
128 #endif