#ifndef __FILEFFMPEG_H__
#define __FILEFFMPEG_H__
-#include "asset.inc"
+#include "asset.inc"
#include "bcdialog.h"
#include "bcwindowbase.inc"
-#include "bitspopup.inc"
+#include "bitspopup.inc"
+#include "edl.inc"
#include "ffmpeg.h"
#include "filebase.h"
#include "fileffmpeg.inc"
static void ff_lock(const char *cp=0);
static void ff_unlock();
- static void get_parameters(BC_WindowBase *parent_window,Asset *asset,
- BC_WindowBase *&format_window,int audio_options,int video_options);
+ static void set_options(char *cp, int len, const char *bp);
+ static void get_parameters(BC_WindowBase *parent_window,
+ Asset *asset, BC_WindowBase *&format_window,
+ int audio_options,int video_options, EDL *edl);
static int check_sig(Asset *asset);
+ int get_best_colormodel(int driver, int vstream);
int get_video_info(int track, int &pid, double &framerate,
int &width, int &height, char *title=0);
int get_audio_for_video(int vstream, int astream, int64_t &channel_mask);
int write_frames(VFrame ***frames,int len);
int read_samples(double *buffer,int64_t len);
int read_frame(VFrame *frame);
+ int can_scale_input() { return 1; }
int64_t get_memory_usage(void);
int colormodel_supported(int colormodel);
static int get_best_colormodel(Asset *asset, int driver);
~FFMpegConfigNum();
void create_objects();
+ int update_param(const char *param, const char *opts);
int handle_event();
int *output;
BC_Window *window;
int handle_event();
};
+class FFMpegAudioQuality : public FFMpegAudioNum
+{
+public:
+ FFMpegAudioQuality(BC_Window *window, int x, int y, char *title_text, int *output)
+ : FFMpegAudioNum(window, x, y, title_text, output) {}
+ int handle_event();
+};
+
class FFMpegVideoNum : public FFMpegConfigNum
{
public:
int handle_event();
};
+class FFMpegPixFmtItems : public ArrayList<BC_ListBoxItem*>
+{
+public:
+ FFMpegPixFmtItems() {}
+ ~FFMpegPixFmtItems() { remove_all_objects(); }
+};
+
+class FFMpegPixelFormat : public BC_PopupTextBox
+{
+public:
+ FFMpegPixelFormat(FFMPEGConfigVideo *vid_config, int x, int y, int w, int list_h);
+
+ FFMPEGConfigVideo *vid_config;
+ FFMpegPixFmtItems pixfmts;
+
+ int handle_event();
+ void update_formats();
+};
+
+class FFMpegSampleFormat : public BC_PopupTextBox
+{
+public:
+ FFMpegSampleFormat(FFMPEGConfigAudio *aud_config, int x, int y, int w, int list_h);
+
+ FFMPEGConfigAudio *aud_config;
+ ArrayList<BC_ListBoxItem*> samplefmts;
+
+ int handle_event();
+ void update_formats();
+};
+
class FFMPEGConfigAudio : public BC_Window
{
public:
- FFMPEGConfigAudio(BC_WindowBase *parent_window, Asset *asset);
+ FFMPEGConfigAudio(BC_WindowBase *parent_window, Asset *asset, EDL *edl);
~FFMPEGConfigAudio();
void create_objects();
int close_event();
+ void load_options();
+ FFMpegSampleFormat *sample_format;
ArrayList<BC_ListBoxItem*> presets;
FFMPEGConfigAudioPopup *preset_popup;
FFMpegAudioBitrate *bitrate;
+ FFMpegAudioQuality *quality;
FFAudioOptions *audio_options;
BC_WindowBase *parent_window;
Asset *asset;
+ EDL *edl;
FFOptionsDialog *ff_options_dialog;
};
public:
FFAudioOptions(FFMPEGConfigAudio *audio_popup,
int x, int y, int w, int rows, int size, char *text);
- int handle_event();
FFMPEGConfigAudio *audio_popup;
};
class FFMPEGConfigVideo : public BC_Window
{
public:
- FFMPEGConfigVideo(BC_WindowBase *parent_window, Asset *asset);
+ FFMPEGConfigVideo(BC_WindowBase *parent_window, Asset *asset, EDL *edl);
~FFMPEGConfigVideo();
void create_objects();
int close_event();
+ void load_options();
+ FFMpegPixelFormat *pixel_format;
ArrayList<BC_ListBoxItem*> presets;
FFMPEGConfigVideoPopup *preset_popup;
BC_WindowBase *parent_window;
FFMpegVideoQuality *quality;
FFVideoOptions *video_options;
Asset *asset;
+ EDL *edl;
FFOptionsDialog *ff_options_dialog;
};
public:
FFVideoOptions(FFMPEGConfigVideo *video_popup,
int x, int y, int w, int rows, int size, char *text);
- int handle_event();
FFMPEGConfigVideo *video_popup;
};