X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fasset.C;h=af87bdbb91750ed1f2dd9cac55d714c3ca9a21b1;hb=3ac8199743f244669cc87ceef9c3cd23710552f3;hp=3133649b9ae161077c3b1afdb49e8327452c9213;hpb=af2d680fc71d16363f7f7fb7e602cb0c30015ee5;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/asset.C b/cinelerra-5.1/cinelerra/asset.C index 3133649b..af87bdbb 100644 --- a/cinelerra-5.1/cinelerra/asset.C +++ b/cinelerra-5.1/cinelerra/asset.C @@ -88,7 +88,7 @@ int Asset::init_values() ff_video_options[0] = 0; ff_audio_bitrate = 0; ff_video_bitrate = 0; - ff_video_quality = 0; + ff_video_quality = -1; jpeg_quality = 80; aspect_ratio = -1; @@ -128,6 +128,7 @@ int Asset::init_values() ac3_bitrate = 128; png_use_alpha = 0; + exr_use_alpha = 0; exr_compression = 0; @@ -136,7 +137,6 @@ int Asset::init_values() use_header = 1; id = EDL::next_id(); - reset_timecode(); return 0; } @@ -175,17 +175,6 @@ void Asset::boundaries() //printf("Asset::boundaries %d %d %f\n", __LINE__, sample_rate, frame_rate); } -int Asset::reset_timecode() -{ - strcpy(reel_name, "cin0000"); - reel_number = 0; - tcstart = 0; - tcend = 0; - tcformat = 0; - - return 0; -} - void Asset::copy_from(Asset *asset, int do_index) { copy_location(asset); @@ -282,12 +271,6 @@ void Asset::copy_format(Asset *asset, int do_index) tiff_cmodel = asset->tiff_cmodel; tiff_compression = asset->tiff_compression; - - strcpy(reel_name, asset->reel_name); - reel_number = asset->reel_number; - tcstart = asset->tcstart; - tcend = asset->tcend; - tcformat = asset->tcformat; } int64_t Asset::get_index_offset(int channel) @@ -341,14 +324,14 @@ int Asset::equivalent(Asset &asset, int test_audio, int test_video, EDL *edl) delete [] cp; } } - if( strcmp(apath, tpath) ) result = 1; + if( strcmp(apath, tpath) ) result = 0; delete [] apath; delete [] tpath; delete [] out_path; } - if(result && format == FILE_FFMPEG) - result = !strcmp(fformat, asset.fformat); + if(result && format == FILE_FFMPEG && strcmp(fformat, asset.fformat) ) + result = 0; if(test_audio && result) { @@ -377,12 +360,7 @@ int Asset::equivalent(Asset &asset, int test_audio, int test_video, EDL *edl) interlace_fixmethod == asset.interlace_fixmethod && width == asset.width && height == asset.height && - !strcmp(vcodec, asset.vcodec) && - strcmp(reel_name, asset.reel_name) == 0 && - reel_number == asset.reel_number && - tcstart == asset.tcstart && - tcend == asset.tcend && - tcformat == asset.tcformat); + !strcmp(vcodec, asset.vcodec)); if(result && format == FILE_FFMPEG) result = !strcmp(ff_video_options, asset.ff_video_options) && ff_video_bitrate == asset.ff_video_bitrate && @@ -507,13 +485,6 @@ int Asset::read_audio(FileXML *file) audio_length = file->tag.get_property("AUDIO_LENGTH", (int64_t)0); acodec[0] = 0; file->tag.get_property("ACODEC", acodec); - - if(!video_data) - { - tcstart = 0; - tcend = audio_length; - tcformat = 0; - } return 0; } @@ -545,12 +516,6 @@ int Asset::read_video(FileXML *file) ilacefixmethod_to_xmltext(string, ILACE_FIXMETHOD_NONE); interlace_fixmethod = ilacefixmethod_from_xmltext(file->tag.get_property("INTERLACE_FIXMETHOD",string), ILACE_FIXMETHOD_NONE); - file->tag.get_property("REEL_NAME", reel_name); - reel_number = file->tag.get_property("REEL_NUMBER", reel_number); - tcstart = file->tag.get_property("TCSTART", tcstart); - tcend = file->tag.get_property("TCEND", tcend); - tcformat = file->tag.get_property("TCFORMAT", tcformat); - return 0; } @@ -706,13 +671,6 @@ int Asset::write_video(FileXML *file) ilacefixmethod_to_xmltext(string, interlace_fixmethod); file->tag.set_property("INTERLACE_FIXMETHOD", string); - - file->tag.set_property("REEL_NAME", reel_name); - file->tag.set_property("REEL_NUMBER", reel_number); - file->tag.set_property("TCSTART", tcstart); - file->tag.set_property("TCEND", tcend); - file->tag.set_property("TCFORMAT", tcformat); - file->append_tag(); if(video_data) file->tag.set_title("/VIDEO"); @@ -867,12 +825,6 @@ void Asset::load_defaults(BC_Hash *defaults, tiff_cmodel = GET_DEFAULT("TIFF_CMODEL", tiff_cmodel); tiff_compression = GET_DEFAULT("TIFF_COMPRESSION", tiff_compression); - GET_DEFAULT("REEL_NAME", reel_name); - reel_number = GET_DEFAULT("REEL_NUMBER", reel_number); - tcstart = GET_DEFAULT("TCSTART", tcstart); - tcend = GET_DEFAULT("TCEND", tcend); - tcformat = GET_DEFAULT("TCFORMAT", tcformat); - boundaries(); } @@ -992,12 +944,6 @@ void Asset::save_defaults(BC_Hash *defaults, UPDATE_DEFAULT("SINGLE_FRAME", single_frame); } - - UPDATE_DEFAULT("REEL_NAME", reel_name); - UPDATE_DEFAULT("REEL_NUMBER", reel_number); - UPDATE_DEFAULT("TCSTART", tcstart); - UPDATE_DEFAULT("TCEND", tcend); - UPDATE_DEFAULT("TCFORMAT", tcformat); } @@ -1031,11 +977,7 @@ int Asset::dump(FILE *fp) " height %d vcodec %4.4s aspect_ratio %f ilace_mode %s\n", video_data, layers, program, frame_rate, width, height, vcodec, aspect_ratio,string); - fprintf(fp," reel_name %s reel_number %i tcstart %jd tcend %jd tcf %d\n", - reel_name, reel_number, tcstart, tcend, tcformat); fprintf(fp," video_length %jd repeat %d\n", video_length, single_frame); - - return 0; } @@ -1114,23 +1056,3 @@ double Asset::total_length_framealigned(double fps) return 0; } -int Asset::set_timecode(char *tc, int format, int end) -{ - int hr, min, sec; - - hr = ((int) tc[0] - 48) * 10 + (int) tc[1] - 48; - min = ((int) tc[3] - 48) * 10 + (int) tc[4] - 48; - sec = ((int) tc[6] - 48) * 10 + (int) tc[7] - 48; - - // This needs to be modified to handle drop-frame - - if(end) - tcend = (int64_t) (((hr * 3600) + (min * 60) + sec) * frame_rate); - else - tcstart = (int64_t) (((hr * 3600) + (min * 60) + sec) * frame_rate); - - tcformat = format; - return 0; -} - -