X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Findexfile.C;h=87b8853a28344ad1059a25b59be72910f08e2ac9;hp=aedbfbb8a12581ad21d7872c6ce0d12fc6ac5905;hb=7ffa6954689f14a41a3bae7a0fdb3f2abeaa9679;hpb=620f70a943c1f47880ec68a908aa03bf463e741f diff --git a/cinelerra-5.1/cinelerra/indexfile.C b/cinelerra-5.1/cinelerra/indexfile.C index aedbfbb8..87b8853a 100644 --- a/cinelerra-5.1/cinelerra/indexfile.C +++ b/cinelerra-5.1/cinelerra/indexfile.C @@ -70,19 +70,22 @@ #include #include +#ifdef HAVE_ISOFS #include +#endif // check for isofs volume_id for dvd/cdrom static int udf_volume_id(const char *path, char *fname) { + int result = 1; +#ifdef HAVE_ISOFS struct stat st; if( stat(path,&st) ) return 1; // search mounted devices FILE *fp = fopen("/proc/mounts","r"); if( !fp ) return 1; - int result = 1; while( result && !feof(fp) && !ferror(fp) ) { char devpath[BCTEXTLEN], mpath[BCTEXTLEN]; char options[BCTEXTLEN], line[BCTEXTLEN]; @@ -122,6 +125,7 @@ static int udf_volume_id(const char *path, char *fname) } fclose(fp); +#endif return result; } @@ -232,6 +236,15 @@ void IndexFile::delete_index(Preferences *preferences, remove_file(index_filename); } +void IndexFile::delete_index_files(Preferences *preferences, + Indexable *indexable) +{ + delete_index(preferences, indexable, ".toc"); + delete_index(preferences, indexable, ".idx"); + delete_index(preferences, indexable, ".mkr"); +} + + int IndexFile::open_file() { int result = 0; @@ -328,6 +341,11 @@ int IndexFile::open_source() FileSystem fs; asset->index_state->index_bytes = fs.get_size(asset->path); source_length = source->get_audio_length(); + int proxy_scale = asset->proxy_scale; + if( proxy_scale > 0 ) { + asset->width = asset->actual_width * proxy_scale; + asset->height = asset->actual_height * proxy_scale; + } } } else