00001 #ifndef FILEAC3_H
00002 #define FILEAC3_H
00003
00004
00005 #include <ffmpeg/avcodec.h>
00006 #include "filebase.h"
00007 #include <stdio.h>
00008
00009
00010 class FileAC3 : public FileBase
00011 {
00012 public:
00013 FileAC3(Asset *asset, File *file);
00014 ~FileAC3();
00015
00016 int reset_parameters_derived();
00017 static void get_parameters(BC_WindowBase *parent_window,
00018 Asset *asset,
00019 BC_WindowBase* &format_window,
00020 int audio_options,
00021 int video_options);
00022 static int check_sig();
00023 int open_file(int rd, int wr);
00024 int close_file();
00025 int write_samples(double **buffer, int64_t len);
00026
00027 private:
00028 AVCodec *codec;
00029 AVCodecContext *codec_context;
00030 FILE *fd;
00031 int16_t *temp_raw;
00032 int temp_raw_allocated;
00033 int temp_raw_size;
00034 unsigned char *temp_compressed;
00035 int compressed_allocated;
00036 };
00037
00038
00039
00040 class AC3ConfigAudio : public BC_Window
00041 {
00042 public:
00043 AC3ConfigAudio(BC_WindowBase *parent_window,
00044 Asset *asset);
00045
00046 void create_objects();
00047 int close_event();
00048
00049 Asset *asset;
00050 BC_WindowBase *parent_window;
00051 char string[BCTEXTLEN];
00052 };
00053
00054
00055 class AC3ConfigAudioBitrate : public BC_PopupMenu
00056 {
00057 public:
00058 AC3ConfigAudioBitrate(AC3ConfigAudio *gui, int x, int y);
00059
00060 void create_objects();
00061 int handle_event();
00062 static char* bitrate_to_string(char *string, int bitrate);
00063
00064 AC3ConfigAudio *gui;
00065 };
00066
00067
00068
00069
00070
00071 #endif