00001 #ifndef FILECR2_H 00002 #define FILECR2_H 00003 00004 00005 #include "filebase.h" 00006 00007 00008 // This uses a program from a guy called Coffin to do the decoding. 00009 // Changes to the dcraw.c file were commented with // Cinelerra 00010 00011 // The expected behavior for the dcraw function: 00012 // -i <path> 00013 // When the file is recognized, return 0. 00014 // When the file is unknown, return 1. 00015 00016 // <path> 00017 // Decode the file. 00018 00019 class FileCR2 : public FileBase 00020 { 00021 public: 00022 FileCR2(Asset *asset, File *file); 00023 ~FileCR2(); 00024 00025 void reset(); 00026 static int check_sig(Asset *asset); 00027 00028 // Open file and set asset properties but don't decode. 00029 int open_file(int rd, int wr); 00030 int close_file(); 00031 // Open file and decode. 00032 int read_frame(VFrame *frame); 00033 // Get best colormodel for decoding. 00034 int colormodel_supported(int colormodel); 00035 00036 private: 00037 void format_to_asset(); 00038 }; 00039 00040 00041 #endif
1.5.5