X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffileffmpeg.h;h=973cde15c847ff8f42eb48b624732a94311f522e;hb=38cb4182e11e57fc426bede3825e825e9d61433b;hp=9bd9e5beadbe37d6e28760ecbbb0768240432a81;hpb=a9bdd58fae360fa33d27caa059f5ca2c6fa26cd4;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/fileffmpeg.h b/cinelerra-5.1/cinelerra/fileffmpeg.h index 9bd9e5be..973cde15 100644 --- a/cinelerra-5.1/cinelerra/fileffmpeg.h +++ b/cinelerra-5.1/cinelerra/fileffmpeg.h @@ -1,10 +1,10 @@ #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 "ffmpeg.h" #include "filebase.h" #include "fileffmpeg.inc" @@ -31,6 +31,7 @@ public: static void ff_lock(const char *cp=0); static void ff_unlock(); + static void set_parameters(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); static int check_sig(Asset *asset); @@ -38,6 +39,10 @@ public: int &width, int &height, char *title=0); int get_audio_for_video(int vstream, int astream, int64_t &channel_mask); static void get_info(char *path,char *text,int len); + static int can_render(const char *fformat, const char *type); + static int renders_audio(const char *fformat) { return can_render(fformat, "audio"); } + static int renders_video(const char *fformat) { return can_render(fformat, "video"); } + static int get_ff_option(const char *nm, const char *options, char *value); int open_file(int rd,int wr); int get_index(IndexFile *index_file, MainProgressBar *progress_bar); int close_file(void); @@ -45,6 +50,7 @@ public: 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); @@ -60,6 +66,7 @@ public: ~FFMpegConfigNum(); void create_objects(); + int update_param(const char *param, const char *opts); int handle_event(); int *output; BC_Window *window; @@ -117,7 +124,6 @@ public: ~FFMPEGConfigAudio(); void create_objects(); - void update_options(); int close_event(); ArrayList presets; @@ -134,7 +140,6 @@ class FFAudioOptions : public BC_ScrollTextBox public: FFAudioOptions(FFMPEGConfigAudio *audio_popup, int x, int y, int w, int rows, int size, char *text); - int handle_event(); FFMPEGConfigAudio *audio_popup; }; @@ -166,7 +171,6 @@ public: ~FFMPEGConfigVideo(); void create_objects(); - void update_options(); int close_event(); ArrayList presets; @@ -184,7 +188,6 @@ class FFVideoOptions : public BC_ScrollTextBox public: FFVideoOptions(FFMPEGConfigVideo *video_popup, int x, int y, int w, int rows, int size, char *text); - int handle_event(); FFMPEGConfigVideo *video_popup; }; @@ -379,27 +382,27 @@ class FFOptionsDialog : public BC_DialogThread public: FFOptionsDialog(); ~FFOptionsDialog(); - virtual void update_options() = 0; + virtual void update_options(const char *options) = 0; - void load_options(); - void store_options(); - void start(const char *codec_name, AVCodec *codec, char *ff_options, int ff_len); + void load_options(const char *bp, int len); + void store_options(char *cp, int len); + void start(const char *format_name, const char *codec_name, + AVCodec *codec, const char *options, int len); BC_Window* new_gui(); void handle_done_event(int result); FFOptionsWindow *options_window; - const char *codec_name; + const char *format_name, *codec_name; AVCodec *codec; - char *ff_options; - int ff_len; AVDictionary *ff_opts; + int ff_len; }; class FFOptionsAudioDialog : public FFOptionsDialog { public: FFMPEGConfigAudio *aud_config; - void update_options(); + void update_options(const char *options); FFOptionsAudioDialog(FFMPEGConfigAudio *aud_config); ~FFOptionsAudioDialog(); @@ -409,7 +412,7 @@ class FFOptionsVideoDialog : public FFOptionsDialog { public: FFMPEGConfigVideo *vid_config; - void update_options(); + void update_options(const char *options); FFOptionsVideoDialog(FFMPEGConfigVideo *vid_config); ~FFOptionsVideoDialog();