projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
version update
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
cinelerra
/
file.C
diff --git
a/cinelerra-5.1/cinelerra/file.C
b/cinelerra-5.1/cinelerra/file.C
index 07cddec4961fc9faf60fc0b36d3cab6622073e2b..f0b393029718d8e0acb4632aad13a1f1042020fb 100644
(file)
--- a/
cinelerra-5.1/cinelerra/file.C
+++ b/
cinelerra-5.1/cinelerra/file.C
@@
-1,6
+1,7
@@
/*
* CINELERRA
* Copyright (C) 2010 Adam Williams <broadcast at earthling dot net>
/*
* CINELERRA
* Copyright (C) 2010 Adam Williams <broadcast at earthling dot net>
+ * Copyright (C) 2003-2016 Cinelerra CV contributors
*
* 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
*
* 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
@@
-387,8
+388,12
@@
const char *File::default_probes[] = {
"PNG",
"PPM",
"JPEG",
"PNG",
"PPM",
"JPEG",
+#ifdef HAVE_GIFLIB
"GIF",
"GIF",
+#endif
+#ifdef HAVE_LIBDPX
"DPX",
"DPX",
+#endif
#ifdef HAVE_OPENEXR
"EXR",
#endif
#ifdef HAVE_OPENEXR
"EXR",
#endif
@@
-400,7
+405,9
@@
const char *File::default_probes[] = {
"OGG",
"Vorbis",
#endif
"OGG",
"Vorbis",
#endif
+#ifdef HAVE_LIBZMPEG
"MPEG",
"MPEG",
+#endif
"EDL",
"FFMPEG_Late",
};
"EDL",
"FFMPEG_Late",
};
@@
-465,6
+472,7
@@
int File::probe()
file = new FileJPEG(this->asset, this);
return FILE_OK;
}
file = new FileJPEG(this->asset, this);
return FILE_OK;
}
+#ifdef HAVE_GIFLIB
if( !strcmp(pref->name,"GIF") ) { // GIF file
if( FileGIFList::check_sig(this->asset) )
file = new FileGIFList(this->asset, this);
if( !strcmp(pref->name,"GIF") ) { // GIF file
if( FileGIFList::check_sig(this->asset) )
file = new FileGIFList(this->asset, this);
@@
-473,6
+481,7
@@
int File::probe()
else continue;
return FILE_OK;
}
else continue;
return FILE_OK;
}
+#endif
#ifdef HAVE_LIBDPX
if( !strcmp(pref->name,"DPX") ) { // DPX file
if( !FileDPX::check_sig(this->asset, data) ) continue;
#ifdef HAVE_LIBDPX
if( !strcmp(pref->name,"DPX") ) { // DPX file
if( !FileDPX::check_sig(this->asset, data) ) continue;
@@
-599,13
+608,14
@@
int File::open_file(Preferences *preferences,
case FILE_JPEG_LIST:
file = new FileJPEG(this->asset, this);
break;
case FILE_JPEG_LIST:
file = new FileJPEG(this->asset, this);
break;
-
+#ifdef HAVE_GIFLIB
case FILE_GIF:
file = new FileGIF(this->asset, this);
break;
case FILE_GIF_LIST:
file = new FileGIFList(this->asset, this);
break;
case FILE_GIF:
file = new FileGIF(this->asset, this);
break;
case FILE_GIF_LIST:
file = new FileGIFList(this->asset, this);
break;
+#endif
#ifdef HAVE_LIBDPX
case FILE_DPX:
case FILE_DPX_LIST:
#ifdef HAVE_LIBDPX
case FILE_DPX:
case FILE_DPX_LIST:
@@
-1657,7
+1667,14
@@
int File::record_fd()
void File::get_exe_path(char *result, char *bnp)
{
// Get executable path, basename
void File::get_exe_path(char *result, char *bnp)
{
// Get executable path, basename
+#if !defined(__FreeBSD__)
int len = readlink("/proc/self/exe", result, BCTEXTLEN-1);
int len = readlink("/proc/self/exe", result, BCTEXTLEN-1);
+#else
+ char exe_path[BCTEXTLEN];
+ sprintf(exe_path,"/proc/%d/file",getpid());
+ int len = readlink(exe_path, result, BCTEXTLEN-1);
+#endif
+
if( len >= 0 ) {
result[len] = 0;
char *ptr = strrchr(result, '/');
if( len >= 0 ) {
result[len] = 0;
char *ptr = strrchr(result, '/');