X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Frecordprefs.C;h=6ff6182525c84b720a773f3b8241ede06b21bbaf;hb=3c357d8bcdb855ea71487d2b2b6e518bf8a493f6;hp=5ca3bb84c19be6efa0f86d62cc477332a0476a47;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/recordprefs.C b/cinelerra-5.1/cinelerra/recordprefs.C index 5ca3bb84..6ff61825 100644 --- a/cinelerra-5.1/cinelerra/recordprefs.C +++ b/cinelerra-5.1/cinelerra/recordprefs.C @@ -2,21 +2,21 @@ /* * CINELERRA * Copyright (C) 2008-2013 Adam Williams - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * */ #include "adeviceprefs.h" @@ -63,14 +63,14 @@ void RecordPrefs::create_objects() y = mwindow->theme->preferencesoptions_y; int x0 = x, y0 = y; - add_subwindow(title = new BC_Title(x, y, _("File Format:"), + add_subwindow(title = new BC_Title(x, y, _("File Format:"), LARGEFONT, resources->text_default)); y += title->get_h() + 5; - recording_format = new FormatTools(mwindow, this, + recording_format = new FormatTools(mwindow, this, pwindow->thread->edl->session->recording_format); - recording_format->create_objects(x, y, + recording_format->create_objects(x, y, 1, // Include tools for audio 1, // Include tools for video 1, // Include checkbox for audio @@ -91,8 +91,8 @@ void RecordPrefs::create_objects() y += 5; - add_subwindow(title = new BC_Title(x, y, - _("Audio In"), LARGEFONT, + add_subwindow(title = new BC_Title(x, y, + _("Audio In"), LARGEFONT, resources->text_default)); y += title->get_h() + 5; @@ -110,7 +110,7 @@ void RecordPrefs::create_objects() int pad = RecordWriteLength::calculate_h(this, MEDIUMFONT, 1, - 1) + + 1) + mwindow->theme->widget_border; add_subwindow(title0 = new BC_Title(x, y, _("Samples read from device:"))); add_subwindow(title1 = new BC_Title(x, y + pad, _("Samples to write to disk:"))); @@ -125,8 +125,8 @@ void RecordPrefs::create_objects() RecordFragment *menu; add_subwindow(menu = new RecordFragment(x2, y, - pwindow, - this, + pwindow, + this, string)); y += menu->get_h() + mwindow->theme->widget_border; menu->add_item(new BC_MenuItem("1024")); @@ -143,9 +143,9 @@ void RecordPrefs::create_objects() add_subwindow(textbox = new RecordWriteLength(mwindow, pwindow, x2, y, string)); y += textbox->get_h() + mwindow->theme->widget_border; add_subwindow(textbox = new RecordSampleRate(pwindow, x2, y)); - add_subwindow(new SampleRatePulldown(mwindow, - textbox, - x2 + textbox->get_w(), + add_subwindow(new SampleRatePulldown(mwindow, + textbox, + x2 + textbox->get_w(), y)); y += textbox->get_h() + mwindow->theme->widget_border; @@ -153,7 +153,7 @@ void RecordPrefs::create_objects() channels->create_objects(); y += channels->get_h() + mwindow->theme->widget_border; - RecordMap51_2 *record_map51_2 = new RecordMap51_2(mwindow, pwindow, x, y, + RecordMap51_2 *record_map51_2 = new RecordMap51_2(mwindow, pwindow, x, y, pwindow->thread->edl->session->aconfig_in->map51_2); add_subwindow(record_map51_2); @@ -165,7 +165,7 @@ void RecordPrefs::create_objects() rec_gain->create_objects(); x2 += rec_gain->get_w() + 30; - add_subwindow(new RecordRealTime(mwindow, pwindow, x2, y, + add_subwindow(new RecordRealTime(mwindow, pwindow, x2, y, pwindow->thread->edl->session->real_time_record)); y += 30; x = 5; @@ -179,9 +179,9 @@ void RecordPrefs::create_objects() resources->text_default)); y += 25; - add_subwindow(new BC_Title(x, y, _("Record Driver:"), MEDIUMFONT, + add_subwindow(new BC_Title(x, y, _("Record Driver:"), MEDIUMFONT, resources->text_default)); - video_in_device = new VDevicePrefs(x + 110, y, pwindow, this, 0, + video_in_device = new VDevicePrefs(x + 110, y, pwindow, this, 0, pwindow->thread->edl->session->vconfig_in, MODERECORD); video_in_device->initialize(1); @@ -206,8 +206,8 @@ void RecordPrefs::create_objects() positioning->create_objects(); y += positioning->get_h() + 5; - add_subwindow(new RecordSyncDrives(pwindow, - pwindow->thread->edl->session->record_sync_drives, + add_subwindow(new RecordSyncDrives(pwindow, + pwindow->thread->edl->session->record_sync_drives, x, y)); y += 35; @@ -220,7 +220,7 @@ void RecordPrefs::create_objects() x += 10; add_subwindow(h_text = new RecordH(pwindow, x, y)); x += h_text->get_w(); - add_subwindow(new FrameSizePulldown(mwindow->theme, + add_subwindow(new FrameSizePulldown(mwindow->theme, w_text, h_text, x, y)); y += 30; @@ -248,24 +248,24 @@ int RecordPrefs::show_window(int flush) -RecordFragment::RecordFragment(int x, - int y, - PreferencesWindow *pwindow, - RecordPrefs *record, +RecordFragment::RecordFragment(int x, + int y, + PreferencesWindow *pwindow, + RecordPrefs *record, char *text) - : BC_PopupMenu(x, - y, - 100, + : BC_PopupMenu(x, + y, + 100, text, 1) -{ +{ this->pwindow = pwindow; this->record = record; } -int RecordFragment::handle_event() +int RecordFragment::handle_event() { - pwindow->thread->edl->session->record_fragment_size = atol(get_text()); + pwindow->thread->edl->session->record_fragment_size = atol(get_text()); return 1; } @@ -277,23 +277,23 @@ int RecordFragment::handle_event() RecordWriteLength::RecordWriteLength(MWindow *mwindow, PreferencesWindow *pwindow, int x, int y, char *text) : BC_TextBox(x, y, 100, 1, text) -{ - this->pwindow = pwindow; +{ + this->pwindow = pwindow; } int RecordWriteLength::handle_event() -{ +{ pwindow->thread->edl->session->record_write_length = atol(get_text()); - return 1; + return 1; } -RecordRealTime::RecordRealTime(MWindow *mwindow, +RecordRealTime::RecordRealTime(MWindow *mwindow, PreferencesWindow *pwindow, int x, int y, int value) - : BC_CheckBox(x, y, value, + : BC_CheckBox(x, y, value, _("Record in realtime priority (root only)")) -{ - this->pwindow = pwindow; +{ + this->pwindow = pwindow; } int RecordRealTime::handle_event() @@ -303,11 +303,11 @@ int RecordRealTime::handle_event() } -RecordMap51_2::RecordMap51_2(MWindow *mwindow, +RecordMap51_2::RecordMap51_2(MWindow *mwindow, PreferencesWindow *pwindow, int x, int y, int value) : BC_CheckBox(x, y, value, _("Map 5.1->2")) -{ - this->pwindow = pwindow; +{ + this->pwindow = pwindow; } int RecordMap51_2::handle_event() @@ -329,11 +329,11 @@ int RecordSampleRate::handle_event() } -RecordRealtimeTOC::RecordRealtimeTOC(MWindow *mwindow, +RecordRealtimeTOC::RecordRealtimeTOC(MWindow *mwindow, PreferencesWindow *pwindow, int x, int y, int value) : BC_CheckBox(x, y, value, _("Realtime TOC")) -{ - this->pwindow = pwindow; +{ + this->pwindow = pwindow; } int RecordRealtimeTOC::handle_event() @@ -346,12 +346,12 @@ int RecordRealtimeTOC::handle_event() // DuplexEnable::DuplexEnable(MWindow *mwindow, PreferencesWindow *pwindow, int x, int y, int value) // : BC_CheckBox(x, y, value, _("Enable full duplex")) // { this->pwindow = pwindow; } -// +// // int DuplexEnable::handle_event() // { // pwindow->thread->edl->session->enable_duplex = get_value(); // } -// +// RecordW::RecordW(PreferencesWindow *pwindow, int x, int y) @@ -390,11 +390,11 @@ int RecordFrameRate::handle_event() RecordChannels::RecordChannels(PreferencesWindow *pwindow, BC_SubWindow *gui, int x, int y) - : BC_TumbleTextBox(gui, + : BC_TumbleTextBox(gui, pwindow->thread->edl->session->aconfig_in->channels, 1, MAX_CHANNELS, x, y, 100) { - this->pwindow = pwindow; + this->pwindow = pwindow; } int RecordChannels::handle_event() @@ -408,7 +408,7 @@ RecordGain::RecordGain(PreferencesWindow *pwindow, BC_SubWindow *gui, int x, int pwindow->thread->edl->session->aconfig_in->rec_gain, 0.0001f, 10000.0f, x, y, 72) { - this->pwindow = pwindow; + this->pwindow = pwindow; this->set_increment(0.1); } @@ -422,27 +422,27 @@ int RecordGain::handle_event() VideoWriteLength::VideoWriteLength(PreferencesWindow *pwindow, char *text, int y) : BC_TextBox(260, y, 100, 1, text) -{ - this->pwindow = pwindow; +{ + this->pwindow = pwindow; } int VideoWriteLength::handle_event() -{ - pwindow->thread->edl->session->video_write_length = atol(get_text()); +{ + pwindow->thread->edl->session->video_write_length = atol(get_text()); return 1; } VideoCaptureLength::VideoCaptureLength(PreferencesWindow *pwindow, char *text, int y) : BC_TextBox(260, y, 100, 1, text) -{ +{ this->pwindow = pwindow; } int VideoCaptureLength::handle_event() -{ - pwindow->thread->edl->session->vconfig_in->capture_length = atol(get_text()); - return 1; +{ + pwindow->thread->edl->session->vconfig_in->capture_length = atol(get_text()); + return 1; } CaptureLengthTumbler::CaptureLengthTumbler(PreferencesWindow *pwindow, BC_TextBox *text, int x, int y) @@ -512,12 +512,12 @@ int RecordPositioning::handle_event() RecordSyncDrives::RecordSyncDrives(PreferencesWindow *pwindow, int value, int x, int y) : BC_CheckBox(x, y, value, _("Sync drives automatically")) { - this->pwindow = pwindow; + this->pwindow = pwindow; } -int RecordSyncDrives::handle_event() +int RecordSyncDrives::handle_event() { - pwindow->thread->edl->session->record_sync_drives = get_value(); + pwindow->thread->edl->session->record_sync_drives = get_value(); return 1; }