add binfolder path relative filters, fix gbrp color model, vwdw timebar tweaks, title...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / filempeg.h
index cde4458cc0e4b93824bb238cbe3584cb4b23388e..34e779cec849235b9ba84f6059efd13fc93861ff 100644 (file)
@@ -2,33 +2,37 @@
 /*
  * CINELERRA
  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
- * 
+ *
  * 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 FILEMPEG_H
 #define FILEMPEG_H
+#ifdef HAVE_LIBZMPEG
 
 #include "bitspopup.inc"
 #include "condition.inc"
+#include "edl.inc"
 #include "file.inc"
 #include "filebase.h"
+#include "indexfile.inc"
 #include "twolame.h"
 #include "lame/lame.h"
 #include "libzmpeg3.h"
+#include "mainprogress.inc"
 #include "thread.h"
 
 
@@ -60,11 +64,9 @@ public:
 
        friend class FileMPEGVideo;
 
-       static void get_parameters(BC_WindowBase *parent_window, 
-               Asset *asset, 
-               BC_WindowBase* &format_window,
-               int audio_options,
-               int video_options);
+       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);
 
@@ -72,13 +74,12 @@ public:
        static void get_info(char *title_path, char *path, char *text, int len);
        int open_file(int rd, int wr);
        int close_file();
-       int create_index();
+       int create_toc(char *toc_path);
+       int get_index(IndexFile *index_file, MainProgressBar *progress_bar);
 
-
-       int get_index(char *index_path);
        int set_video_position(int64_t x);
        int set_audio_position(int64_t x);
-       int write_samples(double **buffer, 
+       int write_samples(double **buffer,
                        int64_t len);
        int write_frames(VFrame ***frames, int len);
 
@@ -108,7 +109,8 @@ public:
        static int bc_colormodel(int cmdl);
         static const char *zmpeg3_cmdl_name(int cmdl);
 // This file can copy frames directly from the asset
-       int can_copy_from(Asset *asset, int64_t position); 
+       int can_copy_from(Asset *asset, int64_t position);
+       int can_scale_input() { return 1; }
 
 private:
        void to_streamchannel(int channel, int &stream_out, int &channel_out);
@@ -127,15 +129,15 @@ private:
        int record_fd() { return recd_fd; }
 
 // MJPEGtools encoder
-       FILE *mjpeg_out;        
+       FILE *mjpeg_out;
        int mjpeg_error;
        Condition *next_frame_lock;
        Condition *next_frame_done;
        int mjpeg_eof;
        int wrote_header;
-       unsigned char *mjpeg_y; 
-       unsigned char *mjpeg_u; 
-       unsigned char *mjpeg_v; 
+       unsigned char *mjpeg_y;
+       unsigned char *mjpeg_u;
+       unsigned char *mjpeg_v;
        char mjpeg_command[BCTEXTLEN];
 
 // skimmer
@@ -207,7 +209,7 @@ public:
        int handle_event();
        static int string_to_layer(char *string);
        static char* layer_to_string(int derivative);
-       
+
        MPEGConfigAudio *gui;
 };
 
@@ -222,7 +224,7 @@ public:
        int handle_event();
        static int string_to_bitrate(char *string);
        static char* bitrate_to_string(char *string, int bitrate);
-       
+
        MPEGConfigAudio *gui;
 };
 
@@ -251,7 +253,7 @@ public:
        int handle_event();
        static int string_to_cmodel(char *string);
        static char* cmodel_to_string(int cmodel);
-       
+
        MPEGConfigVideo *gui;
 };
 
@@ -264,7 +266,7 @@ public:
        int handle_event();
        static int string_to_derivative(char *string);
        static char* derivative_to_string(int derivative);
-       
+
        MPEGConfigVideo *gui;
 };
 
@@ -330,7 +332,7 @@ public:
 class MPEGConfigVideo : public BC_Window
 {
 public:
-       MPEGConfigVideo(BC_WindowBase *parent_window, 
+       MPEGConfigVideo(BC_WindowBase *parent_window,
                Asset *asset);
        ~MPEGConfigVideo();
 
@@ -360,5 +362,5 @@ public:
        ArrayList<BC_SubWindow*> tools;
 };
 
-
+#endif
 #endif