#include <units.h>
Public Member Functions | |
| Units () | |
Static Public Member Functions | |
| static int | timeformat_totype (char *tcf) |
| static float | toframes (int64_t samples, int sample_rate, float framerate) |
| static int64_t | toframes_round (int64_t samples, int sample_rate, float framerate) |
| static double | fix_framerate (double value) |
| static double | atoframerate (char *text) |
| static void | punctuate (char *string) |
| static char * | format_to_separators (int time_format) |
| static int64_t | tosamples (float frames, int sample_rate, float framerate) |
| static char * | totext (char *text, int64_t samples, int time_format, int samplerate, float frame_rate=0, float frames_per_foot=0) |
| static char * | totext (char *text, double seconds, int time_format, int sample_rate=0, float frame_rate=0, float frames_per_foot=0) |
| static int64_t | fromtext (char *text, int samplerate, int time_format, float frame_rate, float frames_per_foot) |
| static double | text_to_seconds (char *text, int samplerate, int time_format, float frame_rate, float frames_per_foot) |
| static char * | print_time_format (int time_format, char *string) |
| static float | xy_to_polar (int x, int y) |
| static void | polar_to_xy (float angle, int radius, int &x, int &y) |
| static int64_t | round (double result) |
| static int64_t | to_int64 (double result) |
| static float | quantize10 (float value) |
| static float | quantize (float value, float precision) |
| static void * | int64_to_ptr (uint64_t value) |
| static uint64_t | ptr_to_int64 (void *ptr) |
| static void | fix_double (double *x) |
Definition at line 103 of file units.h.
| int Units::timeformat_totype | ( | char * | tcf | ) | [static] |
Definition at line 412 of file units.C.
References TIME_FEET_FRAMES, TIME_FEET_FRAMES__STR, TIME_FRAMES, TIME_FRAMES__STR, TIME_HMS, TIME_HMS2, TIME_HMS2__STR, TIME_HMS3, TIME_HMS3__STR, TIME_HMS__STR, TIME_HMSF, TIME_HMSF__STR, TIME_SAMPLES, TIME_SAMPLES__STR, TIME_SAMPLES_HEX, TIME_SAMPLES_HEX__STR, TIME_SECONDS, and TIME_SECONDS__STR.
Referenced by TitleMain::process_realtime().
| float Units::toframes | ( | int64_t | samples, | |
| int | sample_rate, | |||
| float | framerate | |||
| ) | [static] |
Definition at line 426 of file units.C.
Referenced by RecordEngine::goto_next_label(), RecordEngine::goto_prev_label(), and VRender::run().
| int64_t Units::toframes_round | ( | int64_t | samples, | |
| int | sample_rate, | |||
| float | framerate | |||
| ) | [static] |
| double Units::fix_framerate | ( | double | value | ) | [static] |
Definition at line 439 of file units.C.
Referenced by atoframerate(), EDLSession::boundaries(), InterpolateVideo::load_defaults(), Decimate::load_defaults(), InterpolateVideo::read_data(), and Decimate::read_data().
| double Units::atoframerate | ( | char * | text | ) | [static] |
Definition at line 453 of file units.C.
References fix_framerate().
Referenced by InterpolateVideoRate::handle_event(), DecimateRate::handle_event(), SetFrameRateTextBox::handle_event(), and NewFrameRate::handle_event().

| void Units::punctuate | ( | char * | string | ) | [static] |
| char * Units::format_to_separators | ( | int | time_format | ) | [static] |
Definition at line 638 of file units.C.
References TIME_FEET_FRAMES, TIME_FRAMES, TIME_HMS, TIME_HMS2, TIME_HMS3, TIME_HMSF, TIME_SAMPLES, TIME_SAMPLES_HEX, and TIME_SECONDS.
Referenced by TimeEntry::create_objects(), and ZoomBar::update_formatting().
| int64_t Units::tosamples | ( | float | frames, | |
| int | sample_rate, | |||
| float | framerate | |||
| ) | [static] |
Definition at line 460 of file units.C.
Referenced by RecordEngine::initialize(), and VRender::run().
| char * Units::totext | ( | char * | text, | |
| int64_t | samples, | |||
| int | time_format, | |||
| int | samplerate, | |||
| float | frame_rate = 0, |
|||
| float | frames_per_foot = 0 | |||
| ) | [static] |
Definition at line 269 of file units.C.
Referenced by BatchRenderGUI::create_list(), TimeEntry::create_objects(), AssetPicon::create_objects(), AssetEditWindow::create_objects(), ExportEDLAsset::double_to_CMX3600(), MTimeBar::draw_time(), MainProgressBar::get_time(), VRender::insert_timecode(), TitleMain::process_realtime(), Render::run(), MainPackageRenderer::set_progress(), VWindowEditing::to_clip(), MWindow::to_clip(), TimeEntry::update(), MainProgressBar::update(), MainClock::update(), RecordGUI::update_batches(), TrackCanvas::update_drag_auto(), TrackCanvas::update_drag_floatauto(), TrackCanvas::update_drag_pluginauto(), TrackCanvas::update_drag_toggleauto(), ZoomBar::update_playback(), ToTextBox::update_position(), LengthTextBox::update_position(), FromTextBox::update_position(), RecordGUI::update_title(), and ZoomPanel::value_to_text().
| char * Units::totext | ( | char * | text, | |
| double | seconds, | |||
| int | time_format, | |||
| int | sample_rate = 0, |
|||
| float | frame_rate = 0, |
|||
| float | frames_per_foot = 0 | |||
| ) | [static] |
Definition at line 160 of file units.C.
References TIME_FEET_FRAMES, TIME_FRAMES, TIME_HMS, TIME_HMS2, TIME_HMS3, TIME_HMSF, TIME_SAMPLES, TIME_SAMPLES_HEX, TIME_SECONDS, and to_int64().

| int64_t Units::fromtext | ( | char * | text, | |
| int | samplerate, | |||
| int | time_format, | |||
| float | frame_rate, | |||
| float | frames_per_foot | |||
| ) | [static] |
Definition at line 279 of file units.C.
References BCTEXTLEN, TIME_FEET_FRAMES, TIME_FRAMES, TIME_HMS, TIME_HMS2, TIME_HMS3, TIME_HMSF, TIME_SAMPLES, TIME_SAMPLES_HEX, and TIME_SECONDS.
Referenced by text_to_seconds(), and ZoomPanel::text_to_zoom().
| double Units::text_to_seconds | ( | char * | text, | |
| int | samplerate, | |||
| int | time_format, | |||
| float | frame_rate, | |||
| float | frames_per_foot | |||
| ) | [static] |
Definition at line 396 of file units.C.
References fromtext().
Referenced by FileMOV::format_to_asset(), TimeTextBox::handle_event(), and ZoomBar::set_selection().

| char * Units::print_time_format | ( | int | time_format, | |
| char * | string | |||
| ) | [static] |
| float Units::xy_to_polar | ( | int | x, | |
| int | y | |||
| ) | [static] |
Definition at line 469 of file units.C.
References M_PI.
Referenced by SetChannelsCanvas::button_press_event(), and SetChannelsCanvas::cursor_motion_event().
| void Units::polar_to_xy | ( | float | angle, | |
| int | radius, | |||
| int & | x, | |||
| int & | y | |||
| ) | [static] |
Definition at line 510 of file units.C.
References M_PI.
Referenced by SetChannelsCanvas::get_dimensions().
| int64_t Units::round | ( | double | result | ) | [static] |
Definition at line 518 of file units.C.
Referenced by EDL::align_to_frame(), TrackCanvas::draw_brender_start(), TrackCanvas::draw_drag_handle(), TrackCanvas::draw_highlighting(), TrackCanvas::draw_loop_points(), TrackCanvas::draw_transitions(), ResourcePixmap::draw_video_resource(), TrackCanvas::edit_dimensions(), PluginVClient::edl_to_local(), MWindow::expand_sample(), MWindow::find_cursor(), Edit::frames_per_picon(), PackagingEngineDefault::get_package_single_farm(), PackagingEngineOGG::get_package_single_farm(), MWindow::goto_end(), PluginVClient::local_to_edl(), TrackCanvas::plugin_dimensions(), VAttachmentPoint::render(), PackageRenderer::render_package(), File::set_audio_position(), SampleScroll::set_position(), BRenderThread::start(), VTrack::to_units(), MenuVEffectThread::to_units(), MenuAEffectThread::to_units(), ATrack::to_units(), VRender::tounits(), ARender::tounits(), and MWindow::zoom_in_sample().
| int64_t Units::to_int64 | ( | double | result | ) | [static] |
Definition at line 537 of file units.C.
Referenced by EDL::align_to_frame(), PackageRenderer::create_engine(), PackageDispatcher::create_packages(), PackagingEngineDefault::create_packages_single_farm(), PackagingEngineOGG::create_packages_single_farm(), MainCursor::draw(), TrackCanvas::draw_highlighting(), TrackCanvas::draw_paste_destination(), ResourcePixmap::draw_video_resource(), PackageDispatcher::get_package(), PackagingEngineDefault::get_package_single_farm(), PackagingEngineDefault::get_progress_max(), PackageDispatcher::get_progress_max(), PackagingEngineOGG::get_progress_max(), Autos::paste(), ReFrame::process_loop(), PackageRenderer::render_package(), Edits::resample(), Track::shift_effects(), Track::shift_keyframes(), PluginServer::show_gui(), VPatchGUI::synchronize_fade(), VTrack::to_units(), ATrack::to_units(), totext(), VRender::tounits(), PluginServer::update_gui(), and CTracking::update_scroll().
| float Units::quantize10 | ( | float | value | ) | [static] |
| float Units::quantize | ( | float | value, | |
| float | precision | |||
| ) | [static] |
Definition at line 530 of file units.C.
Referenced by HistogramConfig::boundaries(), BC_FPot::percentage_to_value(), and BC_FSlider::update_selection().
| void * Units::int64_to_ptr | ( | uint64_t | value | ) | [static] |
Definition at line 563 of file units.C.
References BYTE_ORDER.
Referenced by RenderFarmFSClient::fopen(), and RenderFarmFSServer::handle_request().
| uint64_t Units::ptr_to_int64 | ( | void * | ptr | ) | [static] |
Definition at line 601 of file units.C.
References BYTE_ORDER.
Referenced by RenderFarmFSClient::get_64(), and RenderFarmFSServer::handle_request().
| void Units::fix_double | ( | double * | x | ) | [static] |
Definition at line 671 of file units.C.
Referenced by MWindow::next_edit_handle(), and MWindow::prev_edit_handle().
1.5.5