Commit graph

35 commits

Author SHA1 Message Date
38837da65e Timehandling: choose safer representation for fractional seconds (closes #939)
When drafting the time handling framework some years ago,
I foresaw the possible danger of mixing up numbers relating
to fractional seconds, with other plain numbers intended as
frame counts or as micro ticks. Thus I deliberately picked
an incompatible integer type for FSecs = boost::rational<long>

However, using long is problematic in itself, since its actual
bit length is not fixed, and especially on 32bit platforms long
is quite surprisingly defined to be the same as int.

However, meanwhile, using the new C++ features, I have blocked
pretty much any possible implicit conversion path, requiring
explicit conversions in the relevant ctor invocations. So,
after weighting in the alternatives, FSecs is now defined
as boost::rational<int64_t>.
2020-02-17 03:13:36 +01:00
8ffab2f002 Dependencies: get rid of boost-regexp (see #995)
Mostly, std::regexp can be used as a drop-in replacement.

Note: unfortunately ECMA regexps do not support lookbehind assertions.
This lookbehind is necesary here because we want to allow parsing values
from strings with additional content, which means we need explicitly to
exclude mismatches due to invalid syntax.

We can work around that issue like "either line start, or *not* one of these characters.


Alternatively we could consider to make the match more rigid,
i.e we would require the string to conain *only* the timecode spec to be parsed.
2019-06-24 02:41:02 +02:00
48a829d544 Library: clarify usage of the basic time scale
effectively we rely in the micro tick timescale promoted by libGAVL,
but it seems indicated to introduce our own constant definition.
And also clarify some comments and tests.

(this changeset does not change any values or functionality)
2018-12-10 00:12:52 +01:00
89d93a13e4 Modernise Unknown Exception handler and Exception messages 2018-04-02 01:48:51 +02:00
545a07db33 Doxygen: fill in missing file level headlines for the Library (timecode handling) 2016-11-07 16:22:04 +01:00
6339a288dd Doxygen: insert actual filename into those automatically added file comments
HOWTO
for F in $(find src -type f \( -name '*.cpp' -or -name '*.hpp' \)  -exec egrep -q '§§§' {} \; -print);
    do D=$(basename $F);
       sed -r -e"s/§§§/$D/" $F ;
done
2016-11-03 18:22:31 +01:00
48e9b7594a Doxygen: identify all files lacking a @file comment
reason is, only files with a @file comment will be processed
with further documentation commands. For this reason, our Doxygen
documentation is lacking a lot of entries.

HOWTO:
find src -type f \( -name '*.cpp' -or -name '*.hpp' \) -not -exec egrep -q '\*.+@file' {} \; -print -exec sed -i -r -e'\_\*/_,$ { 1,+0 a\
\
\
/** @file §§§\
 ** TODO §§§\
 */
}' {} \;
2016-11-03 18:20:10 +01:00
7f51a01631 clean-up some library and linkage problems
the object VTable is typically emitted when the compiler
encounters the first non-static non-inline function of
the class or a derived class.

Sometimes this happens within the wrong library and so
the compiler needs a nudge to emit those infrastructure functions.
But in most cases this works out of the box and need no further
magic incanctations, which might have a downside.
Especially because also a non-inline dtor does incur a call overhead,
whereas an inline dtor can be trivially elided.
2015-08-16 01:35:30 +02:00
7be1b7d35d Switch from TR1 preveiw to the new standard headers
- functional
- memory
- unordered collections
2014-04-03 22:42:48 +02:00
a640283e4c introduce typedef for Frame numbers (see #882) 2013-11-18 00:01:43 +01:00
22322dfec4 refactor the division/quantisation helpers
...no need to keep them in util.hpp, as they
are used rather occasionally, while util.hpp
is used pervasively.
2012-10-10 05:20:12 +02:00
b9861ef88f WIP completely remove the old Time wrapper 2011-05-15 22:51:02 +02:00
f85c86d6c8 parsing fractional seconds: unit test pass 2011-05-15 04:19:27 +02:00
6b1b6cb805 draft how to integrate parsing of timecode formats 2011-05-15 04:19:27 +02:00
3139fb7f1e more 64/32bit fun 2011-05-15 04:19:27 +02:00
80f7dba334 WIP some comments and considerations 2011-05-15 04:19:26 +02:00
bf61ff7248 WIP test-driven brainstorming: nudge by grid 2011-05-15 04:19:26 +02:00
69eb659d4e refactor to extract a special "flip representation" operation 2011-01-22 18:33:15 +01:00
acc7a19fbd Fix: now able to handle negative extended SMPTE
changed the order of propagation when wrapping
the individual digxels of the SMPTE Timecode
2011-01-22 14:41:58 +01:00
ac9e9a99df change the way the Digxel mutator is invoked
this refactoring prepares a change to address
the problems with negative extended SMPTE Timecode
2011-01-22 14:04:43 +01:00
14f233f83b WIP: some more test coverage ... unveiling yet more bugs 2011-01-22 02:35:58 +01:00
9d75739089 SMPTE Timecode (without drop frame) unit test pass 2011-01-21 20:24:41 +01:00
1a07cc9bb2 SMPTE Timecode: first round of debugging and testing 2011-01-21 16:22:01 +01:00
0493caac1d first complete implementation of SMPTE timecode
first integration of the various components
developed thus far; design still needs some
improvements, esp. regarding the effectiveFramerate
Note NTSC-drop-frame not yet supported...
2011-01-21 11:42:29 +01:00
f930703e86 WIP draft cascading breakdown of time into timecode components
TODO not entirely correct... and how to access the framerate?
2011-01-20 22:17:25 +01:00
05383ea44a crafting a integer scale wrapping util, for timecode conversions 2011-01-20 13:21:14 +01:00
95a1687a5b draft how a SMPTE-Timecode element could be implemented
passes Compiler, but thats about all...
2011-01-18 05:01:25 +01:00
2c90335b1d WIP idea how to represent support for some timecode formats
concrete quantiser instances need a way to state
support for just some timecode formats -- yet I dont
want to push vectors aroud all over the place
2011-01-16 15:41:34 +01:00
eb89547265 get rid of the QuantiserRef
this is going to become soooo complicated
better just bite the bullet and use a shared_ptr
2011-01-15 00:52:02 +01:00
457d4fb7c4 define or stub to get it to compile; add function time-from gridnr 2011-01-14 05:33:50 +01:00
a1f2a60427 WIP design draft regarding the interplay of quantisation and timecode 2011-01-13 23:56:52 +01:00
237d287021 change time.h into a multilingual header 2011-01-13 03:36:12 +01:00
159d3928d8 Timecode stub implementation...
now passes Compiler and Linker again
2011-01-13 03:36:10 +01:00
e7f5ce9e33 WIP rework timecode format hierarchy
second try: eliminate base class,
work with concrete formats allways...
2011-01-13 03:36:09 +01:00
15214cc069 WIP start stubbing and defining time quantisation and timecode entities 2011-01-13 03:36:08 +01:00