summaryrefslogtreecommitdiff
path: root/src/dcp_time.cc
AgeCommit message (Collapse)Author
2024-03-16Allow SMPTE timecodes with 3 digits in the editable units field.Carl Hetherington
It seems that these should only be present if the timecode rate is 101 or above, and in that case all timecodes should have 3 editable rate digits, but someone sent a DCP from what seems to be EasyDCP Creator and it has one timecode of 00:05:01:000.
2024-02-25Reduce some general usings a bit.Carl Hetherington
2021-03-15Fix various bugs in subtitle/ccap verification.Carl Hetherington
Check that subtitles don't overlap reel boundaries, and fix a few tests that trip this check. Fix confusion when calculating subtitle timings during verification where the picture asset frame rate was being used rather than the subtitle asset's edit rate. Do the subtitle timing verification for Interop as well as SMPTE subtitles. Take <StartTime> tags into account when checking subtitles, even though Bv2.1 says they should be set to 0. Rename Time::as_editable_units to Time::as_editable_units_ceil and add a _floor variant, then use that to round down when checking reel boundary overlaps.
2021-01-24Tidying.Carl Hetherington
2021-01-21Use enum class for the things in types.hCarl Hetherington
2020-04-14s/DCPReadError/ReadError/gCarl Hetherington
2018-05-02rebase() would round up and so it was possible for ticks to go out of range.Carl Hetherington
Now it still rounds up but then copes with overflow.
2018-02-07db8af2f changed rebase() to round down when rebasing times, butCarl Hetherington
did not say why. This rounding down produces some unexpected results, e.g. taking 41 at a TCR of 1000 to a TCR of 24 gives 0, which upsets those who use DCP-o-matic and put in a SRT subtitle ending at ,041 --- the sub time is rounded down to 0 for a SMPTE DCP. This commit restores round-to-nearest behaviour.
2016-08-22Fix ridiculous thinko in Time::operator{<,>}Carl Hetherington
Before this x < x and x > x were true.
2016-08-11Remove stringstream from Time.Carl Hetherington
2016-07-22Use locked_sstream. Replace once parse_stream with parse_memory.Carl Hetherington
2016-06-14Tighten up time parsing, and also allow the previouslyCarl Hetherington
unsupported Interop HH:MM:SS.sss format for times.
2016-06-13Add OpenSSL licence exception.Carl Hetherington
2016-06-01Still more licence fixups.Carl Hetherington
2016-05-25No-op; Fix GPL address and mention libdcp by name.Carl Hetherington
2016-01-13Allow fractional frames per second when computing Time from frames.Carl Hetherington
2015-10-15Force specification of timecode rate when creating a Time from seconds.Carl Hetherington
2015-09-28Round down when rebasing times.Carl Hetherington
2015-09-12A number of SMPTE subtitle syntax fixes.Carl Hetherington
2015-07-20Round up in Time::as_editable_units.Carl Hetherington
2015-06-24No-op: whitespace.Carl Hetherington
2015-06-05Bits of tidying; comments.Carl Hetherington
2015-06-05Initial work on SMPTE subtitles.Carl Hetherington
2015-06-04to_* to as_* in a few method names.Carl Hetherington
2015-05-06Pad times with zeros; add Time::rebase().Carl Hetherington
2015-01-11Fix uninitialised variable.Carl Hetherington
2015-01-11Add Time::to_seconds.Carl Hetherington
2015-01-10Fix handling of timing in SMPTE subtitles.Carl Hetherington
2014-12-23Some missed bits from 0.x.Carl Hetherington
2014-11-02Forward-port time rounding fix from 0.x.Carl Hetherington
2014-10-06Forward-port heinous time thinko from 0.x.Carl Hetherington
2014-07-10Add a couple of accessors.Carl Hetherington
2014-05-14Merge master.Carl Hetherington
2014-05-11Use raw_convert instead of boost::lexical_cast as it seemsCarl Hetherington
that lexical_cast will sometimes use a thousands separator (i.e. it will convert 1234 to a string 1,234). It appears not to be possible safely to turn this off (you have to set the global locale). Instead, raw_convert uses a stringstream which you can imbue() with std::locale::classic() to turn off the locale-specific behaviour.
2014-01-27Some tidying up.Carl Hetherington
2014-01-17namespace libdcp -> dcp.Carl Hetherington
2013-10-24Remove debug code.Carl Hetherington
2013-10-24Fix ticks calculations.Carl Hetherington
2013-10-24Add Time constructor from ticks; fix Time::to_ticks().Carl Hetherington
2013-06-18Merge master.Carl Hetherington
2013-02-10Derive exceptions from boost::exception and use boost::throw_exception to ↵Carl Hetherington
enable thread-safe exception handling by callers.
2013-01-14Merge masterCarl Hetherington
2013-01-09Comment tweaks.Carl Hetherington
2012-12-31Initial hacks.Carl Hetherington
2012-10-19Initial work on subtitle writing.Carl Hetherington
2012-08-22Some maths operations with Time.Carl Hetherington
2012-08-21Pick up effect and effect color.Carl Hetherington
2012-08-16Some comments.Carl Hetherington
2012-08-13Fix up some bugs with subs.Carl Hetherington
2012-08-134th parameter of time is ticks (1 tick = 4ms) not millisecondsCarl Hetherington