Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / fileffmpeg.h
index 56176a42188d848ff988bcd0559780581d11fa4c..c4e7910fb8f948990faacf8dec5287597e484642 100644 (file)
@@ -1,3 +1,25 @@
+/*
+ * CINELERRA
+ * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
+ * Copyright (C) 2010 Monty Montgomery
+ * Copyright (C) 2012-2014 Paolo Rampino
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
 #ifndef __FILEFFMPEG_H__
 #define __FILEFFMPEG_H__
 
@@ -161,15 +183,17 @@ public:
        FFMPEGConfigWindow(const char *title, BC_WindowBase *parent_window,
                int x, int y, int w, int h, Asset *asset, EDL *edl);
        ~FFMPEGConfigWindow();
-       virtual char *get_options() = 0;
-       virtual int get_options_len() = 0;
-       void start(const void *obj);
+       virtual void read_options() = 0;
+       virtual void save_options() = 0;
+       void start(AVCodecContext *avctx);
+       void start(AVFormatContext *fmt_ctx);
 
        BC_WindowBase *parent_window;
        FFOptionsDialog *ff_options_dialog;
        Asset *asset;
        EDL *edl;
-       const void *obj;
+       AVCodecContext *avctx;
+       AVFormatContext *fmt_ctx;
        char *format_name;
        char *codec_name;
 };
@@ -184,8 +208,8 @@ public:
        void create_objects();
        int close_event();
        void load_options();
-       char *get_options();
-       int get_options_len();
+       void read_options();
+       void save_options();
 
        FFMpegSampleFormat *sample_format;
        ArrayList<BC_ListBoxItem*> presets;
@@ -222,8 +246,8 @@ public:
        FFMPEGConfigVideo(BC_WindowBase *parent_window,
                int x, int y, Asset *asset, EDL *edl);
        ~FFMPEGConfigVideo();
-       char *get_options();
-       int get_options_len();
+       void read_options();
+       void save_options();
 
        void create_objects();
        int close_event();
@@ -263,8 +287,9 @@ public:
        FFMPEGConfigFormat(FFOptionsFormatViewDialog *view_dialog,
                int x, int y, Asset *asset, EDL *edl);
        ~FFMPEGConfigFormat();
-       char *get_options();
-       int get_options_len();
+       void read_options();
+       void save_options();
+       void save_changes();
 
        void create_objects();
        int close_event();
@@ -348,7 +373,7 @@ public:
        AVCodecContext *avctx;
        const void *obj;
 
-       void initialize(FFOptionsWindow *win, int k);
+       void initialize(FFOptionsWindow *win, int kind);
        static int cmpr(const void *a, const void *b);
        int update();
        void dump(FILE *fp);
@@ -525,12 +550,12 @@ public:
 class FFOptionsViewFormat : public BC_GenericButton
 {
 public:
-       FFOptionsViewFormat(BC_WindowBase *parent_window,
+       FFOptionsViewFormat(FFMPEGConfigWindow *cfg_window,
                EDL *edl, Asset *asset, int x, int y, const char *text);
        ~FFOptionsViewFormat();
 
        int handle_event();
-       BC_WindowBase *parent_window;
+       FFMPEGConfigWindow *cfg_window;
        EDL *edl;
        Asset *asset;
        FFOptionsFormatViewDialog *format_dialog;