From: Good Guy Date: Sat, 29 Oct 2022 00:43:16 +0000 (-0600) Subject: Credit Andrew R for finding the direct copy mods for exr and ppm sequences X-Git-Tag: 2022-10~2 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=c4e6affd24397ab2c47f28f7a109dca89604ba7b;p=goodguy%2Fcinelerra.git Credit Andrew R for finding the direct copy mods for exr and ppm sequences --- diff --git a/cinelerra-5.1/cinelerra/fileexr.C b/cinelerra-5.1/cinelerra/fileexr.C index fbc39862..e09dd1fc 100644 --- a/cinelerra-5.1/cinelerra/fileexr.C +++ b/cinelerra-5.1/cinelerra/fileexr.C @@ -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); diff --git a/cinelerra-5.1/cinelerra/fileexr.h b/cinelerra-5.1/cinelerra/fileexr.h index 5f5b251e..40fb01c9 100644 --- a/cinelerra-5.1/cinelerra/fileexr.h +++ b/cinelerra-5.1/cinelerra/fileexr.h @@ -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); diff --git a/cinelerra-5.1/cinelerra/fileppm.C b/cinelerra-5.1/cinelerra/fileppm.C index e91690a1..fe10742d 100644 --- a/cinelerra-5.1/cinelerra/fileppm.C +++ b/cinelerra-5.1/cinelerra/fileppm.C @@ -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; diff --git a/cinelerra-5.1/cinelerra/fileppm.h b/cinelerra-5.1/cinelerra/fileppm.h index ec6a094a..4711b107 100644 --- a/cinelerra-5.1/cinelerra/fileppm.h +++ b/cinelerra-5.1/cinelerra/fileppm.h @@ -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,