projects
/
goodguy
/
history.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
328cb78
)
mods to ffmpeg default codec param strategy
author
Good Guy
<good1.2guy@gmail.com>
Sun, 28 Jun 2015 16:34:12 +0000
(10:34 -0600)
committer
Good Guy
<good1.2guy@gmail.com>
Sun, 28 Jun 2015 16:34:12 +0000
(10:34 -0600)
12 files changed:
cinelerra-5.0/cinelerra/ffmpeg.h
patch
|
blob
|
history
cinelerra-5.0/cinelerra/fileffmpeg.C
patch
|
blob
|
history
cinelerra-5.0/cinelerra/formatpopup.C
patch
|
blob
|
history
cinelerra-5.0/cinelerra/formattools.C
patch
|
blob
|
history
cinelerra-5.0/ffmpeg/audio/dvd.dfl
[moved from
cinelerra-5.0/ffmpeg/audio/dvd
with 100% similarity]
patch
|
blob
|
history
cinelerra-5.0/ffmpeg/audio/mp3.dfl
[moved from
cinelerra-5.0/ffmpeg/audio/mp3
with 100% similarity]
patch
|
blob
|
history
cinelerra-5.0/ffmpeg/audio/mp4.dfl
[moved from
cinelerra-5.0/ffmpeg/audio/mp4
with 100% similarity]
patch
|
blob
|
history
cinelerra-5.0/ffmpeg/audio/qt.dfl
[moved from
cinelerra-5.0/ffmpeg/audio/qt
with 100% similarity]
patch
|
blob
|
history
cinelerra-5.0/ffmpeg/video/dvd.dfl
[moved from
cinelerra-5.0/ffmpeg/video/dvd
with 100% similarity]
patch
|
blob
|
history
cinelerra-5.0/ffmpeg/video/mp4.dfl
[moved from
cinelerra-5.0/ffmpeg/video/mp4
with 100% similarity]
patch
|
blob
|
history
cinelerra-5.0/ffmpeg/video/mpeg.dfl
[moved from
cinelerra-5.0/ffmpeg/video/mpeg
with 100% similarity]
patch
|
blob
|
history
cinelerra-5.0/ffmpeg/video/qt.dfl
[moved from
cinelerra-5.0/ffmpeg/video/qt
with 100% similarity]
patch
|
blob
|
history
diff --git
a/cinelerra-5.0/cinelerra/ffmpeg.h
b/cinelerra-5.0/cinelerra/ffmpeg.h
index 003d55836e9037d43001b0d86781090b5c57d7da..41941e730e61f50e449cadf2ddd2e0dcf3405ce5 100644
(file)
--- a/
cinelerra-5.0/cinelerra/ffmpeg.h
+++ b/
cinelerra-5.0/cinelerra/ffmpeg.h
@@
-232,9
+232,9
@@
public:
static void set_option_path(char *path, const char *fmt, ...);
static void get_option_path(char *path, const char *type, const char *spec);
static void set_option_path(char *path, const char *fmt, ...);
static void get_option_path(char *path, const char *type, const char *spec);
- int get_format(char *format, const char *path, char *spec);
+ static int get_format(char *format, const char *path, char *spec);
+ static int scan_option_line(char *cp,char *tag,char *val);
int get_file_format();
int get_file_format();
- int scan_option_line(char *cp,char *tag,char *val);
int get_encoder(const char *options,
char *format, char *codec, char *bsfilter, char *bsargs);
int get_encoder(FILE *fp,
int get_encoder(const char *options,
char *format, char *codec, char *bsfilter, char *bsargs);
int get_encoder(FILE *fp,
diff --git
a/cinelerra-5.0/cinelerra/fileffmpeg.C
b/cinelerra-5.0/cinelerra/fileffmpeg.C
index fdcf3297e6230916ec19b7810b6c10ca3125e516..12b8b839e520936231e938c3fb0f53443c352edf 100644
(file)
--- a/
cinelerra-5.0/cinelerra/fileffmpeg.C
+++ b/
cinelerra-5.0/cinelerra/fileffmpeg.C
@@
-350,16
+350,15
@@
void FFMPEGConfigAudio::create_objects()
FileSystem fs;
char option_path[BCTEXTLEN];
FileSystem fs;
char option_path[BCTEXTLEN];
- FFMPEG::set_option_path(option_path, "
/
audio");
+ FFMPEG::set_option_path(option_path, "audio");
fs.update(option_path);
int total_files = fs.total_files();
for(int i = 0; i < total_files; i++) {
const char *name = fs.get_entry(i)->get_name();
if( asset->fformat[0] != 0 ) {
const char *ext = strrchr(name,'.');
fs.update(option_path);
int total_files = fs.total_files();
for(int i = 0; i < total_files; i++) {
const char *name = fs.get_entry(i)->get_name();
if( asset->fformat[0] != 0 ) {
const char *ext = strrchr(name,'.');
- if( !ext ) ext = name;
- else if( !strcmp("opts", ++ext) ) continue;
- if( strcmp(asset->fformat, ext) ) continue;
+ if( !ext ) continue;
+ if( strcmp(asset->fformat, ++ext) ) continue;
}
presets.append(new BC_ListBoxItem(name));
}
}
presets.append(new BC_ListBoxItem(name));
}
@@
-494,9
+493,8
@@
void FFMPEGConfigVideo::create_objects()
const char *name = fs.get_entry(i)->get_name();
if( asset->fformat[0] != 0 ) {
const char *ext = strrchr(name,'.');
const char *name = fs.get_entry(i)->get_name();
if( asset->fformat[0] != 0 ) {
const char *ext = strrchr(name,'.');
- if( !ext ) ext = name;
- else if( !strcmp("opts", ++ext) ) continue;
- if( strcmp(asset->fformat, ext) ) continue;
+ if( !ext ) continue;
+ if( strcmp(asset->fformat, ++ext) ) continue;
}
presets.append(new BC_ListBoxItem(name));
}
}
presets.append(new BC_ListBoxItem(name));
}
diff --git
a/cinelerra-5.0/cinelerra/formatpopup.C
b/cinelerra-5.0/cinelerra/formatpopup.C
index 559385189e31e4364b8774daf258fab8e2dd1c9c..968444bf08bdc32a34103f4f3b523017b487a8e4 100644
(file)
--- a/
cinelerra-5.0/cinelerra/formatpopup.C
+++ b/
cinelerra-5.0/cinelerra/formatpopup.C
@@
-104,7
+104,7
@@
FFMPEGPopup::FFMPEGPopup(ArrayList<PluginServer*> *plugindb, int x, int y)
void FFMPEGPopup::create_objects()
{
void FFMPEGPopup::create_objects()
{
- static const char *dirs[] = { "
/audio", "/
video", };
+ static const char *dirs[] = { "
audio", "
video", };
for( int i=0; i<(int)(sizeof(dirs)/sizeof(dirs[0])); ++i ) {
FileSystem fs;
char option_path[BCTEXTLEN];
for( int i=0; i<(int)(sizeof(dirs)/sizeof(dirs[0])); ++i ) {
FileSystem fs;
char option_path[BCTEXTLEN];
@@
-114,8
+114,9
@@
void FFMPEGPopup::create_objects()
for( int j=0; j<total_files; ++j ) {
const char *name = fs.get_entry(j)->get_name();
const char *ext = strrchr(name,'.');
for( int j=0; j<total_files; ++j ) {
const char *name = fs.get_entry(j)->get_name();
const char *ext = strrchr(name,'.');
- if( !ext ) ext = name;
- else if( !strcmp("opts", ++ext) ) continue;
+ if( !ext ) continue;
+ if( !strcmp("dfl", ++ext) ) continue;
+ if( !strcmp("opts", ext) ) continue;
int k = ffmpeg_types.size();
while( --k >= 0 && strcmp(ffmpeg_types[k]->get_text(), ext) );
if( k >= 0 ) continue;
int k = ffmpeg_types.size();
while( --k >= 0 && strcmp(ffmpeg_types[k]->get_text(), ext) );
if( k >= 0 ) continue;
diff --git
a/cinelerra-5.0/cinelerra/formattools.C
b/cinelerra-5.0/cinelerra/formattools.C
index a8f3f6bf85da74f0e2b7d4c76568d728d980e37d..d72ed4cdb5ca3e0a1179bbd60daab9cb09abd0c1 100644
(file)
--- a/
cinelerra-5.0/cinelerra/formattools.C
+++ b/
cinelerra-5.0/cinelerra/formattools.C
@@
-851,17
+851,16
@@
FormatFFMPEG::~FormatFFMPEG()
}
int FormatFFMPEG::load_defaults(const char *path, const char *type,
}
int FormatFFMPEG::load_defaults(const char *path, const char *type,
- char *codec, char *codec_options, int len)
+
char *codec, char *codec_options, int len)
{
char default_file[BCTEXTLEN];
{
char default_file[BCTEXTLEN];
- FFMPEG::set_option_path(default_file, "%s/%s", path, type);
+ FFMPEG::set_option_path(default_file, "%s/%s
.dfl
", path, type);
FILE *fp = fopen(default_file,"r");
if( !fp ) return 1;
FILE *fp = fopen(default_file,"r");
if( !fp ) return 1;
- char default_codec[BCSTRLEN];
- fgets(default_codec, sizeof(default_codec), fp);
+ fgets(codec, BCSTRLEN, fp);
fclose(fp);
fclose(fp);
- char *cp
=codec, *dp=default_
codec;
- while( *
dp && *dp!='\n' ) *cp++ = *dp++
;
+ char *cp
=
codec;
+ while( *
cp && *cp!='\n' ) ++cp
;
*cp = 0;
FFMPEG::set_option_path(default_file, "%s/%s", path, codec);
return FFMPEG::load_options(default_file, codec_options, len);
*cp = 0;
FFMPEG::set_option_path(default_file, "%s/%s", path, codec);
return FFMPEG::load_options(default_file, codec_options, len);
diff --git
a/cinelerra-5.0/ffmpeg/audio/dvd
b/cinelerra-5.0/ffmpeg/audio/dvd.dfl
similarity index 100%
rename from
cinelerra-5.0/ffmpeg/audio/dvd
rename to
cinelerra-5.0/ffmpeg/audio/dvd.dfl
diff --git
a/cinelerra-5.0/ffmpeg/audio/mp3
b/cinelerra-5.0/ffmpeg/audio/mp3.dfl
similarity index 100%
rename from
cinelerra-5.0/ffmpeg/audio/mp3
rename to
cinelerra-5.0/ffmpeg/audio/mp3.dfl
diff --git
a/cinelerra-5.0/ffmpeg/audio/mp4
b/cinelerra-5.0/ffmpeg/audio/mp4.dfl
similarity index 100%
rename from
cinelerra-5.0/ffmpeg/audio/mp4
rename to
cinelerra-5.0/ffmpeg/audio/mp4.dfl
diff --git
a/cinelerra-5.0/ffmpeg/audio/qt
b/cinelerra-5.0/ffmpeg/audio/qt.dfl
similarity index 100%
rename from
cinelerra-5.0/ffmpeg/audio/qt
rename to
cinelerra-5.0/ffmpeg/audio/qt.dfl
diff --git
a/cinelerra-5.0/ffmpeg/video/dvd
b/cinelerra-5.0/ffmpeg/video/dvd.dfl
similarity index 100%
rename from
cinelerra-5.0/ffmpeg/video/dvd
rename to
cinelerra-5.0/ffmpeg/video/dvd.dfl
diff --git
a/cinelerra-5.0/ffmpeg/video/mp4
b/cinelerra-5.0/ffmpeg/video/mp4.dfl
similarity index 100%
rename from
cinelerra-5.0/ffmpeg/video/mp4
rename to
cinelerra-5.0/ffmpeg/video/mp4.dfl
diff --git
a/cinelerra-5.0/ffmpeg/video/mpeg
b/cinelerra-5.0/ffmpeg/video/mpeg.dfl
similarity index 100%
rename from
cinelerra-5.0/ffmpeg/video/mpeg
rename to
cinelerra-5.0/ffmpeg/video/mpeg.dfl
diff --git
a/cinelerra-5.0/ffmpeg/video/qt
b/cinelerra-5.0/ffmpeg/video/qt.dfl
similarity index 100%
rename from
cinelerra-5.0/ffmpeg/video/qt
rename to
cinelerra-5.0/ffmpeg/video/qt.dfl