projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add audio to proxy, and minor bug fixes
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
record.C
diff --git
a/cinelerra-5.1/cinelerra/record.C
b/cinelerra-5.1/cinelerra/record.C
index 719c8869f9fb04e6198ea7d4007dbafad726d5c2..473e10c32c1a4b185ddb898242e5b761ea96fc11 100644
(file)
--- a/
cinelerra-5.1/cinelerra/record.C
+++ b/
cinelerra-5.1/cinelerra/record.C
@@
-230,6
+230,8
@@
int Record::load_defaults()
video_zoom = defaults->get("RECORD_VIDEO_Z", (float)1);
picture->load_defaults();
reverse_interlace = defaults->get("REVERSE_INTERLACE", 0);
video_zoom = defaults->get("RECORD_VIDEO_Z", (float)1);
picture->load_defaults();
reverse_interlace = defaults->get("REVERSE_INTERLACE", 0);
+ do_cursor = defaults->get("RECORD_CURSOR", 0);
+ do_big_cursor = defaults->get("RECORD_BIG_CURSOR", 0);
for( int i=0; i<MAXCHANNELS; ++i ) {
sprintf(string, "RECORD_DCOFFSET_%d", i);
dc_offset[i] = defaults->get(string, 0);
for( int i=0; i<MAXCHANNELS; ++i ) {
sprintf(string, "RECORD_DCOFFSET_%d", i);
dc_offset[i] = defaults->get(string, 0);
@@
-266,6
+268,8
@@
int Record::save_defaults()
defaults->update("RECORD_VIDEO_Z", video_zoom);
picture->save_defaults();
defaults->update("REVERSE_INTERLACE", reverse_interlace);
defaults->update("RECORD_VIDEO_Z", video_zoom);
picture->save_defaults();
defaults->update("REVERSE_INTERLACE", reverse_interlace);
+ defaults->update("RECORD_CURSOR", do_cursor);
+ defaults->update("RECORD_BIG_CURSOR", do_big_cursor);
for( int i=0; i<MAXCHANNELS; ++i ) {
sprintf(string, "RECORD_DCOFFSET_%d", i);
defaults->update(string, dc_offset[i]);
for( int i=0; i<MAXCHANNELS; ++i ) {
sprintf(string, "RECORD_DCOFFSET_%d", i);
defaults->update(string, dc_offset[i]);
@@
-437,9
+441,10
@@
void Record::run()
void Record::stop(int wait)
{
stop_operation();
void Record::stop(int wait)
{
stop_operation();
- if(
wait && running()
)
+ if(
record_gui
)
record_gui->set_done(1);
record_gui->set_done(1);
- join();
+ if( wait )
+ join();
window_lock->lock("Record::stop");
delete record_thread; record_thread = 0;
delete record_monitor; record_monitor = 0;
window_lock->lock("Record::stop");
delete record_thread; record_thread = 0;
delete record_monitor; record_monitor = 0;
@@
-697,8
+702,7
@@
const char* Record::current_mode()
double Record::current_display_position()
{
double Record::current_display_position()
{
-//printf("Record::current_display_position "
-// _LD " " _LD "\n", total_samples, total_frames)
+//printf("Record::current_display_position "%jd %jd\n", total_samples, total_frames);
double result = -1.;
Asset *asset = default_asset;
if( writing_file ) {
double result = -1.;
Asset *asset = default_asset;
if( writing_file ) {
@@
-995,6
+999,7
@@
void Record::open_video_input()
master_channel->copy_usage(vdevice->channel);
picture->copy_usage(vdevice->picture);
vdevice->set_field_order(reverse_interlace);
master_channel->copy_usage(vdevice->channel);
picture->copy_usage(vdevice->picture);
vdevice->set_field_order(reverse_interlace);
+ vdevice->set_do_cursor(do_cursor, do_big_cursor);
vdevice->set_adevice(adevice);
if( adevice ) adevice->set_vdevice(vdevice);
set_dev_channel(get_current_channel());
vdevice->set_adevice(adevice);
if( adevice ) adevice->set_vdevice(vdevice);
set_dev_channel(get_current_channel());
@@
-1095,8
+1100,8
@@
void Record::start_writing_file()
if( !writing_file ) {
written_frames = 0;
written_samples = 0;
if( !writing_file ) {
written_frames = 0;
written_samples = 0;
- do_video = File::
supports_video(default_asset->forma
t);
- do_audio = File::
supports_audio(default_asset->forma
t);
+ do_video = File::
renders_video(default_asse
t);
+ do_audio = File::
renders_audio(default_asse
t);
if( single_frame ) do_audio = 0;
if( !do_video && single_frame )
single_frame = 0;
if( single_frame ) do_audio = 0;
if( !do_video && single_frame )
single_frame = 0;
@@
-1207,11
+1212,15
@@
void Record::set_power_off(int value)
record_gui->power_off->update(value);
}
record_gui->power_off->update(value);
}
-
int
Record::set_video_picture()
+
void
Record::set_video_picture()
{
if( default_asset->video_data && vdevice )
vdevice->set_picture(picture);
{
if( default_asset->video_data && vdevice )
vdevice->set_picture(picture);
- return 0;
+}
+
+void Record::set_do_cursor()
+{
+ vdevice->set_do_cursor(do_cursor, do_big_cursor);
}
void Record::set_translation(int x, int y)
}
void Record::set_translation(int x, int y)
@@
-2040,7
+2049,7
@@
run()
usleep(500000);
disable_cancel();
color ^= YELLOW ^ BLUE;
usleep(500000);
disable_cancel();
color ^= YELLOW ^ BLUE;
- if( timer.get_difference() > 10*60*1000 ) { // 10 min
i
tes
+ if( timer.get_difference() > 10*60*1000 ) { // 10 min
u
tes
record->stop_commercial_capture(0);
done = 1;
}
record->stop_commercial_capture(0);
done = 1;
}