rework index builder, add pro ffmpeg format
authorGood Guy <good1.2guy@gmail.com>
Thu, 7 Apr 2016 19:17:16 +0000 (13:17 -0600)
committerGood Guy <good1.2guy@gmail.com>
Thu, 7 Apr 2016 19:17:16 +0000 (13:17 -0600)
38 files changed:
cinelerra-5.1/cinelerra/assetedit.C
cinelerra-5.1/cinelerra/awindowmenu.C
cinelerra-5.1/cinelerra/ffmpeg.C
cinelerra-5.1/cinelerra/file.C
cinelerra-5.1/cinelerra/file.h
cinelerra-5.1/cinelerra/fileac3.C
cinelerra-5.1/cinelerra/fileac3.h
cinelerra-5.1/cinelerra/filebase.h
cinelerra-5.1/cinelerra/fileffmpeg.C
cinelerra-5.1/cinelerra/fileffmpeg.h
cinelerra-5.1/cinelerra/filempeg.C
cinelerra-5.1/cinelerra/filempeg.h
cinelerra-5.1/cinelerra/formattools.C
cinelerra-5.1/cinelerra/indexfile.C
cinelerra-5.1/cinelerra/indexstate.C
cinelerra-5.1/cinelerra/mainindexes.C
cinelerra-5.1/cinelerra/mainmenu.C
cinelerra-5.1/cinelerra/mainprogress.C
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/preferences.C
cinelerra-5.1/cinelerra/render.C
cinelerra-5.1/ffmpeg/audio/acc256k.pro [new file with mode: 0644]
cinelerra-5.1/ffmpeg/audio/pro.dfl [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/med422p10.pro [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/pro.dfl [new file with mode: 0644]
cinelerra-5.1/guicast/filesystem.C
cinelerra-5.1/plugins/delayaudio/delayaudio.C
cinelerra-5.1/plugins/denoise/denoise.C
cinelerra-5.1/plugins/flip/flipwindow.C
cinelerra-5.1/plugins/freezeframe/freezeframe.C
cinelerra-5.1/plugins/huesaturation/huesaturation.C
cinelerra-5.1/plugins/reframert/reframert.C
cinelerra-5.1/plugins/reverseaudio/reverseaudio.C
cinelerra-5.1/plugins/rgb601/rgb601window.C
cinelerra-5.1/plugins/scale/scalewin.C
cinelerra-5.1/plugins/sharpen/sharpenwindow.C
cinelerra-5.1/plugins/unsharp/unsharpwindow.C
cinelerra-5.1/plugins/wave/wave.C

index 92e70a2ae611128a5e81e70738cc1026e9775deb..eb76149b3b1eca5364e460a2165a4054ad36bc50 100644 (file)
@@ -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);
index 8ab3ebb0b0c54a6bf391c2453dc12227a7f62850..3aacf32165c046f50ec06cfe74843baf31713f45 100644 (file)
@@ -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();
index 68a131589b9306794143ddba06753bd77bc2e32b..64acfe2bdbbd4a1026016eb65f8c1a0ddce033fa 100644 (file)
@@ -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,
index f5932e3e8f07a58a1e2b89ac9c50d126443b452d..97656925ddc7b6f8d00a3f74ed80d3606324199a 100644 (file)
@@ -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);
 }
 
 
index b8108492de2a30a7f73189ff3260feb5ed410b69..5231a9b3bfefad2b2dba400693490bc900f104ea 100644 (file)
@@ -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);
index e6598796547e048a325d6db85b4330067ca0e043..5d14e7139242b225fbdec8db5a25dc4564f6afe4 100644 (file)
@@ -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
index ab9544ef9a0d287304ee3a199bb693d5365520e4..c2a30b287f5cd2aea441fc41f1a069d5376f0ed4 100644 (file)
@@ -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;
index db9e5b06ffac1b7db93b6d992a35210ee0a27931..3555e1e267f9a2f0bf69c0c1d7ac73bf16cd99e0 100644 (file)
@@ -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
index e311b25dca309af75a7a37cc6fd78feb00544f21..ab856af041b7a9c0f1769fcffa5af8aa17319e85 100644 (file)
@@ -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);
 }
index fe068d25e67a9473943d7c3921dee60a3064f024..73a37489d8049b7d755c9bfcab96cbd48bbcb1ab 100644 (file)
@@ -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();
 };
index 8b73e6d59a6b5f1a1c312ec63d8d55d95f3158a8..96df8847e11e77cc1c8e1a71a19f264b2366271c 100644 (file)
@@ -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(&current_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(&current_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;
index cde4458cc0e4b93824bb238cbe3584cb4b23388e..82a534af8dc2548e61c13881eb59375b3f85b96a 100644 (file)
 #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, 
index 37810a8ee748275695d04799c7ba152429f58337..d3685e02dc692babaa532a8e54a22ae7142d6094 100644 (file)
@@ -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();
index 5958efa5f85a08aaee6c6b50957d4521d1d95c41..bdb928cee301ad8b5739d83c7f1eaae6f0ba5fb0 100644 (file)
@@ -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;
index 3204c6841324fe25f6fe403d2f04d946d5bf8fe2..fed102cfd7611bbdaae4236628d394712261ed71 100644 (file)
@@ -238,7 +238,6 @@ int IndexState::write_index(const char *index_path, Asset *asset, int64_t zoom,
        }
 
        fclose(fp);
-       reset_index();
        return 0;
 }
 
index 6d760a507c08ed7ee6853ac6e18f6eafd38c425a..a4ea540dc546e17c2742fe04a163a4ba28569bed 100644 (file)
@@ -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();
        }
 }
index b04800bb9cf4145a4b5fad7094b98319066612a2..7fa7b747282d1ec5508ea56c3366aa80976fafc5 100644 (file)
@@ -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));
index 711f61fdc2ecf5d842e6581d455d3dbd2c5b6062..295be0007ab2abe1a1731335dadb3a5ff313c55b 100644 (file)
@@ -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<ep; ++bp )
+                       *cp++ = *bp >= ' ' ? *bp : ' ';
+               *cp = 0;
                mwindow->gui->lock_window("MainProgressBar::update_title");
-               mwindow->gui->show_message(string);
+               mwindow->gui->show_message(text);
                mwindow->gui->unlock_window();
        }
 }
index adb7a87aaa868e746eb879ab5bda531c2fa6a459..381b0c1afe7c0d1486f8523b7f79a40bbc7174d4 100644 (file)
@@ -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;
                                        }
                                }
 
index 0eca68eb76919e43390d05f09904159a449efc16..a3f3b391f3062f05fe988b9ec14c0943d9b38680 100644 (file)
@@ -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;
 }
 
index 0098afffd70ee4763105e19d6c210ed762b5d253..21e33c20f5cdcdcc33e159959d060af007e2f97c 100644 (file)
@@ -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<BatchRenderJob*> *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<BatchRenderJob*> *jobs,
diff --git a/cinelerra-5.1/ffmpeg/audio/acc256k.pro b/cinelerra-5.1/ffmpeg/audio/acc256k.pro
new file mode 100644 (file)
index 0000000..7bf3dc7
--- /dev/null
@@ -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 (file)
index 0000000..231b84b
--- /dev/null
@@ -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 (file)
index 0000000..f2791b5
--- /dev/null
@@ -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 (file)
index 0000000..b317d6b
--- /dev/null
@@ -0,0 +1 @@
+med422p10.pro
index 0f03530e8711517b591f2181dfec53e036d8ead7..45e145a186a662c306b8611bcb076a9afb675ec5 100644 (file)
@@ -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, "/");
index 0c0c066f5e9d07be661029270845fd4c0ff9f950..ff85b01392c88b0863b6abcc00fd9a115085b435 100644 (file)
@@ -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;
 }
index 3110053b94d6f1cd521eda23093f8a940a2e950c..8aa7ed7d8769baf94ec3fd911b079f3ea649fd1a 100644 (file)
@@ -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;
 }
index cc2570291cc0a970ac451c4b99abc163c9d656d8..ca29a93d0870acb1fd64fb06e14b1f5c68623228 100644 (file)
@@ -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; 
 }
index 69385755bb94173f203a0c097027753a94695f76..52f2ae13b9f3657ca58d13e9e829951c3155f10c 100644 (file)
@@ -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; 
 }
index dde366b4119c951f58be5695895ce1e0b7d60823..a574e905837506c8d8445426297089d7c3b73313 100644 (file)
@@ -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;
 }
index edba7e129afd1d966f9dbe7cd5822021ba21983a..d79e63a82a87c43b866bb000a17f37875bed7ad6 100644 (file)
@@ -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;
 }
index fbab14bd3eab5b1d69a8bed5e7115fb92cb20d39..58715771ddd056158adb284cdad9cf773ab80222 100644 (file)
@@ -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;
 }
index b3eb329908999f9712a1ebcaa9da7c68a534360a..76a4af6187fbf1d997620f9916178d9aad945cec 100644 (file)
 
 
 RGB601Window::RGB601Window(RGB601Main *client)
- : PluginClientWindow(client,
-       210, 
-       200, 
-       210, 
-       200, 
-       0)
+ : PluginClientWindow(client, 235, 100, 235, 100, 0)
 { 
        this->client = client; 
 }
index 536e267cd629c565992a737646f04c7f5d1ebfcc..200a38e7e9a18e965560511505a125ae5c5094c5 100644 (file)
@@ -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; 
 }
index af48362d805df6488783387c79f4572aece6df97..3a1b7fe5d5b79b81e46992547abbf8b7d0a6099a 100644 (file)
@@ -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; 
 }
index 86187fe54ae2265b2b6e77e7dd7c7077224d7f4a..3ef0a71b8f3496a19a7743203e7833022df36a55 100644 (file)
 
 
 UnsharpWindow::UnsharpWindow(UnsharpMain *plugin)
- : PluginClientWindow(plugin,
-       200, 
-       160, 
-       200, 
-       160, 
-       0)
+ : PluginClientWindow(plugin, 285, 160, 285, 160, 0)
 {
        this->plugin = plugin; 
 }
index ce37965c2e843efc5f45ad05ab7fdbf16b365b0a..e7ec5f5dbed5ea92f82dcf2263ed066a9d5463d7 100644 (file)
@@ -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));