X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffilempeg.C;h=da71349eda56ffce786fb46fde187324e15d54fd;hb=34dd3a28727fc230ba5abbed50766d671a2b8055;hp=4617fe3f5b6f160e69d38072c48037feb2f5e5ba;hpb=48c313de28fe6d39d9431dbe2dca6ffb176541ff;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/filempeg.C b/cinelerra-5.1/cinelerra/filempeg.C index 4617fe3f..da71349e 100644 --- a/cinelerra-5.1/cinelerra/filempeg.C +++ b/cinelerra-5.1/cinelerra/filempeg.C @@ -105,10 +105,8 @@ FileMPEG::~FileMPEG() } void FileMPEG::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(audio_options && asset->format == FILE_AMPEG) { @@ -776,6 +774,7 @@ int FileMPEG::skim_video(int track, void *vp, skim_fn fn) +#ifdef HAVE_COMMERCIAL int FileMPEG::toc_nail(void *vp, int track) { File *file = (File *)vp; @@ -786,11 +785,11 @@ int FileMPEG::toc_nail(void *vp, int track) if( mpeg->get_video_info(track, pid, framerate, width, height) ) return 1; if( pid < 0 || framerate <= 0 ) return 1; double position = framenum / framerate; -//printf("t%d/%03x f"_LD", %dx%d %dx%d\n",track,pid,framenum,mw,mh,width,height); +//printf("t%d/%03x f%jd, %dx%d %dx%d\n",track,pid,framenum,mw,mh,width,height); MWindow::commercials->get_frame(file, pid, position, tdat, mw, mh, width, height); return 0; } - +#endif int FileMPEG::create_toc(char *toc_path) { @@ -818,11 +817,13 @@ int FileMPEG::create_toc(char *toc_path) // File needs a table of contents. struct timeval new_time, prev_time, start_time, current_time; gettimeofday(&prev_time, 0); gettimeofday(&start_time, 0); +#ifdef HAVE_COMMERCIAL if( file->preferences->scan_commercials ) { set_skimming(-1, 1, toc_nail, file); if( MWindow::commercials->resetDb() != 0 ) eprintf(_("cant access commercials database")); } +#endif // This gets around the fact that MWindowGUI may be locked. char progress_title[BCTEXTLEN]; sprintf(progress_title, _("Creating %s\n"), toc_file); @@ -866,10 +867,12 @@ int FileMPEG::create_toc(char *toc_path) } } +#ifdef HAVE_COMMERCIAL if( file->preferences->scan_commercials ) { if( !result ) MWindow::commercials->write_ads(asset->path); MWindow::commercials->closeDb(); } +#endif mpeg3_stop_toc(fd); fd = 0;