projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix valgrind memory leaks/reports, add cache to dump, fix hw probe frame leak, startu...
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
cinelerra
/
mwindow.C
diff --git
a/cinelerra-5.1/cinelerra/mwindow.C
b/cinelerra-5.1/cinelerra/mwindow.C
index bd7f556b2cf6aba1db1f59112d390a4b99b6268f..b38e3c653c57556ac36f90595162b1100861c01f 100644
(file)
--- a/
cinelerra-5.1/cinelerra/mwindow.C
+++ b/
cinelerra-5.1/cinelerra/mwindow.C
@@
-4456,11
+4456,7
@@
void MWindow::remove_from_caches(Indexable *idxbl)
delete gui->render_engine;
gui->render_engine = 0;
}
delete gui->render_engine;
gui->render_engine = 0;
}
- if( gui->resource_thread->render_engine_id == idxbl->id ) {
- gui->resource_thread->render_engine_id = -1;
- delete gui->resource_thread->render_engine;
- gui->resource_thread->render_engine = 0;
- }
+ gui->resource_thread->close_indexable(idxbl);
if( !idxbl->is_asset ) return;
Asset *asset = (Asset *)idxbl;
audio_cache->delete_entry(asset);
if( !idxbl->is_asset ) return;
Asset *asset = (Asset *)idxbl;
audio_cache->delete_entry(asset);
@@
-4646,6
+4642,14
@@
void MWindow::dump_exe(FILE *fp)
fprintf(fp, "\n");
}
fprintf(fp, "\n");
}
+void MWindow::dump_caches(FILE *fp)
+{
+ fprintf(fp, "audio cache: ");
+ audio_cache->dump(fp);
+ fprintf(fp, "video cache: ");
+ video_cache->dump(fp);
+}
+
void MWindow::trap_hook(FILE *fp, void *vp)
{
MWindow *mwindow = (MWindow *)vp;
void MWindow::trap_hook(FILE *fp, void *vp)
{
MWindow *mwindow = (MWindow *)vp;
@@
-4657,6
+4661,8
@@
void MWindow::trap_hook(FILE *fp, void *vp)
mwindow->dump_undo(fp);
fprintf(fp, "\nEXE: %s\n", AboutPrefs::build_timestamp);
mwindow->dump_exe(fp);
mwindow->dump_undo(fp);
fprintf(fp, "\nEXE: %s\n", AboutPrefs::build_timestamp);
mwindow->dump_exe(fp);
+ fprintf(fp, "\nCACHES:\n");
+ mwindow->dump_caches(fp);
}
}
@@
-5083,13
+5089,17
@@
PatchGUI *MWindow::get_patchgui(Track *track)
return patchgui;
}
return patchgui;
}
-int MWindow::get_cpus()
+int MWindow::get_cpus(
int out_w, int out_h
)
{
{
- i
nt
out_w = edl->session->output_w;
- i
nt
out_h = edl->session->output_h;
+ i
f( !out_w )
out_w = edl->session->output_w;
+ i
f( !out_h )
out_h = edl->session->output_h;
int cpus = out_w*out_h/0x80000 + 1;
if( cpus > preferences->processors )
cpus = preferences->processors;
return cpus;
}
int cpus = out_w*out_h/0x80000 + 1;
if( cpus > preferences->processors )
cpus = preferences->processors;
return cpus;
}
+int MWindow::get_cpus()
+{
+ return get_cpus(edl->session->output_w, edl->session->output_h);
+}