X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffile.C;h=13e1b457463a2876c411725d4c6ad2ff700c9336;hb=502b6f3b6fd04f6b01c6d70dcb81aa304dd0db1c;hp=67b731de35a23af6c0e255b8de0ad0fad8fae56c;hpb=efc8fa7dc7ddcdeaa9398e09d81975a6ccf526fc;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/file.C b/cinelerra-5.1/cinelerra/file.C index 67b731de..13e1b457 100644 --- a/cinelerra-5.1/cinelerra/file.C +++ b/cinelerra-5.1/cinelerra/file.C @@ -165,24 +165,21 @@ int File::get_options(FormatTools *format, int audio_options, int video_options) { BC_WindowBase *parent_window = format->window; - //ArrayList *plugindb = format->plugindb; Asset *asset = format->asset; - + EDL *edl = format->mwindow ? format->mwindow->edl : 0; format_window = 0; getting_options = 1; format_completion->lock("File::get_options"); switch( asset->format ) { - case FILE_AC3: - FileAC3::get_parameters(parent_window, - asset, - format_window, - audio_options, - video_options); +#ifdef HAVE_CIN_3RDPARTY + case FILE_AC3: FileAC3::get_parameters(parent_window, asset, format_window, + audio_options, video_options, edl); break; +#endif #ifdef HAVE_DV case FILE_RAWDV: FileDV::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; #endif case FILE_PCM: @@ -191,56 +188,58 @@ int File::get_options(FormatTools *format, case FILE_AIFF: case FILE_SND: FileSndFile::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_FFMPEG: FileFFMPEG::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; +#ifdef HAVE_LIBZMPEG case FILE_AMPEG: case FILE_VMPEG: FileMPEG::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; +#endif case FILE_JPEG: case FILE_JPEG_LIST: FileJPEG::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; #ifdef HAVE_OPENEXR case FILE_EXR: case FILE_EXR_LIST: FileEXR::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; #endif case FILE_FLAC: FileFLAC::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_PNG: case FILE_PNG_LIST: FilePNG::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_PPM: case FILE_PPM_LIST: FilePPM::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_TGA: case FILE_TGA_LIST: FileTGA::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_TIFF: case FILE_TIFF_LIST: FileTIFF::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_OGG: FileOGG::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; default: break; @@ -267,13 +266,23 @@ int File::get_options(FormatTools *format, return 0; } - - - - - - - +int File::can_scale_input(Asset *asset) +{ + switch( asset->format ) { + case FILE_MPEG: + case FILE_FFMPEG: + return 1; + case FILE_EXR: + case FILE_JPEG: + case FILE_PNG: + case FILE_PPM: + case FILE_TGA: + case FILE_TIFF: + if( asset->video_length < 0 ) + return 1; + } + return 0; +} int File::set_processors(int cpus) // Set the number of cpus for certain codecs @@ -381,11 +390,13 @@ int File::probe() file = new FileFFMPEG(this->asset, this); return FILE_OK; } +#ifdef HAVE_COMMERCIAL if( !strcmp(pref->name,"DB") ) { // MediaDB if( !FileDB::check_sig(this->asset) ) continue; file = new FileDB(this->asset, this); return FILE_OK; } +#endif if( !strcmp(pref->name,"Scene") ) { // scene file if( !FileScene::check_sig(this->asset, data)) continue; file = new FileScene(this->asset, this); @@ -460,11 +471,13 @@ int File::probe() file = new FileVorbis(this->asset, this); return FILE_OK; } +#ifdef HAVE_LIBZMPEG if( !strcmp(pref->name,"MPEG") ) { // MPEG file if( !FileMPEG::check_sig(this->asset) ) continue; file = new FileMPEG(this->asset, this); return FILE_OK; } +#endif if( !strcmp(pref->name,"EDL") ) { // XML file if( data[0] != '<' ) continue; if( !strncmp(&data[1],"EDL>",4) || @@ -500,10 +513,11 @@ int File::open_file(Preferences *preferences, if( ret != FILE_OK ) return ret; break; } // format already determined +#ifdef HAVE_CIN_3RDPARTY case FILE_AC3: file = new FileAC3(this->asset, this); break; - +#endif case FILE_SCENE: file = new FileScene(this->asset, this); break; @@ -564,17 +578,19 @@ int File::open_file(Preferences *preferences, case FILE_TIFF_LIST: file = new FileTIFF(this->asset, this); break; - +#ifdef HAVE_COMMERCIAL case FILE_DB: file = new FileDB(this->asset, this); break; +#endif +#ifdef HAVE_LIBZMPEG case FILE_MPEG: case FILE_AMPEG: case FILE_VMPEG: file = new FileMPEG(this->asset, this); break; - +#endif case FILE_OGG: file = new FileOGG(this->asset, this); break; @@ -1269,7 +1285,9 @@ const char* File::formattostr(int format) case FILE_FLAC: return _(FLAC_NAME); case FILE_EXR: return _(EXR_NAME); case FILE_EXR_LIST: return _(EXR_LIST_NAME); +#ifdef HAVE_LIBZMPEG case FILE_MPEG: return _(MPEG_NAME); +#endif case FILE_AMPEG: return _(AMPEG_NAME); case FILE_VMPEG: return _(VMPEG_NAME); case FILE_TGA: return _(TGA_NAME); @@ -1351,7 +1369,9 @@ int File::get_best_colormodel(Asset *asset, int driver) #ifdef HAVE_DV case FILE_RAWDV: return FileDV::get_best_colormodel(asset, driver); #endif +#ifdef HAVE_LIBZMPEG case FILE_MPEG: return FileMPEG::get_best_colormodel(asset, driver); +#endif case FILE_JPEG: case FILE_JPEG_LIST: return FileJPEG::get_best_colormodel(asset, driver); #ifdef HAVE_OPENEXR @@ -1366,7 +1386,9 @@ int File::get_best_colormodel(Asset *asset, int driver) case FILE_TGA_LIST: return FileTGA::get_best_colormodel(asset, driver); case FILE_CR2: case FILE_CR2_LIST: return FileCR2::get_best_colormodel(asset, driver); +#ifdef HAVE_COMMERCIAL case FILE_DB: return FileDB::get_best_colormodel(asset, driver); +#endif case FILE_FFMPEG: return FileFFMPEG::get_best_colormodel(asset, driver); } @@ -1430,7 +1452,7 @@ int File::renders_video(int format) int File::renders_video(Asset *asset) { return asset->format == FILE_FFMPEG ? - FileFFMPEG::renders_video(asset->fformat) : + FFMPEG::renders_video(asset->fformat) : renders_video(asset->format); } @@ -1456,7 +1478,7 @@ int File::renders_audio(int format) int File::renders_audio(Asset *asset) { return asset->format == FILE_FFMPEG ? - FileFFMPEG::renders_audio(asset->fformat) : + FFMPEG::renders_audio(asset->fformat) : renders_audio(asset->format); }