X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffileffmpeg.h;h=5453b77ca61d0f0c692484fd4c45b11d93747170;hp=51e191519918e39ec73ac3f343c526dff462da1a;hb=7e5a0760f40ff787cc3d93cb7768a901ebe52809;hpb=e5d1c3ec8b49e9e4cd31f30e991f52ab11de93b1 diff --git a/cinelerra-5.1/cinelerra/fileffmpeg.h b/cinelerra-5.1/cinelerra/fileffmpeg.h index 51e19151..5453b77c 100644 --- a/cinelerra-5.1/cinelerra/fileffmpeg.h +++ b/cinelerra-5.1/cinelerra/fileffmpeg.h @@ -5,6 +5,7 @@ #include "bcdialog.h" #include "bcwindowbase.inc" #include "bitspopup.inc" +#include "edl.inc" #include "ffmpeg.h" #include "filebase.h" #include "fileffmpeg.inc" @@ -31,18 +32,16 @@ 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 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); 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); @@ -50,6 +49,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); @@ -91,6 +91,14 @@ public: 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: @@ -116,21 +124,56 @@ public: int handle_event(); }; +class FFMpegPixFmtItems : public ArrayList +{ +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 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 presets; FFMPEGConfigAudioPopup *preset_popup; FFMpegAudioBitrate *bitrate; + FFMpegAudioQuality *quality; FFAudioOptions *audio_options; BC_WindowBase *parent_window; Asset *asset; + EDL *edl; FFOptionsDialog *ff_options_dialog; }; @@ -166,12 +209,14 @@ public: 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 presets; FFMPEGConfigVideoPopup *preset_popup; BC_WindowBase *parent_window; @@ -179,6 +224,7 @@ public: FFMpegVideoQuality *quality; FFVideoOptions *video_options; Asset *asset; + EDL *edl; FFOptionsDialog *ff_options_dialog; };