diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-12-22 00:09:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-09-02 22:40:13 +0200 |
| commit | 33b0928b20618da5bc295711bfdf3d638863afa5 (patch) | |
| tree | 24af21c6a7b863d914991ae837c36b6b9b50bcce /src/wx/text_view.cc | |
| parent | 6784eb8de2451afd2dedc15c05eac043011b5afb (diff) | |
Untested conversion to num/den DCPTime.arbitrary-hz
Summary of required changes:
Replace ::from_frames with a constructor that takes num/den.
Provide and use member to_debug_string() instead of to_string().
Provide and use member to_serializable_string() and string constructor instead of fmt::to_string on .get() and number constructor.
Provide and use content_time() member instead of ContentTime constructor from DCPTime.
Use frames_round(96000) instead of get() when comparing times to see if they are "close enough".
Provide and use DCPTime(x, FrameRateChange) constructor when converting from ContentTime.
Use .seconds() when calculating proportions or sometimes when dividing by HZ.
Provide and use operator bool().
Pass explicit 96000 denominator in a lot of places.
Add member max() and use it instead of static max()
Change BOOST_CHECK_EQUAL to BOOST_CHECK
Provide operator/ and use it instead of .get() / 2.
Diffstat (limited to 'src/wx/text_view.cc')
| -rw-r--r-- | src/wx/text_view.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wx/text_view.cc b/src/wx/text_view.cc index bde7b09e9..c7412327b 100644 --- a/src/wx/text_view.cc +++ b/src/wx/text_view.cc @@ -142,7 +142,7 @@ TextView::data_start (ContentStringText cts) wxListItem list_item; list_item.SetId (_subs); _list->InsertItem (list_item); - _list->SetItem (_subs, 0, std_to_wx (cts.from().timecode (_frc->source))); + _list->SetItem(_subs, 0, std_to_wx(cts.from().timecodeX(_frc->source))); _list->SetItem (_subs, 2, std_to_wx (i.text ())); _start_times.push_back (cts.from ()); ++_subs; @@ -160,7 +160,7 @@ TextView::data_stop (ContentTime time) } for (int i = _subs - *_last_count; i < _subs; ++i) { - _list->SetItem (i, 1, std_to_wx (time.timecode (_frc->source))); + _list->SetItem(i, 1, std_to_wx(time.timecodeX(_frc->source))); } } |
