Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

filevorbis.h

Go to the documentation of this file.
00001 #ifndef FILEVORBIS_H
00002 #define FILEVORBIS_H
00003 
00004 #include "file.inc"
00005 #include "filebase.h"
00006 #include "vorbis/vorbisenc.h"
00007 #include "vorbis/vorbisfile.h"
00008 #include "resample.inc"
00009 
00010 
00011 
00012 
00013 
00014 
00015 class FileVorbis : public FileBase
00016 {
00017 public:
00018         FileVorbis(Asset *asset, File *file);
00019         ~FileVorbis();
00020 
00021         static void get_parameters(BC_WindowBase *parent_window, 
00022                 Asset *asset, 
00023                 BC_WindowBase* &format_window,
00024                 int audio_options,
00025                 int video_options);
00026         int reset_parameters_derived();
00027 
00028         static int check_sig(Asset *asset);
00029         int open_file(int rd, int wr);
00030         int close_file();
00031         int write_samples(double **buffer, 
00032                         int64_t len);
00033 
00034         int read_samples(double *buffer, int64_t len);
00035         int read_samples_float(float *buffer, int64_t len);
00036         int prefer_samples_float();
00037         
00038 // Decoding
00039         OggVorbis_File vf;
00040         FILE *fd;
00041         double **pcm_history;
00042         float **pcm_history_float;
00043 #define HISTORY_MAX 0x100000
00044         int history_size;
00045         int history_start;
00046 
00047 // Encoding
00048         vorbis_info vi;
00049         vorbis_comment vc;
00050         vorbis_dsp_state vd;
00051         vorbis_block vb;
00052         ogg_stream_state os;
00053         ogg_page og;
00054         ogg_packet op;
00055 };
00056 
00057 
00058 class VorbisConfigAudio;
00059 
00060 
00061 class VorbisFixedBitrate : public BC_Radial
00062 {
00063 public:
00064         VorbisFixedBitrate(int x, int y, VorbisConfigAudio *gui);
00065         int handle_event();
00066         VorbisConfigAudio *gui;
00067 };
00068 
00069 class VorbisVariableBitrate : public BC_Radial
00070 {
00071 public:
00072         VorbisVariableBitrate(int x, int y, VorbisConfigAudio *gui);
00073         int handle_event();
00074         VorbisConfigAudio *gui;
00075 };
00076 
00077 class VorbisMinBitrate : public BC_TextBox
00078 {
00079 public:
00080         VorbisMinBitrate(int x, 
00081                 int y, 
00082                 VorbisConfigAudio *gui, 
00083                 char *text);
00084         int handle_event();
00085         VorbisConfigAudio *gui;
00086 };
00087 
00088 class VorbisMaxBitrate : public BC_TextBox
00089 {
00090 public:
00091         VorbisMaxBitrate(int x, 
00092                 int y, 
00093                 VorbisConfigAudio *gui, 
00094                 char *text);
00095         int handle_event();
00096         VorbisConfigAudio *gui;
00097 };
00098 
00099 class VorbisAvgBitrate : public BC_TextBox
00100 {
00101 public:
00102         VorbisAvgBitrate(int x, 
00103                 int y, 
00104                 VorbisConfigAudio *gui, 
00105                 char *text);
00106         int handle_event();
00107         VorbisConfigAudio *gui;
00108 };
00109 
00110 class VorbisConfigAudio : public BC_Window
00111 {
00112 public:
00113         VorbisConfigAudio(BC_WindowBase *parent_window, Asset *asset);
00114         ~VorbisConfigAudio();
00115 
00116         int create_objects();
00117         int close_event();
00118 
00119         VorbisFixedBitrate *fixed_bitrate;
00120         VorbisVariableBitrate *variable_bitrate;
00121         BC_WindowBase *parent_window;
00122         char string[BCTEXTLEN];
00123         Asset *asset;
00124 };
00125 
00126 
00127 
00128 #endif

Generated on Sun Jan 8 13:38:55 2006 for Cinelerra-svn by  doxygen 1.4.4