X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffile.h;h=2ca1acbe921a62482d4595f3e86519d3189b66ef;hp=b8108492de2a30a7f73189ff3260feb5ed410b69;hb=2e48b660e37eb5c661264d601211e16cb6cd6e89;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd diff --git a/cinelerra-5.1/cinelerra/file.h b/cinelerra-5.1/cinelerra/file.h index b8108492..2ca1acbe 100644 --- a/cinelerra-5.1/cinelerra/file.h +++ b/cinelerra-5.1/cinelerra/file.h @@ -37,6 +37,8 @@ #include "formattools.h" #include "framecache.inc" #include "guicast.h" +#include "indexfile.inc" +#include "mainprogress.inc" #include "mutex.inc" #include "packagingengine.inc" #include "pluginserver.inc" @@ -56,6 +58,7 @@ public: File(); ~File(); + int probe(); // Get attributes for various file formats. // The dither parameter is carried over from recording, where dither is done at the device. int get_options(FormatTools *format, @@ -83,8 +86,9 @@ public: // to delete the file object. Otherwise we'd delete just the cached frames // while the list of open files grew. void set_cache_frames(int value); -// Delete frame cache. Return 0 if successful. Return 1 if -// nothing to delete. +// Delete oldest frame from cache. +// Return number of bytes freed if successful. +// Return 0 if nothing to delete. int purge_cache(); // Delete oldest frame from cache. Return 0 if successful. Return 1 if // nothing to delete. @@ -97,7 +101,7 @@ public: int wr); // Get index from the file if one exists. Returns 0 on success. - int get_index(char *index_path); + int get_index(IndexFile *index_file, MainProgressBar *progress_bar); // start a thread for writing to avoid blocking during record int start_audio_thread(int buffer_size, int ring_buffers); @@ -224,10 +228,12 @@ public: // allocated. // Get best colormodel to translate for hardware accelerated playback. // Called by VRender. - int get_best_colormodel(int driver); + int get_best_colormodel(int driver, int vstream=-1); // Get best colormodel for hardware accelerated recording. // Called by VideoDevice. static int get_best_colormodel(Asset *asset, int driver); +// asset scaling on read_frame + static int can_scale_input(Asset *asset); // Get nearest colormodel that can be decoded without a temporary frame. // Used by read_frame. int colormodel_supported(int colormodel); @@ -243,17 +249,16 @@ public: // The minimum setting for cache_size should be bigger than 1MB. int64_t get_memory_usage(); - static int supports_video(ArrayList *plugindb, char *format); // returns 1 if the format supports video or audio - static int supports_audio(ArrayList *plugindb, char *format); + static int renders_video(int format); + static int renders_video(Asset *asset); + static int renders_audio(int format); + static int renders_audio(Asset *asset); // Get the extension for the filename static const char* get_tag(int format); static const char* get_prefix(int format); - static int supports_video(int format); // returns 1 if the format supports video or audio - static int supports_audio(int format); static int strtoformat(const char *format); static const char* formattostr(int format); - static int strtoformat(ArrayList *plugindb, const char *format); - static const char* formattostr(ArrayList *plugindb, int format); + static int is_image_render(int format); static int strtobits(const char *bits); static const char* bitstostr(int bits); static int str_to_byteorder(const char *string); @@ -311,6 +316,24 @@ public: int wr, rd; static PackagingEngine *new_packaging_engine(Asset *asset); + static void init_cin_path(); + static void get_exe_path(char *result, char *bnp=0); + static void getenv_path(char *result, const char *path); + static void setenv_path(const char *var, const char *path, int overwrite); + static const char *get_cin() { return getenv("CIN_PKG"); } + static const char *get_cin_path() { return getenv("CIN_PATH"); } + static const char *get_cindat_path() { return getenv("CIN_DAT"); } + static const char *get_cinlib_path() { return getenv("CIN_LIB"); } + static const char *get_config_path() { return getenv("CIN_CONFIG"); } + static const char *get_plugin_path() { return getenv("CIN_PLUGIN"); } + static const char *get_ladspa_path() { return getenv("CIN_LADSPA"); } + static const char *get_locale_path() { return getenv("CIN_LOCALE"); } + static const char *get_render_path() { return getenv("CIN_RENDER"); } + static const char *get_browser_path() { return getenv("CIN_BROWSER"); } + + static const char *default_probes[]; + static const int nb_probes; + private: void reset_parameters();