projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fred (fwd render enb displ) play pref. info text tweak
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
formattools.C
diff --git
a/cinelerra-5.1/cinelerra/formattools.C
b/cinelerra-5.1/cinelerra/formattools.C
index 4f6580d4fa21628ed578a7059e2f343ebf932462..e8cbef4e8c38dda4260a54980cc799cb861bbe6b 100644
(file)
--- a/
cinelerra-5.1/cinelerra/formattools.C
+++ b/
cinelerra-5.1/cinelerra/formattools.C
@@
-62,9
+62,7
@@
FormatTools::FormatTools(MWindow *mwindow,
format_button = 0;
format_text = 0;
audio_title = 0;
format_button = 0;
format_text = 0;
audio_title = 0;
- audio_switch = 0;
video_title = 0;
video_title = 0;
- video_switch = 0;
channels_title = 0;
channels_button = 0;
multiple_files = 0;
channels_title = 0;
channels_button = 0;
multiple_files = 0;
@@
-339,17
+337,17
@@
void FormatTools::update_format()
{
if( do_audio && prompt_audio && audio_switch ) {
audio_switch->update(asset->audio_data);
{
if( do_audio && prompt_audio && audio_switch ) {
audio_switch->update(asset->audio_data);
- if( !asset->audio_data )
- audio_switch->disable();
- else
+ if( File::renders_audio(asset) )
audio_switch->enable();
audio_switch->enable();
+ else
+ audio_switch->disable();
}
if( do_video && prompt_video && video_switch ) {
video_switch->update(asset->video_data);
}
if( do_video && prompt_video && video_switch ) {
video_switch->update(asset->video_data);
- if( !asset->video_data )
- video_switch->disable();
- else
+ if( File::renders_video(asset) )
video_switch->enable();
video_switch->enable();
+ else
+ video_switch->disable();
}
if( asset->format == FILE_FFMPEG ) {
ffmpeg_type->show();
}
if( asset->format == FILE_FFMPEG ) {
ffmpeg_type->show();
@@
-453,11
+451,8
@@
void FormatTools::update(Asset *asset, int *strategy)
if(path_textbox)
path_textbox->update(asset->path);
if(path_textbox)
path_textbox->update(asset->path);
- format_text->update(File::formattostr(plugindb, asset->format));
- if(do_audio && prompt_audio && audio_switch)
- audio_switch->update(asset->audio_data);
- if(do_video && prompt_video && video_switch)
- video_switch->update(asset->video_data);
+ format_text->update(File::formattostr(asset->format));
+ update_format();
if(strategy)
{
multiple_files->update(strategy);
if(strategy)
{
multiple_files->update(strategy);
@@
-788,17
+783,18
@@
int FormatFormat::handle_event()
{
BC_ListBoxItem *selection = get_selection(0, 0);
if( selection ) {
{
BC_ListBoxItem *selection = get_selection(0, 0);
if( selection ) {
- int new_format = File::strtoformat(
format->plugindb,
get_selection(0, 0)->get_text());
+ int new_format = File::strtoformat(get_selection(0, 0)->get_text());
// if(new_format != format->asset->format)
{
Asset *asset = format->asset;
asset->format = new_format;
// if(new_format != format->asset->format)
{
Asset *asset = format->asset;
asset->format = new_format;
- asset->audio_data = File::
supports_audio(asset->forma
t);
- asset->video_data = File::
supports_video(asset->forma
t);
+ asset->audio_data = File::
renders_audio(asse
t);
+ asset->video_data = File::
renders_video(asse
t);
asset->ff_audio_options[0] = 0;
asset->ff_video_options[0] = 0;
format->format_text->update(selection->get_text());
asset->ff_audio_options[0] = 0;
asset->ff_video_options[0] = 0;
format->format_text->update(selection->get_text());
- format->update_extension();
+ if( !format->use_brender )
+ format->update_extension();
format->close_format_windows();
if (format->path_recent) format->path_recent->
load_items(File::formattostr(format->asset->format));
format->close_format_windows();
if (format->path_recent) format->path_recent->
load_items(File::formattostr(format->asset->format));