add binfolder path relative filters, fix gbrp color model, vwdw timebar tweaks, title...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / vdevicex11.h
index f8af6916d3dca00526b7dbf5d71e2c3fafc921b5..afc21edb27db2aac2f53b9f5431a0e88ef3ead0d 100644 (file)
@@ -2,21 +2,21 @@
 /*
  * 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 VDEVICEX11_H
@@ -47,7 +47,7 @@ public:
        int read_buffer(VFrame *frame);
        int reset_parameters();
 // User always gets the colormodel requested
-       void new_output_buffer(VFrame **output, int colormodel);
+       void new_output_buffer(VFrame **output, int colormodel, EDL *edl);
 
        int open_output();
        int start_playback();
@@ -67,13 +67,13 @@ public:
 // Called by VModule::import_frame
        void do_camera(VFrame *output,
                VFrame *input,
-               float in_x1, 
-               float in_y1, 
-               float in_x2, 
-               float in_y2, 
-               float out_x1, 
-               float out_y1, 
-               float out_x2, 
+               float in_x1,
+               float in_y1,
+               float in_x2,
+               float in_y2,
+               float out_x1,
+               float out_y1,
+               float out_x2,
                float out_y2);
 
 // Called by VModule::import_frame for cases with no media.
@@ -83,8 +83,8 @@ public:
 
 // Hardware version of MaskEngine
        bool can_mask(int64_t start_position_project, MaskAutos *keyframe_set);
-       void do_mask(VFrame *output, 
-               int64_t start_position_project, MaskAutos *keyframe_set, 
+       void do_mask(VFrame *output,
+               int64_t start_position_project, MaskAutos *keyframe_set,
                MaskAuto *keyframe, MaskAuto *default_auto);
        void convert_cmodel(VFrame *output, int dst_cmodel);
 
@@ -100,15 +100,15 @@ public:
 // It requires recompositing the previous frame in software every time playback was
 // stops, a complicated operation.
        void overlay(VFrame *output_frame,
-               VFrame *input, 
-               float in_x1, 
-               float in_y1, 
-               float in_x2, 
-               float in_y2, 
-               float out_x1, 
-               float out_y1, 
-               float out_x2, 
-               float out_y2, 
+               VFrame *input,
+               float in_x1,
+               float in_y1,
+               float in_x2,
+               float in_y2,
+               float out_x1,
+               float out_y1,
+               float out_x2,
+               float out_y2,
                float alpha,        // 0 - 1
                int mode,
                EDL *edl,
@@ -119,7 +119,7 @@ public:
 // pluginclient function.
        void run_plugin(PluginClient *client);
 
-// For multichannel plugins, copy from the temporary pbuffer to 
+// For multichannel plugins, copy from the temporary pbuffer to
 // the plugin output texture.
 // Set the output OpenGL state to TEXTURE.
        void copy_frame(VFrame *dst, VFrame *src);
@@ -130,16 +130,22 @@ private:
 // is passed to this to create the VFrame to which the output is rendered.
 // For OpenGL, it creates the array of row pointers used to upload the video
 // frame to the texture, the texture, and the PBuffer.
-       int get_best_colormodel(int colormodel);
+       int get_display_colormodel(int file_colormodel);
+
+// windows which overlay the screencap area
+#define SCREENCAP_BORDERS 4
+#define SCREENCAP_PIXELS 5
+#define SCREENCAP_COLOR GREEN
+       BC_Popup *screencap_border[SCREENCAP_BORDERS];
 
 // Bitmap to be written to device
-       BC_Bitmap *bitmap;        
+       BC_Bitmap *bitmap;
 // Wrapper for bitmap or intermediate buffer for user to write to
-       VFrame *output_frame;     
+       VFrame *output_frame;
 // Type of output_frame
-       int bitmap_type;           
+       int bitmap_type;
 // dimensions of buffers written to window
-       int bitmap_w, bitmap_h;   
+       int bitmap_w, bitmap_h;
        ArrayList<int> render_strategies;
 // Canvas for output
        Canvas *output;
@@ -150,12 +156,14 @@ private:
        int texture_h;
        int color_model;
        int color_model_selected;
-// Transfer coordinates from the output frame to the canvas 
-// for last frame rendered.
+// Transfer coordinates from the output frame to the canvas.
+// Calculated in new_output_buffer & retained for write_buffer
 // These stick the last frame to the display.
 // Must be floats to support OpenGL
        float output_x1, output_y1, output_x2, output_y2;
        float canvas_x1, canvas_y1, canvas_x2, canvas_y2;
+// rounded integer dimensions
+       int canvas_w, canvas_h;
 // Screen capture
        BC_Capture *capture_bitmap;
 // Set when OpenGL rendering has cleared the frame buffer before write_buffer