projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix shf-f1/f2 toggle timeline update
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
vmodule.C
diff --git
a/cinelerra-5.1/cinelerra/vmodule.C
b/cinelerra-5.1/cinelerra/vmodule.C
index 02e047e64163f3fa115b094c204193db9e881055..3ef17f0436d714bf0aa4175ed9f6e292a3f1cf89 100644
(file)
--- a/
cinelerra-5.1/cinelerra/vmodule.C
+++ b/
cinelerra-5.1/cinelerra/vmodule.C
@@
-159,9
+159,10
@@
int VModule::import_frame(VFrame *output, VEdit *current_edit,
__LINE__, nested_edl, current_edit->nested_edl);
// Convert requested direction to command
__LINE__, nested_edl, current_edit->nested_edl);
// Convert requested direction to command
- if(renderengine->command->command == CURRENT_FRAME)
+ if( renderengine->command->command == CURRENT_FRAME ||
+ renderengine->command->command == LAST_FRAME )
{
{
- command =
CURRENT_FRAME
;
+ command =
renderengine->command->command
;
}
else
if(direction == PLAY_REVERSE)
}
else
if(direction == PLAY_REVERSE)
@@
-222,7
+223,14
@@
int VModule::import_frame(VFrame *output, VEdit *current_edit,
}
if(debug) printf("VModule::import_frame %d\n", __LINE__);
}
if(debug) printf("VModule::import_frame %d\n", __LINE__);
- if(!output) printf("VModule::import_frame %d output=%p\n", __LINE__, output);
+ if( output ) {
+ if( use_opengl )
+ x11_device->clear_input(output);
+ else
+ output->clear_frame();
+ }
+ else
+ printf("VModule::import_frame %d output=%p\n", __LINE__, output);
if(current_edit &&
(current_edit->asset ||
if(current_edit &&
(current_edit->asset ||
@@
-230,11
+238,8
@@
int VModule::import_frame(VFrame *output, VEdit *current_edit,
{
File *file = 0;
{
File *file = 0;
- if(debug) printf("VModule::import_frame %d cache=%p\n",
- __LINE__,
- get_cache());
- if(current_edit->asset)
- {
+//printf("VModule::import_frame %d cache=%p\n", __LINE__, get_cache());
+ if( current_edit->asset ) {
get_cache()->age();
file = get_cache()->check_out(current_edit->asset,
get_edl());
get_cache()->age();
file = get_cache()->check_out(current_edit->asset,
get_edl());
@@
-296,7
+301,7
@@
int VModule::import_frame(VFrame *output, VEdit *current_edit,
}
else
{
}
else
{
- max_position = Units::to_int64(nested_edl->tracks->total_
playable_
length() *
+ max_position = Units::to_int64(nested_edl->tracks->total_length() *
frame_rate - 1);
}
frame_rate - 1);
}
@@
-307,18
+312,19
@@
int VModule::import_frame(VFrame *output, VEdit *current_edit,
int use_cache = renderengine &&
renderengine->command->single_frame();
int use_cache = renderengine &&
renderengine->command->single_frame();
- int use_asynchronous = !use_cache && renderengine &&
+// int use_asynchronous = !use_cache &&
+// renderengine &&
// Try to make rendering go faster.
// But converts some formats to YUV420, which may degrade input format.
// Try to make rendering go faster.
// But converts some formats to YUV420, which may degrade input format.
-//
renderengine->command->realtime &&
-
renderengine->get_edl()->session->video_asynchronous;
+//
//
renderengine->command->realtime &&
+
//
renderengine->get_edl()->session->video_asynchronous;
if(file)
{
if(debug) printf("VModule::import_frame %d\n", __LINE__);
if(file)
{
if(debug) printf("VModule::import_frame %d\n", __LINE__);
-
if(use_asynchronous)
-
file->start_video_decode_thread();
-
else
+
//
if(use_asynchronous)
+
//
file->start_video_decode_thread();
+
//
else
file->stop_video_thread();
int64_t normalized_position = Units::to_int64(position *
file->stop_video_thread();
int64_t normalized_position = Units::to_int64(position *
@@
-445,7
+451,7
@@
int VModule::import_frame(VFrame *output, VEdit *current_edit,
!EQUIV(in_w, asset_w) ||
!EQUIV(in_h, asset_h))
{
!EQUIV(in_w, asset_w) ||
!EQUIV(in_h, asset_h))
{
-
if(debug)
printf("VModule::import_frame %d file -> temp -> output\n", __LINE__);
+
//
printf("VModule::import_frame %d file -> temp -> output\n", __LINE__);
@@
-480,12
+486,9
@@
int VModule::import_frame(VFrame *output, VEdit *current_edit,
if(!(*input))
{
if(!(*input))
{
- (*input) = new VFrame(0,
- -1,
- asset_w,
- asset_h,
- get_edl()->session->color_model,
- -1);
+ (*input) =
+ new VFrame(asset_w, asset_h,
+ get_edl()->session->color_model);
}
}
@@
-725,7
+728,13
@@
output->get_opengl_state(),
get_edl()->session->interpolation_type);
}
result = 1;
get_edl()->session->interpolation_type);
}
result = 1;
+
output->copy_stacks((*input));
output->copy_stacks((*input));
+
+
+//printf("VModule::import_frame %d\n", __LINE__);
+//(*input)->dump_params();
+//output->dump_params();
}
else
// file -> output
}
else
// file -> output
@@
-869,17
+878,13
@@
current_cmodel);
else
// Source not found
{
else
// Source not found
{
- if(debug) printf("VModule::import_frame %d\n", __LINE__);
- if(use_opengl)
- {
- x11_device->clear_input(output);
- }
- else
- {
- output->clear_frame();
- }
result = 1;
}
result = 1;
}
+
+// printf("VModule::import_frame %d cache=%p\n",
+// __LINE__,
+// get_cache());
+
}
else
// Source is silence
}
else
// Source is silence
@@
-980,12
+985,9
@@
int VModule::render(VFrame *output,
// Load incoming frame
if(!(*transition_input))
{
// Load incoming frame
if(!(*transition_input))
{
- (*transition_input) = new VFrame(0,
- -1,
- track->track_w,
- track->track_h,
- get_edl()->session->color_model,
- -1);
+ (*transition_input) =
+ new VFrame(track->track_w, track->track_h,
+ get_edl()->session->color_model);
}
(*transition_input)->copy_stacks(output);
}
(*transition_input)->copy_stacks(output);