From 190b4810ec184c74ceab3fcd6faf09a91c92c53c Mon Sep 17 00:00:00 2001 From: Good Guy Date: Thu, 7 Apr 2016 13:17:16 -0600 Subject: [PATCH] rework index builder, add pro ffmpeg format --- cinelerra-5.1/cinelerra/assetedit.C | 2 +- cinelerra-5.1/cinelerra/awindowmenu.C | 7 - cinelerra-5.1/cinelerra/ffmpeg.C | 15 +- cinelerra-5.1/cinelerra/file.C | 8 +- cinelerra-5.1/cinelerra/file.h | 4 +- cinelerra-5.1/cinelerra/fileac3.C | 4 +- cinelerra-5.1/cinelerra/fileac3.h | 4 +- cinelerra-5.1/cinelerra/filebase.h | 4 +- cinelerra-5.1/cinelerra/fileffmpeg.C | 56 ++- cinelerra-5.1/cinelerra/fileffmpeg.h | 11 +- cinelerra-5.1/cinelerra/filempeg.C | 327 +++++++++--------- cinelerra-5.1/cinelerra/filempeg.h | 7 +- cinelerra-5.1/cinelerra/formattools.C | 4 + cinelerra-5.1/cinelerra/indexfile.C | 2 +- cinelerra-5.1/cinelerra/indexstate.C | 1 - cinelerra-5.1/cinelerra/mainindexes.C | 160 ++------- cinelerra-5.1/cinelerra/mainmenu.C | 2 +- cinelerra-5.1/cinelerra/mainprogress.C | 6 +- cinelerra-5.1/cinelerra/mwindow.C | 30 +- cinelerra-5.1/cinelerra/preferences.C | 14 +- cinelerra-5.1/cinelerra/render.C | 31 +- cinelerra-5.1/ffmpeg/audio/acc256k.pro | 3 + cinelerra-5.1/ffmpeg/audio/pro.dfl | 1 + cinelerra-5.1/ffmpeg/video/med422p10.pro | 3 + cinelerra-5.1/ffmpeg/video/pro.dfl | 1 + cinelerra-5.1/guicast/filesystem.C | 2 +- cinelerra-5.1/plugins/delayaudio/delayaudio.C | 7 +- cinelerra-5.1/plugins/denoise/denoise.C | 7 +- cinelerra-5.1/plugins/flip/flipwindow.C | 4 +- .../plugins/freezeframe/freezeframe.C | 7 +- .../plugins/huesaturation/huesaturation.C | 3 +- cinelerra-5.1/plugins/reframert/reframert.C | 7 +- .../plugins/reverseaudio/reverseaudio.C | 7 +- cinelerra-5.1/plugins/rgb601/rgb601window.C | 7 +- cinelerra-5.1/plugins/scale/scalewin.C | 3 +- cinelerra-5.1/plugins/sharpen/sharpenwindow.C | 3 +- cinelerra-5.1/plugins/unsharp/unsharpwindow.C | 7 +- cinelerra-5.1/plugins/wave/wave.C | 9 +- 38 files changed, 308 insertions(+), 472 deletions(-) create mode 100644 cinelerra-5.1/ffmpeg/audio/acc256k.pro create mode 100644 cinelerra-5.1/ffmpeg/audio/pro.dfl create mode 100644 cinelerra-5.1/ffmpeg/video/med422p10.pro create mode 100644 cinelerra-5.1/ffmpeg/video/pro.dfl diff --git a/cinelerra-5.1/cinelerra/assetedit.C b/cinelerra-5.1/cinelerra/assetedit.C index 92e70a2a..eb76149b 100644 --- a/cinelerra-5.1/cinelerra/assetedit.C +++ b/cinelerra-5.1/cinelerra/assetedit.C @@ -154,7 +154,7 @@ void AssetEdit::handle_close_event(int result) // happening when new_asset was created but not be happening anymore. if(asset) { - mwindow->remove_asset_from_caches(asset); + mwindow->remove_asset_from_caches(asset); //printf("AssetEdit::handle_close_event %d %f\n", __LINE__, asset->get_frame_rate()); asset->copy_from(changed_params, 0); //printf("AssetEdit::handle_close_event %d %d %d\n", __LINE__, changed_params->bits, asset->bits); diff --git a/cinelerra-5.1/cinelerra/awindowmenu.C b/cinelerra-5.1/cinelerra/awindowmenu.C index 8ab3ebb0..3aacf321 100644 --- a/cinelerra-5.1/cinelerra/awindowmenu.C +++ b/cinelerra-5.1/cinelerra/awindowmenu.C @@ -86,16 +86,13 @@ int AssetListFormat::handle_event() switch(session->assetlist_format) { case ASSETS_TEXT: session->assetlist_format = ASSETS_ICONS; - session->folderlist_format = FOLDERS_ICONS; break; case ASSETS_ICONS: session->assetlist_format = ASSETS_TEXT; - session->folderlist_format = FOLDERS_TEXT; break; } agui->asset_list->update_format(session->assetlist_format, 1); - agui->folder_list->update_format(session->folderlist_format, 1); if (!mwindow->awindow->gui->allow_iconlisting) { mwindow->edl->session->assetlist_format = ASSETS_TEXT; } @@ -168,17 +165,13 @@ int FolderListFormat::handle_event() switch(mwindow->edl->session->folderlist_format) { case FOLDERS_TEXT: - mwindow->edl->session->assetlist_format = ASSETS_ICONS; mwindow->edl->session->folderlist_format = FOLDERS_ICONS; break; case FOLDERS_ICONS: - mwindow->edl->session->assetlist_format = ASSETS_TEXT; mwindow->edl->session->folderlist_format = FOLDERS_TEXT; break; } - mwindow->awindow->gui->asset_list->update_format( - mwindow->edl->session->folderlist_format, 1); mwindow->awindow->gui->folder_list->update_format( mwindow->edl->session->folderlist_format, 1); menu->update_titles(); diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 68a13158..64acfe2b 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -706,6 +706,7 @@ int FFAudioStream::encode_frame(AVPacket *pkt, AVFrame *frame, int &got_packet) void FFAudioStream::load_markers() { IndexState *index_state = ffmpeg->file_base->asset->index_state; + if( index_state->marker_status == MARKERS_NOTTESTED ) return; if( !index_state || idx >= index_state->audio_markers.size() ) return; FFStream::load_markers(*index_state->audio_markers[idx], sample_rate); } @@ -1219,12 +1220,14 @@ void FFMPEG::set_asset_format(Asset *asset, const char *text) { if( asset->format != FILE_FFMPEG ) return; strcpy(asset->fformat, text); - strcpy(asset->ff_audio_options, ""); - strcpy(asset->ff_video_options, ""); - asset->audio_data = !load_defaults("audio", text, asset->acodec, - asset->ff_audio_options, sizeof(asset->ff_audio_options)); - asset->video_data = !load_defaults("video", text, asset->vcodec, - asset->ff_video_options, sizeof(asset->ff_video_options)); + if( !asset->ff_audio_options[0] ) { + asset->audio_data = !load_defaults("audio", text, asset->acodec, + asset->ff_audio_options, sizeof(asset->ff_audio_options)); + } + if( !asset->ff_video_options[0] ) { + asset->video_data = !load_defaults("video", text, asset->vcodec, + asset->ff_video_options, sizeof(asset->ff_video_options)); + } } int FFMPEG::get_encoder(const char *options, diff --git a/cinelerra-5.1/cinelerra/file.C b/cinelerra-5.1/cinelerra/file.C index f5932e3e..97656925 100644 --- a/cinelerra-5.1/cinelerra/file.C +++ b/cinelerra-5.1/cinelerra/file.C @@ -65,6 +65,7 @@ #include "formattools.h" #include "framecache.h" #include "language.h" +#include "mainprogress.inc" #include "mutex.h" #include "mwindow.h" #include "packagingengine.h" @@ -710,12 +711,9 @@ int File::close_file(int ignore_thread) -int File::get_index(char *index_path) +int File::get_index(IndexFile *index_file, MainProgressBar *progress_bar) { - if(file) { - return file->get_index(index_path); - } - return 1; + return !file ? -1 : file->get_index(index_file, progress_bar); } diff --git a/cinelerra-5.1/cinelerra/file.h b/cinelerra-5.1/cinelerra/file.h index b8108492..5231a9b3 100644 --- a/cinelerra-5.1/cinelerra/file.h +++ b/cinelerra-5.1/cinelerra/file.h @@ -37,6 +37,8 @@ #include "formattools.h" #include "framecache.inc" #include "guicast.h" +#include "indexfile.inc" +#include "mainprogress.inc" #include "mutex.inc" #include "packagingengine.inc" #include "pluginserver.inc" @@ -97,7 +99,7 @@ public: int wr); // Get index from the file if one exists. Returns 0 on success. - int get_index(char *index_path); + int get_index(IndexFile *index_file, MainProgressBar *progress_bar); // start a thread for writing to avoid blocking during record int start_audio_thread(int buffer_size, int ring_buffers); diff --git a/cinelerra-5.1/cinelerra/fileac3.C b/cinelerra-5.1/cinelerra/fileac3.C index e6598796..5d14e713 100644 --- a/cinelerra-5.1/cinelerra/fileac3.C +++ b/cinelerra-5.1/cinelerra/fileac3.C @@ -210,9 +210,9 @@ int FileAC3::read_samples(double *buffer, int64_t len) return !mpg_file ? 0 : mpg_file->read_samples(buffer, len); } -int FileAC3::get_index(char *index_path) +int FileAC3::get_index(IndexFile *index_file, MainProgressBar *progress_bar) { - return !mpg_file ? 1 : mpg_file->get_index(index_path); + return !mpg_file ? 1 : mpg_file->get_index(index_file, progress_bar); } // Channel conversion matrices because ffmpeg encodes a diff --git a/cinelerra-5.1/cinelerra/fileac3.h b/cinelerra-5.1/cinelerra/fileac3.h index ab9544ef..c2a30b28 100644 --- a/cinelerra-5.1/cinelerra/fileac3.h +++ b/cinelerra-5.1/cinelerra/fileac3.h @@ -32,6 +32,8 @@ extern "C" { #include "filebase.h" #include "filempeg.inc" +#include "indexfile.inc" +#include "mainprogress.inc" class FileAC3 : public FileBase @@ -52,7 +54,7 @@ public: int close_file(); int read_samples(double *buffer, int64_t len); int write_samples(double **buffer, int64_t len); - int get_index(char *index_path); + int get_index(IndexFile *index_file, MainProgressBar *progress_bar); private: AVCodec *codec; diff --git a/cinelerra-5.1/cinelerra/filebase.h b/cinelerra-5.1/cinelerra/filebase.h index db9e5b06..3555e1e2 100644 --- a/cinelerra-5.1/cinelerra/filebase.h +++ b/cinelerra-5.1/cinelerra/filebase.h @@ -30,6 +30,8 @@ #include "guicast.h" #include "file.inc" #include "filelist.inc" +#include "indexfile.inc" +#include "mainprogress.inc" #include "overlayframe.inc" #include "strategies.inc" #include "vframe.inc" @@ -69,7 +71,7 @@ public: - virtual int get_index(char *index_path) { return 1; } + virtual int get_index(IndexFile *index_file, MainProgressBar *progress_bar) { return -1; } virtual int check_header() { return 0; } // Test file to see if it is of this type. virtual int reset_parameters_derived() { return 0; } virtual int read_header() { return 1; } // WAV files for getting header diff --git a/cinelerra-5.1/cinelerra/fileffmpeg.C b/cinelerra-5.1/cinelerra/fileffmpeg.C index e311b25d..ab856af0 100644 --- a/cinelerra-5.1/cinelerra/fileffmpeg.C +++ b/cinelerra-5.1/cinelerra/fileffmpeg.C @@ -9,7 +9,6 @@ #include "asset.h" #include "bcwindowbase.h" -#include "bcprogressbox.h" #include "bitspopup.h" #include "ffmpeg.h" #include "filebase.h" @@ -17,6 +16,7 @@ #include "fileffmpeg.h" #include "filesystem.h" #include "indexfile.h" +#include "mainprogress.h" #include "mutex.h" #include "preferences.h" #include "videodevice.inc" @@ -596,15 +596,17 @@ int FFMPEGConfigVideoToggle::handle_event() return 1; } -FFMPEGScanProgress::FFMPEGScanProgress(const char *title, int64_t length, int64_t *position, int *canceled) +FFMPEGScanProgress::FFMPEGScanProgress(IndexFile *index_file, MainProgressBar *progress_bar, + const char *title, int64_t length, int64_t *position, int *canceled) : Thread(1, 0, 0) { + this->index_file = index_file; + this->progress_bar = progress_bar; strcpy(this->progress_title, title); this->length = length; this->position = position; this->canceled = canceled; done = 0; - progress = 0; start(); } @@ -617,42 +619,22 @@ FFMPEGScanProgress::~FFMPEGScanProgress() void FFMPEGScanProgress::run() { - BC_ProgressBox *progress = new BC_ProgressBox(-1, -1, progress_title, length); - progress->start(); - - struct timeval start_time, now, then; - gettimeofday(&start_time, 0); - then = start_time; - while( !done ) { - if( progress->update(*position, 1) ) { + if( progress_bar->update(*position) ) { *canceled = done = 1; break; } - gettimeofday(&now, 0); - if(now.tv_sec - then.tv_sec >= 1) { - int64_t elapsed = now.tv_sec - start_time.tv_sec; - int64_t byte_rate = *position / elapsed; - int64_t eta = !byte_rate ? 0 : (length - *position) / byte_rate; - char string[BCTEXTLEN]; - sprintf(string, "%s\nETA: %jdm%jds", - progress_title, eta / 60, eta % 60); - progress->update_title(string, 1); - then = now; - } + index_file->redraw_edits(0); usleep(500000); } - - progress->stop_progress(); - delete progress; } -int FileFFMPEG::get_index(char *index_path) +int FileFFMPEG::get_index(IndexFile *index_file, MainProgressBar *progress_bar) { if( !ff ) return -1; if( !file->preferences->ffmpeg_marker_indexes ) return 1; - IndexState *index_state = asset->index_state; + IndexState *index_state = index_file->get_state(); if( index_state->index_status != INDEX_NOTTESTED ) return 0; index_state->reset_index(); index_state->reset_markers(); @@ -663,21 +645,33 @@ int FileFFMPEG::get_index(char *index_path) index_state->add_audio_stream(aud->channels, aud->length); } - char progress_title[BCTEXTLEN]; - sprintf(progress_title, _("Creating %s\n"), index_path); FileSystem fs; int64_t file_bytes = fs.get_size(ff->fmt_ctx->filename); - int64_t scan_position = 0; + char *index_path = index_file->index_filename; + int canceled = 0; - FFMPEGScanProgress scan_progress(progress_title, file_bytes, &scan_position, &canceled); + int64_t scan_position = 0; + FFMPEGScanProgress *scan_progress = 0; + if( progress_bar ) { + char progress_title[BCTEXTLEN]; + sprintf(progress_title, _("Creating %s\n"), index_path); + progress_bar->update_title(progress_title, 1); + progress_bar->update_length(file_bytes); + scan_progress = new FFMPEGScanProgress(index_file, + progress_bar, progress_title, file_bytes, + &scan_position, &canceled); + } index_state->index_bytes = file_bytes; index_state->init_scan(file->preferences->index_size); + if( ff->scan(index_state, &scan_position, &canceled) || canceled ) { index_state->reset_index(); index_state->reset_markers(); return 1; } + + delete scan_progress; index_state->marker_status = MARKERS_READY; return index_state->create_index(index_path, asset); } diff --git a/cinelerra-5.1/cinelerra/fileffmpeg.h b/cinelerra-5.1/cinelerra/fileffmpeg.h index fe068d25..73a37489 100644 --- a/cinelerra-5.1/cinelerra/fileffmpeg.h +++ b/cinelerra-5.1/cinelerra/fileffmpeg.h @@ -3,10 +3,11 @@ #include "asset.inc" #include "bcwindowbase.inc" -#include "bcprogressbox.inc" #include "bitspopup.inc" #include "filebase.h" #include "fileffmpeg.inc" +#include "indexfile.inc" +#include "mainprogress.inc" #include "mutex.h" #include "thread.h" #include "vframe.inc" @@ -50,7 +51,7 @@ public: int get_audio_for_video(int vstream, int astream, int64_t &channel_mask); static void get_info(char *path,char *text,int len); int open_file(int rd,int wr); - int get_index(char *index_filename); + int get_index(IndexFile *index_file, MainProgressBar *progress_bar); int close_file(void); int write_samples(double **buffer,int64_t len); int write_frames(VFrame ***frames,int len); @@ -217,12 +218,14 @@ public: class FFMPEGScanProgress : public Thread { public: + IndexFile *index_file; + MainProgressBar *progress_bar; char progress_title[BCTEXTLEN]; - BC_ProgressBox *progress; int64_t length, *position; int done, *canceled; - FFMPEGScanProgress(const char *title, int64_t length, int64_t *position, int *canceled); + FFMPEGScanProgress(IndexFile *index_file, MainProgressBar *progress_bar, + const char *title, int64_t length, int64_t *position, int *canceled); ~FFMPEGScanProgress(); void run(); }; diff --git a/cinelerra-5.1/cinelerra/filempeg.C b/cinelerra-5.1/cinelerra/filempeg.C index 8b73e6d5..96df8847 100644 --- a/cinelerra-5.1/cinelerra/filempeg.C +++ b/cinelerra-5.1/cinelerra/filempeg.C @@ -385,46 +385,52 @@ int FileMPEG::open_file(int rd, int wr) int result = 0; if(rd) { + fd = 0; char toc_name[BCTEXTLEN]; result = file->preferences->get_asset_file_path(asset, toc_name); - int error = 0; - fd = mpeg3_open_title(asset->path, toc_name, &error); - if( !fd ) { - result = 1; - if(error == zmpeg3_t::ERR_INVALID_TOC_VERSION) { - eprintf(_("Couldn't open %s: invalid table of contents version.\n" - "Rebuilding the table of contents."), asset->path); - } - else if(error == zmpeg3_t::ERR_TOC_DATE_MISMATCH) { - eprintf(_("Couldn't open %s: table of contents out of date.\n" - "Rebuilding the table of contents."), asset->path); + if( result >= 0 ) { + int error = 0; +// if toc exists, use it otherwise just probe file + char *path = !result ? toc_name : asset->path; + fd = mpeg3_open_title(asset->path, path, &error); + if( !fd ) { + switch( error ) { + case zmpeg3_t::ERR_INVALID_TOC_VERSION: + eprintf(_("Couldn't open %s: invalid table of contents version.\n"),asset->path); + result = 1; + break; + case zmpeg3_t::ERR_TOC_DATE_MISMATCH: + eprintf(_("Couldn't open %s: table of contents out of date.\n"),asset->path); + result = 1; + break; + default: + eprintf(_("Couldn't open %s: table of contents corrupt.\n"),asset->path); + result = -1; + break; + } + if( result > 0 ) { + eprintf(_("Rebuilding the table of contents\n")); + } + } else { - eprintf(_("Couldn't open %s: table of contents corrupt.\n" - "Rebuilding the table of contents."), asset->path); - } - char filename[BCTEXTLEN]; - strcpy(filename, toc_name); - char *sfx = strrchr(filename,'.'); - if( sfx && !strcmp(sfx+1,"toc") ) { - remove(filename); - strcpy(sfx+1,"idx"); - remove(filename); - strcpy(toc_name, asset->path); - fd = mpeg3_open_title(asset->path, toc_name, &error); - if( fd ) result = 0; + if( mpeg3_has_toc(fd) ) + result = 0; + else if( mpeg3_total_vstreams(fd) || mpeg3_total_astreams(fd) ) + result = 1; + else { + eprintf(_("Couldn't open %s: no audio or video.\n"),asset->path); + result = -1; + } } - if( result ) - eprintf(_("Couldn't open %s: rebuild failed.\n"), asset->path); } - if(!result) { -// Determine if the file needs a table of contents and create one if needed. -// If it has video it must be scanned since video has keyframes. - if(mpeg3_total_vstreams(fd) || mpeg3_total_astreams(fd)) { - if(create_index()) return 1; - } -// more than 4 doesnt help much + if( result > 0 ) { + if( fd ) { mpeg3_close(fd); fd = 0; } + result = create_toc(toc_name); + } + + if( !result ) { mpeg3_set_cpus(fd, file->cpus < 4 ? file->cpus : 4); file->current_program = mpeg3_set_program(fd, -1); if( asset->program < 0 ) @@ -439,13 +445,12 @@ int FileMPEG::open_file(int rd, int wr) if(!asset->sample_rate) asset->sample_rate = mpeg3_sample_rate(fd, 0); asset->audio_length = mpeg3_audio_samples(fd, 0); - if(!asset->channels || - !asset->sample_rate) + if( !asset->channels || !asset->sample_rate ) result = 1; } asset->video_data = mpeg3_has_video(fd); - if(asset->video_data) { + if( !result && asset->video_data ) { asset->interlace_mode = BC_ILACE_MODE_UNDETECTED; if( !asset->layers ) { asset->layers = mpeg3_total_vstreams(fd); @@ -464,12 +469,12 @@ int FileMPEG::open_file(int rd, int wr) asset->frame_rate = mpeg3_frame_rate(fd, 0); } } + if( result ) { + eprintf(_("Couldn't open %s: failed.\n"), asset->path); + } } - - - if(!result && wr && asset->format == FILE_VMPEG) - { + if( !result && wr && asset->format == FILE_VMPEG ) { // Heroine Virtual encoder // this one is cinelerra-x.x.x/mpeg2enc if(asset->vmpeg_cmodel == BC_YUV422P) @@ -669,9 +674,7 @@ int FileMPEG::open_file(int rd, int wr) video_out->start(); } } - else - if(wr && asset->format == FILE_AMPEG) - { + else if( !result && wr && asset->format == FILE_AMPEG) { //char encoder_string[BCTEXTLEN]; encoder_string[0] = 0; //printf("FileMPEG::open_file 1 %d\n", asset->ampeg_derivative); @@ -723,11 +726,9 @@ int FileMPEG::open_file(int rd, int wr) } // Transport stream for DVB capture - if(!result && !rd && !wr && asset->format == FILE_MPEG) - { + if( !result && !rd && !wr && asset->format == FILE_MPEG ) { if( (recd_fd = open(asset->path, O_CREAT+O_TRUNC+O_WRONLY, - S_IRUSR+S_IWUSR + S_IRGRP+S_IWGRP)) < 0 ) - { + S_IRUSR+S_IWUSR + S_IRGRP+S_IWGRP)) < 0 ) { perror("FileMPEG::open_file"); eprintf(_("Error while opening \"%s\" for writing\n%m\n"), asset->path); result = 1; @@ -785,119 +786,131 @@ int FileMPEG::toc_nail(void *vp, int track) } -int FileMPEG::create_index() +int FileMPEG::create_toc(char *toc_path) { -// Calculate TOC path - char index_filename[BCTEXTLEN]; - char source_filename[BCTEXTLEN]; - - IndexFile::get_index_filename(source_filename, - file->preferences->index_directory, - index_filename, - asset->path); - char *ptr = strrchr(index_filename, '.'); - int error = 0; - - if(!ptr) return 1; - -// File is a table of contents. - if(fd && mpeg3_has_toc(fd)) return 0; - - sprintf(ptr, ".toc"); +// delete any existing toc files + char toc_file[BCTEXTLEN]; + strcpy(toc_file, toc_path); + remove(toc_file); + char *bp = strrchr(toc_file, '/'); + if( !bp ) bp = toc_file; + char *sfx = strrchr(bp,'.'); + if( sfx ) { + strcpy(sfx+1,"toc"); + remove(toc_file); + } - int need_toc = 1; + int64_t total_bytes = 0, last_bytes = -1; + fd = mpeg3_start_toc(asset->path, toc_file, + file->current_program, &total_bytes); + if( !fd ) { + eprintf(_("cant start toc/idx for file: %s\n"), asset->path); + return 1; + } - if(fd) mpeg3_close(fd); - fd = 0; +// File needs a table of contents. + struct timeval new_time, prev_time, start_time, current_time; + gettimeofday(&prev_time, 0); gettimeofday(&start_time, 0); + if( file->preferences->scan_commercials ) { + set_skimming(-1, 1, toc_nail, file); + if( MWindow::commercials->resetDb() != 0 ) + eprintf(_("cant access commercials database")); + } +// This gets around the fact that MWindowGUI may be locked. + char progress_title[BCTEXTLEN]; + sprintf(progress_title, _("Creating %s\n"), toc_file); + BC_ProgressBox progress(-1, -1, progress_title, total_bytes); + progress.start(); -// Test existing copy of TOC - if((fd = mpeg3_open_title(asset->path, index_filename, &error))) - need_toc = 0; + int result = 0; + while( !result ) { + int64_t bytes_processed = 0; + if( mpeg3_do_toc(fd, &bytes_processed) ) break; - if(need_toc) - { - int result = 0; -// Create progress window. -// This gets around the fact that MWindowGUI is locked. - int64_t total_bytes = 0, last_bytes = -1; - fd = mpeg3_start_toc( asset->path, index_filename, - file->current_program, &total_bytes); - if( !fd ) { - eprintf(_("cant init toc index\n")); - result = 1; + if( bytes_processed >= total_bytes ) break; + if( bytes_processed == last_bytes ) { + eprintf(_("toc scan stopped before eof")); + break; } - - struct timeval new_time, prev_time, start_time, current_time; - gettimeofday(&prev_time, 0); gettimeofday(&start_time, 0); - - if( !result && file->preferences->scan_commercials ) { - set_skimming(-1, 1, toc_nail, file); - if( (result=MWindow::commercials->resetDb() ) != 0 ) - eprintf(_("cant access commercials database")); + last_bytes = bytes_processed; + + gettimeofday(&new_time, 0); + if( new_time.tv_sec - prev_time.tv_sec >= 1 ) { + gettimeofday(¤t_time, 0); + int64_t elapsed_seconds = current_time.tv_sec - start_time.tv_sec; + int64_t total_seconds = !bytes_processed ? 0 : + elapsed_seconds * total_bytes / bytes_processed; + int64_t eta = total_seconds - elapsed_seconds; + progress.update(bytes_processed, 1); + char string[BCTEXTLEN]; + sprintf(string, "%sETA: %jdm%jds", + progress_title, eta / 60, eta % 60); + progress.update_title(string, 1); +// fprintf(stderr, "ETA: %dm%ds \r", +// bytes_processed * 100 / total_bytes, +// eta / 60, eta % 60); +// fflush(stdout); + prev_time = new_time; } - char progress_title[BCTEXTLEN]; progress_title[0] = 0; - BC_ProgressBox *progress = 0; - if( !result ) { - sprintf(progress_title, _("Creating %s\n"), index_filename); - progress = new BC_ProgressBox(-1, -1, - progress_title, total_bytes); - progress->start(); + if( progress.is_cancelled() ) { + result = 1; + break; } + } - while( !result ) { - int64_t bytes_processed = 0; - if( mpeg3_do_toc(fd, &bytes_processed) ) break; - gettimeofday(&new_time, 0); + if( file->preferences->scan_commercials ) { + if( !result ) MWindow::commercials->write_ads(asset->path); + MWindow::commercials->closeDb(); + } - if(new_time.tv_sec - prev_time.tv_sec >= 1) - { - gettimeofday(¤t_time, 0); - int64_t elapsed_seconds = current_time.tv_sec - start_time.tv_sec; - int64_t total_seconds = !bytes_processed ? 0 : - elapsed_seconds * total_bytes / bytes_processed; - int64_t eta = total_seconds - elapsed_seconds; - progress->update(bytes_processed, 1); - char string[BCTEXTLEN]; - sprintf(string, "%sETA: %jdm%jds", - progress_title, eta / 60, eta % 60); - progress->update_title(string, 1); -// fprintf(stderr, "ETA: %dm%ds \r", -// bytes_processed * 100 / total_bytes, -// eta / 60, eta % 60); -// fflush(stdout); - prev_time = new_time; - } - if(bytes_processed >= total_bytes) break; - if(progress->is_cancelled()) result = 1; - if( bytes_processed == last_bytes ) { - eprintf(_("toc scan stopped before eof")); - break; - } - last_bytes = bytes_processed; - } + mpeg3_stop_toc(fd); + fd = 0; - // record scan results - if( file->preferences->scan_commercials ) { - if( !result ) MWindow::commercials->write_ads(asset->path); - MWindow::commercials->closeDb(); - } + progress.stop_progress(); - if( fd ) { mpeg3_stop_toc(fd); fd = 0; } - if( progress ) { progress->stop_progress(); delete progress; } - if( result ) { remove_file(index_filename); return 1; } + if( result ) { + remove_file(toc_file); + return 1; } - if(!fd) - { -// Reopen file from index path instead of asset path. - if(!(fd = mpeg3_open(index_filename, &error))) - { - return 1; +// Reopen file from toc path instead of asset path. + int error = 0; + fd = mpeg3_open(toc_file, &error); + if( !fd ) { + eprintf(_("mpeg3_open failed: %s"), toc_file); + return 1; + } + return 0; +} + +int FileMPEG::get_index(IndexFile *index_file, MainProgressBar *progress_bar) +{ + if( !fd ) return 1; + IndexState *index_state = index_file->get_state(); + index_state->reset_index(); + index_state->reset_markers(); + +// Convert the index tables from tracks to channels. + int ntracks = mpeg3_index_tracks(fd); + if( !ntracks ) return 1; + + int index_zoom = mpeg3_index_zoom(fd); + int64_t offset = 0; + for( int i = 0; i < ntracks; ++i ) { + int nch = mpeg3_index_channels(fd, i); + for( int j = 0; j < nch; ++j ) { + float *bfr = (float *)mpeg3_index_data(fd, i, j); + int64_t size = 2*mpeg3_index_size(fd, i); + index_state->add_index_entry(bfr, offset, size); + offset += size; } } - return 0; + FileSystem fs; + int64_t file_bytes = fs.get_size(asset->path); + char *index_path = index_file->index_filename; + return index_state->write_index(index_path, asset, index_zoom, file_bytes); } @@ -1020,36 +1033,6 @@ int FileMPEG::colormodel_supported(int colormodel) return colormodel; } -int FileMPEG::get_index(char *index_path) -{ - if(!fd) return 1; - IndexState *index_state = asset->index_state; - index_state->reset_index(); - index_state->reset_markers(); - -// Convert the index tables from tracks to channels. - if(mpeg3_index_tracks(fd)) { - int index_zoom = mpeg3_index_zoom(fd); - int ntracks = mpeg3_index_tracks(fd); - int64_t offset = 0; - for(int i = 0; i < ntracks; i++) { - int nch = mpeg3_index_channels(fd, i); - for(int j = 0; j < nch; j++) { - float *bfr = (float *)mpeg3_index_data(fd, i, j); - int64_t size = 2*mpeg3_index_size(fd, i); - index_state->add_index_entry(bfr, offset, size); - offset += size; - } - } - FileSystem fs; - int64_t file_bytes = fs.get_size(asset->path); - return index_state->write_index(index_path, asset, index_zoom, file_bytes); - } - - return 1; -} - - int FileMPEG::can_copy_from(Asset *asset, int64_t position) { return 0; diff --git a/cinelerra-5.1/cinelerra/filempeg.h b/cinelerra-5.1/cinelerra/filempeg.h index cde4458c..82a534af 100644 --- a/cinelerra-5.1/cinelerra/filempeg.h +++ b/cinelerra-5.1/cinelerra/filempeg.h @@ -26,9 +26,11 @@ #include "condition.inc" #include "file.inc" #include "filebase.h" +#include "indexfile.inc" #include "twolame.h" #include "lame/lame.h" #include "libzmpeg3.h" +#include "mainprogress.inc" #include "thread.h" @@ -72,10 +74,9 @@ public: static void get_info(char *title_path, char *path, char *text, int len); int open_file(int rd, int wr); int close_file(); - int create_index(); + int create_toc(char *toc_path); + int get_index(IndexFile *index_file, MainProgressBar *progress_bar); - - int get_index(char *index_path); int set_video_position(int64_t x); int set_audio_position(int64_t x); int write_samples(double **buffer, diff --git a/cinelerra-5.1/cinelerra/formattools.C b/cinelerra-5.1/cinelerra/formattools.C index 37810a8e..d3685e02 100644 --- a/cinelerra-5.1/cinelerra/formattools.C +++ b/cinelerra-5.1/cinelerra/formattools.C @@ -823,6 +823,8 @@ int FormatFormat::handle_event() asset->format = new_format; asset->audio_data = File::supports_audio(asset->format); asset->video_data = File::supports_video(asset->format); + asset->ff_audio_options[0] = 0; + asset->ff_video_options[0] = 0; format->format_text->update(selection->get_text()); format->update_extension(); format->close_format_windows(); @@ -851,6 +853,8 @@ int FormatFFMPEG::handle_event() if( selection ) { char *text = get_selection(0, 0)->get_text(); format->ffmpeg_type->update(text); + format->asset->ff_audio_options[0] = 0; + format->asset->ff_video_options[0] = 0; FFMPEG::set_asset_format(format->asset, text); format->update_extension(); format->close_format_windows(); diff --git a/cinelerra-5.1/cinelerra/indexfile.C b/cinelerra-5.1/cinelerra/indexfile.C index 5958efa5..bdb928ce 100644 --- a/cinelerra-5.1/cinelerra/indexfile.C +++ b/cinelerra-5.1/cinelerra/indexfile.C @@ -445,7 +445,7 @@ SET_TRACE // Some file formats have their own sample index. // Test for index in stream table of contents - if(source && !source->get_index(index_filename)) + if(source && !source->get_index(this, progress)) { IndexState *index_state = get_state(); index_state->index_status = INDEX_READY; diff --git a/cinelerra-5.1/cinelerra/indexstate.C b/cinelerra-5.1/cinelerra/indexstate.C index 3204c684..fed102cf 100644 --- a/cinelerra-5.1/cinelerra/indexstate.C +++ b/cinelerra-5.1/cinelerra/indexstate.C @@ -238,7 +238,6 @@ int IndexState::write_index(const char *index_path, Asset *asset, int64_t zoom, } fclose(fp); - reset_index(); return 0; } diff --git a/cinelerra-5.1/cinelerra/mainindexes.C b/cinelerra-5.1/cinelerra/mainindexes.C index 6d760a50..a4ea540d 100644 --- a/cinelerra-5.1/cinelerra/mainindexes.C +++ b/cinelerra-5.1/cinelerra/mainindexes.C @@ -31,6 +31,7 @@ #include "language.h" #include "loadfile.h" #include "guicast.h" +#include "mainerror.h" #include "mainindexes.h" #include "mainprogress.h" #include "mutex.h" @@ -77,68 +78,13 @@ SET_TRACE index_state = indexable->index_state; SET_TRACE - int got_it = 0; - -SET_TRACE - if(!indexfile.open_index()) - { + int ret = indexfile.open_index(); + if( !ret ) { index_state->index_status = INDEX_READY; indexfile.close_index(); - got_it = 1; - } - -//printf("MainIndexes::add_next_asset %d %f\n", __LINE__, indexable->get_frame_rate()); - -SET_TRACE -// No index - if(!got_it) - { - File *this_file = file; - -SET_TRACE - if(!file && indexable->is_asset) - { - Asset *asset = (Asset *)indexable; - this_file = new File; - this_file->open_file(mwindow->preferences, asset, 1, 0); - } - - -SET_TRACE - char index_filename[BCTEXTLEN]; - char source_filename[BCTEXTLEN]; -SET_TRACE - IndexFile::get_index_filename(source_filename, - mwindow->preferences->index_directory, - index_filename, - indexable->path); - -SET_TRACE - if(this_file && !this_file->get_index(index_filename)) - { -SET_TRACE - if(!indexfile.open_index()) - { -SET_TRACE - indexfile.close_index(); -SET_TRACE - index_state->index_status = INDEX_READY; - got_it = 1; - } -SET_TRACE - } - -SET_TRACE - if(this_file && !file) delete this_file; -SET_TRACE } -SET_TRACE - -//printf("MainIndexes::add_next_asset %d %f\n", __LINE__, indexable->get_frame_rate()); - + else { // Put source in stack - if(!got_it) - { index_state->index_status = INDEX_NOTTESTED; next_indexables.append(indexable); indexable->add_user(); @@ -210,88 +156,49 @@ void MainIndexes::load_next_sources() void MainIndexes::run() { - while(!done) - { + while(!done) { // Wait for new indexables to be released input_lock->lock("MainIndexes::run 1"); if(done) return; - interrupt_lock->lock("MainIndexes::run 2"); load_next_sources(); interrupt_flag = 0; - - - - - // test index of each indexable MainProgressBar *progress = 0; int total_sources = current_indexables.size(); - for(int i = 0; - i < total_sources && !interrupt_flag; - i++) - { - Indexable *indexable = 0; -// Take an indexable - indexable = current_indexables.get(i); - - IndexState *index_state = 0; - index_state = indexable->index_state; - -//printf("MainIndexes::run 3 %s %d %d\n", indexable->path, indexable->index_status, indexable->audio_data); - - if(index_state->index_status == INDEX_NOTTESTED && - indexable->have_audio()) - { - - index_lock->lock("MainIndexes::run 1"); - indexfile = new IndexFile(mwindow, indexable); - index_lock->unlock(); + for( int i = 0; i < total_sources && !interrupt_flag; ++i ) { + Indexable *indexable = current_indexables[i]; + IndexState *index_state = indexable->index_state; +// if status is known, no probe + if( index_state->index_status != INDEX_NOTTESTED ) continue; - -// Doesn't exist if this returns 1. - if(indexfile->open_index()) - { -// Try to create index now. - if(!progress) - { - if(mwindow->gui) mwindow->gui->lock_window("MainIndexes::run 1"); - progress = mwindow->mainprogress->start_progress(_("Building Indexes..."), 1); - if(mwindow->gui) mwindow->gui->unlock_window(); - } - - - indexfile->create_index(progress); - if(progress->is_cancelled()) interrupt_flag = 1; - } - else -// Exists. Update real thing. - { -//printf("MainIndexes::run 8\n"); - if(index_state->index_status == INDEX_NOTTESTED) - { - index_state->index_status = INDEX_READY; - if(mwindow->gui) mwindow->gui->lock_window("MainIndexes::run 2"); - mwindow->edl->set_index_file(indexable); - if(mwindow->gui) mwindow->gui->unlock_window(); - } - indexfile->close_index(); - } - - index_lock->lock("MainIndexes::run 2"); - delete indexfile; - indexfile = 0; - index_lock->unlock(); -//printf("MainIndexes::run 8\n"); + IndexFile indexfile(mwindow, indexable); + int ret = indexfile.open_index(); + if( !ret ) { + indexfile.close_index(); +// use existing index + index_state->index_status = INDEX_READY; + if(mwindow->gui) mwindow->gui->lock_window("MainIndexes::run 2"); + mwindow->edl->set_index_file(indexable); + if(mwindow->gui) mwindow->gui->unlock_window(); + continue; } -//printf("MainIndexes::run 9\n"); +// Doesn't exist + if( !progress ) { + if(mwindow->gui) mwindow->gui->lock_window("MainIndexes::run 1"); + progress = mwindow->mainprogress->start_progress(_("Building Indexes..."), 1); + if(mwindow->gui) mwindow->gui->unlock_window(); + } +// only if audio tracks + indexfile.create_index(progress); + if( progress->is_cancelled() ) + interrupt_flag = 1; } - if(progress) // progress box is only created when an index is built - { + if(progress) { // progress box is only created when an index is built if(mwindow->gui) mwindow->gui->lock_window("MainIndexes::run 3"); progress->stop_progress(); delete progress; @@ -299,11 +206,6 @@ void MainIndexes::run() progress = 0; } - - - - - interrupt_lock->unlock(); } } diff --git a/cinelerra-5.1/cinelerra/mainmenu.C b/cinelerra-5.1/cinelerra/mainmenu.C index b04800bb..7fa7b747 100644 --- a/cinelerra-5.1/cinelerra/mainmenu.C +++ b/cinelerra-5.1/cinelerra/mainmenu.C @@ -229,7 +229,7 @@ void MainMenu::create_objects() viewmenu->add_item(show_transitions = new ShowTransitions(mwindow, "2")); viewmenu->add_item(fade_automation = new ShowAutomation(mwindow, _("Fade"), "3", AUTOMATION_FADE)); viewmenu->add_item(mute_automation = new ShowAutomation(mwindow, _("Mute"), "4", AUTOMATION_MUTE)); - viewmenu->add_item(mode_automation = new ShowAutomation(mwindow, _("Mode"), "5", AUTOMATION_MODE)); + viewmenu->add_item(mode_automation = new ShowAutomation(mwindow, _("Overlay mode"), "5", AUTOMATION_MODE)); viewmenu->add_item(pan_automation = new ShowAutomation(mwindow, _("Pan"), "6", AUTOMATION_PAN)); viewmenu->add_item(plugin_automation = new PluginAutomation(mwindow, "7")); viewmenu->add_item(mask_automation = new ShowAutomation(mwindow, _("Mask"), "8", AUTOMATION_MASK)); diff --git a/cinelerra-5.1/cinelerra/mainprogress.C b/cinelerra-5.1/cinelerra/mainprogress.C index 711f61fd..295be000 100644 --- a/cinelerra-5.1/cinelerra/mainprogress.C +++ b/cinelerra-5.1/cinelerra/mainprogress.C @@ -107,8 +107,12 @@ void MainProgressBar::update_title(char *string, int default_) else if(progress_bar) { + char text[BCTEXTLEN], *cp = text, *ep = cp+sizeof(text)-1; + for( const unsigned char *bp = (const unsigned char *)string; *bp && cp= ' ' ? *bp : ' '; + *cp = 0; mwindow->gui->lock_window("MainProgressBar::update_title"); - mwindow->gui->show_message(string); + mwindow->gui->show_message(text); mwindow->gui->unlock_window(); } } diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index adb7a87a..381b0c1a 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -1407,29 +1407,13 @@ SET_TRACE } // Test existing EDLs - if(result) - { - for(int j = 0; j < new_edls.total + 1; j++) - { - Asset *old_asset; - if(j == new_edls.total) - { - old_asset = edl->assets->get_asset(new_asset->path); - if( old_asset ) - { - *new_asset = *old_asset; - result = 0; - } - } - else - { - old_asset = new_edls[j]->assets->get_asset(new_asset->path); - if( old_asset ) - { - *new_asset = *old_asset; - result = 0; - } - } + for(int j = 0; result && j <= new_edls.total; j++) { + Asset *old_asset = j < new_edls.total ? + new_edls[j]->assets->get_asset(new_asset->path) : + edl->assets->get_asset(new_asset->path); + if( old_asset ) { + *new_asset = *old_asset; + result = 0; } } diff --git a/cinelerra-5.1/cinelerra/preferences.C b/cinelerra-5.1/cinelerra/preferences.C index 0eca68eb..a3f3b391 100644 --- a/cinelerra-5.1/cinelerra/preferences.C +++ b/cinelerra-5.1/cinelerra/preferences.C @@ -698,18 +698,16 @@ int Preferences::get_node_port(int number) int Preferences::get_asset_file_path(Asset *asset, char *path) { strcpy(path, asset->path); - int result = access(path, R_OK); + int result = !access(path, R_OK) ? 0 : -1; if( !result && asset->format == FILE_MPEG ) { - char source_filename[BCTEXTLEN]; - char index_filename[BCTEXTLEN]; + char source_filename[BCTEXTLEN], index_filename[BCTEXTLEN]; IndexFile::get_index_filename(source_filename, - index_directory, index_filename, - asset->path, ".toc"); - struct stat st; - if( !access(index_filename, R_OK) && - !stat(index_filename,&st) && st.st_size > 0 ) + index_directory, index_filename, asset->path, ".toc"); strcpy(path, index_filename); + if( access(path, R_OK) ) + result = 1; } +// result = 0, asset->path/toc exist, -1 no asset, 1 no toc return result; } diff --git a/cinelerra-5.1/cinelerra/render.C b/cinelerra-5.1/cinelerra/render.C index 0098afff..21e33c20 100644 --- a/cinelerra-5.1/cinelerra/render.C +++ b/cinelerra-5.1/cinelerra/render.C @@ -270,9 +270,7 @@ void Render::start_interactive() mode = Render::INTERACTIVE; BC_DialogThread::start(); } - else if( render_window && !in_progress ) - render_window->raise_window(); - else { + else if( in_progress ) { ErrorBox error_box(_(PROGRAM_NAME ": Error"), mwindow->gui->get_abs_cursor_x(1), mwindow->gui->get_abs_cursor_y(1)); @@ -280,6 +278,9 @@ void Render::start_interactive() error_box.raise_window(); error_box.run_window(); } + else if( render_window ) { + render_window->raise_window(); + } } @@ -289,22 +290,22 @@ void Render::start_batches(ArrayList *jobs) { mode = Render::BATCH; batch_cancelled = 0; - // raise the window if rendering hasn't started yet - if( render_window && ! in_progress ) { - render_window->raise_window(); - } - else { - ErrorBox error_box(PROGRAM_NAME ": Error", - mwindow->gui->get_abs_cursor_x(1), - mwindow->gui->get_abs_cursor_y(1)); - error_box.create_objects("Already rendering"); - error_box.raise_window(); - error_box.run_window(); - } this->jobs = jobs; completion->reset(); start_render(); } + else if( in_progress ) { + ErrorBox error_box(PROGRAM_NAME ": Error", + mwindow->gui->get_abs_cursor_x(1), + mwindow->gui->get_abs_cursor_y(1)); + error_box.create_objects("Already rendering"); + error_box.raise_window(); + error_box.run_window(); + } + // raise the window if rendering hasn't started yet + else if( render_window ) { + render_window->raise_window(); + } } void Render::start_batches(ArrayList *jobs, diff --git a/cinelerra-5.1/ffmpeg/audio/acc256k.pro b/cinelerra-5.1/ffmpeg/audio/acc256k.pro new file mode 100644 index 00000000..7bf3dc70 --- /dev/null +++ b/cinelerra-5.1/ffmpeg/audio/acc256k.pro @@ -0,0 +1,3 @@ +mov libfdk_aac | aac_adtstoasc +strict -2 +b 256000 diff --git a/cinelerra-5.1/ffmpeg/audio/pro.dfl b/cinelerra-5.1/ffmpeg/audio/pro.dfl new file mode 100644 index 00000000..231b84b4 --- /dev/null +++ b/cinelerra-5.1/ffmpeg/audio/pro.dfl @@ -0,0 +1 @@ +acc256k.pro diff --git a/cinelerra-5.1/ffmpeg/video/med422p10.pro b/cinelerra-5.1/ffmpeg/video/med422p10.pro new file mode 100644 index 00000000..f2791b52 --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/med422p10.pro @@ -0,0 +1,3 @@ +mov prores +preset medium +pix_fmt yuv422p10le diff --git a/cinelerra-5.1/ffmpeg/video/pro.dfl b/cinelerra-5.1/ffmpeg/video/pro.dfl new file mode 100644 index 00000000..b317d6b6 --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/pro.dfl @@ -0,0 +1 @@ +med422p10.pro diff --git a/cinelerra-5.1/guicast/filesystem.C b/cinelerra-5.1/guicast/filesystem.C index 0f03530e..45e145a1 100644 --- a/cinelerra-5.1/guicast/filesystem.C +++ b/cinelerra-5.1/guicast/filesystem.C @@ -471,7 +471,7 @@ int FileSystem::update(const char *new_dir) // file not hidden if(include_this) - { + { new_file = new FileItem; sprintf(full_path, "%s", current_dir); if(!is_root_dir(current_dir)) strcat(full_path, "/"); diff --git a/cinelerra-5.1/plugins/delayaudio/delayaudio.C b/cinelerra-5.1/plugins/delayaudio/delayaudio.C index 0c0c066f..ff85b013 100644 --- a/cinelerra-5.1/plugins/delayaudio/delayaudio.C +++ b/cinelerra-5.1/plugins/delayaudio/delayaudio.C @@ -205,12 +205,7 @@ void DelayAudio::update_gui() DelayAudioWindow::DelayAudioWindow(DelayAudio *plugin) - : PluginClientWindow(plugin, - 200, - 80, - 200, - 80, - 0) + : PluginClientWindow(plugin, 285, 80, 285, 80, 0) { this->plugin = plugin; } diff --git a/cinelerra-5.1/plugins/denoise/denoise.C b/cinelerra-5.1/plugins/denoise/denoise.C index 3110053b..8aa7ed7d 100644 --- a/cinelerra-5.1/plugins/denoise/denoise.C +++ b/cinelerra-5.1/plugins/denoise/denoise.C @@ -754,12 +754,7 @@ void DenoiseConfig::interpolate(DenoiseConfig &prev, DenoiseWindow::DenoiseWindow(DenoiseEffect *plugin) - : PluginClientWindow(plugin, - 150, - 50, - 150, - 50, - 0) + : PluginClientWindow(plugin, 280, 50, 280, 50, 0) { this->plugin = plugin; } diff --git a/cinelerra-5.1/plugins/flip/flipwindow.C b/cinelerra-5.1/plugins/flip/flipwindow.C index cc257029..ca29a93d 100644 --- a/cinelerra-5.1/plugins/flip/flipwindow.C +++ b/cinelerra-5.1/plugins/flip/flipwindow.C @@ -30,9 +30,7 @@ FlipWindow::FlipWindow(FlipMain *client) - : PluginClientWindow(client, - 250, 100, 250, 100, - 0) + : PluginClientWindow(client, 250, 100, 250, 100, 0) { this->client = client; } diff --git a/cinelerra-5.1/plugins/freezeframe/freezeframe.C b/cinelerra-5.1/plugins/freezeframe/freezeframe.C index 69385755..52f2ae13 100644 --- a/cinelerra-5.1/plugins/freezeframe/freezeframe.C +++ b/cinelerra-5.1/plugins/freezeframe/freezeframe.C @@ -75,12 +75,7 @@ void FreezeFrameConfig::interpolate(FreezeFrameConfig &prev, FreezeFrameWindow::FreezeFrameWindow(FreezeFrameMain *client) - : PluginClientWindow(client, - 200, - 100, - 200, - 100, - 0) + : PluginClientWindow(client, 260, 100, 260, 100, 0) { this->client = client; } diff --git a/cinelerra-5.1/plugins/huesaturation/huesaturation.C b/cinelerra-5.1/plugins/huesaturation/huesaturation.C index dde366b4..a574e905 100644 --- a/cinelerra-5.1/plugins/huesaturation/huesaturation.C +++ b/cinelerra-5.1/plugins/huesaturation/huesaturation.C @@ -300,8 +300,7 @@ char* ValueSlider::get_caption() HueWindow::HueWindow(HueEffect *plugin) - : PluginClientWindow(plugin, - 345, 100, 345, 100, 0) + : PluginClientWindow(plugin, 345, 100, 345, 100, 0) { this->plugin = plugin; } diff --git a/cinelerra-5.1/plugins/reframert/reframert.C b/cinelerra-5.1/plugins/reframert/reframert.C index edba7e12..d79e63a8 100644 --- a/cinelerra-5.1/plugins/reframert/reframert.C +++ b/cinelerra-5.1/plugins/reframert/reframert.C @@ -198,12 +198,7 @@ void ReframeRTConfig::boundaries() ReframeRTWindow::ReframeRTWindow(ReframeRT *plugin) - : PluginClientWindow(plugin, - 210, - 160, - 200, - 160, - 0) + : PluginClientWindow(plugin, 230, 160, 230, 160, 0) { this->plugin = plugin; } diff --git a/cinelerra-5.1/plugins/reverseaudio/reverseaudio.C b/cinelerra-5.1/plugins/reverseaudio/reverseaudio.C index fbab14bd..58715771 100644 --- a/cinelerra-5.1/plugins/reverseaudio/reverseaudio.C +++ b/cinelerra-5.1/plugins/reverseaudio/reverseaudio.C @@ -104,12 +104,7 @@ ReverseAudioConfig::ReverseAudioConfig() ReverseAudioWindow::ReverseAudioWindow(ReverseAudio *plugin) - : PluginClientWindow(plugin, - 210, - 160, - 200, - 160, - 0) + : PluginClientWindow(plugin, 265, 60, 265, 60, 0) { this->plugin = plugin; } diff --git a/cinelerra-5.1/plugins/rgb601/rgb601window.C b/cinelerra-5.1/plugins/rgb601/rgb601window.C index b3eb3299..76a4af61 100644 --- a/cinelerra-5.1/plugins/rgb601/rgb601window.C +++ b/cinelerra-5.1/plugins/rgb601/rgb601window.C @@ -34,12 +34,7 @@ RGB601Window::RGB601Window(RGB601Main *client) - : PluginClientWindow(client, - 210, - 200, - 210, - 200, - 0) + : PluginClientWindow(client, 235, 100, 235, 100, 0) { this->client = client; } diff --git a/cinelerra-5.1/plugins/scale/scalewin.C b/cinelerra-5.1/plugins/scale/scalewin.C index 536e267c..200a38e7 100644 --- a/cinelerra-5.1/plugins/scale/scalewin.C +++ b/cinelerra-5.1/plugins/scale/scalewin.C @@ -29,8 +29,7 @@ ScaleWin::ScaleWin(ScaleMain *client) - : PluginClientWindow(client, - 400, 100, 400, 100, 0) + : PluginClientWindow(client, 400, 100, 400, 100, 0) { this->client = client; } diff --git a/cinelerra-5.1/plugins/sharpen/sharpenwindow.C b/cinelerra-5.1/plugins/sharpen/sharpenwindow.C index af48362d..3a1b7fe5 100644 --- a/cinelerra-5.1/plugins/sharpen/sharpenwindow.C +++ b/cinelerra-5.1/plugins/sharpen/sharpenwindow.C @@ -33,8 +33,7 @@ SharpenWindow::SharpenWindow(SharpenMain *client) - : PluginClientWindow(client, - 230, 150, 230, 150, 0) + : PluginClientWindow(client, 230, 150, 230, 150, 0) { this->client = client; } diff --git a/cinelerra-5.1/plugins/unsharp/unsharpwindow.C b/cinelerra-5.1/plugins/unsharp/unsharpwindow.C index 86187fe5..3ef0a71b 100644 --- a/cinelerra-5.1/plugins/unsharp/unsharpwindow.C +++ b/cinelerra-5.1/plugins/unsharp/unsharpwindow.C @@ -34,12 +34,7 @@ UnsharpWindow::UnsharpWindow(UnsharpMain *plugin) - : PluginClientWindow(plugin, - 200, - 160, - 200, - 160, - 0) + : PluginClientWindow(plugin, 285, 160, 285, 160, 0) { this->plugin = plugin; } diff --git a/cinelerra-5.1/plugins/wave/wave.C b/cinelerra-5.1/plugins/wave/wave.C index ce37965c..e7ec5f5d 100644 --- a/cinelerra-5.1/plugins/wave/wave.C +++ b/cinelerra-5.1/plugins/wave/wave.C @@ -376,12 +376,7 @@ int WaveLength::handle_event() WaveWindow::WaveWindow(WaveEffect *plugin) - : PluginClientWindow(plugin, - 320, - 150, - 320, - 150, - 0) + : PluginClientWindow(plugin, 335, 150, 335, 150, 0) { this->plugin = plugin; } @@ -392,7 +387,7 @@ WaveWindow::~WaveWindow() void WaveWindow::create_objects() { - int x = 10, y = 10, x1 = 100; + int x = 10, y = 10, x1 = 115; // add_subwindow(new BC_Title(x, y, _("Mode:"))); // add_subwindow(smear = new WaveSmear(plugin, this, x1, y)); -- 2.26.2