Credit Andrew R for finding the direct copy mods for exr and ppm sequences
authorGood Guy <[email protected]>
Sat, 29 Oct 2022 00:43:16 +0000 (18:43 -0600)
committerGood Guy <[email protected]>
Sat, 29 Oct 2022 00:43:16 +0000 (18:43 -0600)
cinelerra-5.1/cinelerra/fileexr.C
cinelerra-5.1/cinelerra/fileexr.h
cinelerra-5.1/cinelerra/fileppm.C
cinelerra-5.1/cinelerra/fileppm.h

index fbc3986221a3658700feebe4fd8c61c1000718e2..e09dd1fcccfb642f41e2fd445f55908c7ddb8a60 100644 (file)
@@ -506,6 +506,15 @@ int FileEXR::write_frame(VFrame *frame, VFrame *data, FrameWriterUnit *unit)
        return 0;
 }
 
+int FileEXR::can_copy_from(Asset *asset, int64_t position)
+{
+       if(asset->format == FILE_EXR ||
+               asset->format == FILE_EXR_LIST)
+               return 1;
+
+       return 0;
+}
+
 FrameWriterUnit* FileEXR::new_writer_unit(FrameWriter *writer)
 {
        return new EXRUnit(this, writer);
index 5f5b251e6ab4f118f009bf6c24b7b51119fdfe20..40fb01c99d72d844b5913bbdbe632c0b24e279cc 100644 (file)
@@ -44,6 +44,7 @@ public:
        int read_frame_header(char *path);
        int read_frame(VFrame *frame, VFrame *data);
        int64_t get_memory_usage();
+       int can_copy_from(Asset *asset, int64_t position);
        int write_frame(VFrame *frame, VFrame *data, FrameWriterUnit *unit);
        FrameWriterUnit* new_writer_unit(FrameWriter *writer);
 
index e91690a12946a7622ff26ff123f6d3331ad85cb6..fe10742d254ecff727cfb9795be4b9d507d1064f 100644 (file)
@@ -183,6 +183,15 @@ int FilePPM::write_frame(VFrame *frame, VFrame *output,
        return 0;
 }
 
+int FilePPM::can_copy_from(Asset *asset, int64_t position)
+{
+       if(asset->format == FILE_PPM ||
+               asset->format == FILE_PPM_LIST)
+               return 1;
+
+       return 0;
+}
+
 int FilePPM::colormodel_supported(int colormodel)
 {
        return BC_RGB888;
index ec6a094a4b9de5e78f9a028212623b1f9cd6b964..4711b1070f5a8d054e48c57a79f7267e7e6f277d 100644 (file)
@@ -43,6 +43,7 @@ public:
        int check_frame_header(FILE *fp);
        int read_frame_header(char *path);
        int write_frame(VFrame *frame, VFrame *output, FrameWriterUnit *unit);
+       int can_copy_from(Asset *asset, int64_t position);
        FrameWriterUnit* new_writer_unit(FrameWriter *writer);
        static void get_parameters(BC_WindowBase *parent_window,
                Asset *asset, BC_WindowBase* &format_window,