Commit graph

44 commits

Author SHA1 Message Date
afa7ca2e4d Upgrade: switch to C++23 (see #1245)
The Lumiera »Reference Platform« is now upgraded to Debian/Buster, which provides GCC-14 and Clang-20.
Thus the compiler support for C++20 language features seems solid enough, and C++23,
while still in ''experimental stage'' can be seen as a complement and addendum.

This changeset
 * upgrades the compile switches for the build system
 * provides all the necessary adjustments to keep the code base compilable

Notable changes:
 * λ-capture by value now requires explicit qualification how to handle `this`
 * comparison operators are now handled transparently by the core language,
   largely obsoleting boost::operators. This change incurs several changes
   to implicit handling rules and causes lots of ambiguities — which typically
   pinpoint some long standing design issues, especially related to MObjects
   and the ''time entities''. Most tweaks done here can be ''considered preliminary''
 * unfortunately the upgraded standard ''fails'' to handle **tuple-like** entities
   in a satisfactory way — rather an ''exposition-only'' concept is introduced,
   which applies solely to some containers from the STL, thereby breaking some
   very crucial code in the render entities, which was built upon the notion of
   ''tuple-like'' entities and the ''tuple protocol''. The solution is to
   abandon the STL in this respect and **provide an alternative implementation**
   of the `apply` function and related elements.
2025-06-19 01:52:55 +02:00
a317593822 clean-up: dismantle the low-level time handling library (see #1259)
Initially we assumed that »handling time« is largely a matter of computation.
''Time is just a value'' and can be treated with integral arithmetic, some
modulus computations and pre-defined constants.

This turned out to be a mistake. Anything related to time is intricate,
and it is essential to distinguish different meanings of "times"
 - time values related to an internal computation framework have
   implementation-defined meaning and should be ''marked as opaque''
 - temporal data can be ''mapped to a grid scale'' — an essential step
   for media processing, which however incurs information loss
 - externally relevant time specifications are represented symbolically,
   by translation into a ''Time Code''

Drawing from these insights, a framework for time handling has been established;
building in part on the low-level function style base implementation.
Exposing this base implementation as a C-library however is considered
dangerous, as it may lure into ''ad hoc'' computations, which are a major
source of inconsistencies and notorious defects in many media applications.
2025-05-29 02:04:36 +02:00
55b39ae592 clean-up: retract usages of »time component access«
While these function may seem superficially plausible,
I more and more come to the conclusion that offering such
function as ''basic building blocks'' is in itself an
ill-guided approach to handling of time entities.

Time is neither „just a number“ — nor does it „contain“ hours, minutes and seconds.
It is possible to ''represent'' it through a **time-code**, which incurs
a quantisation step and implies a reference grid.

Thus Lumiera ''should not offer'' a »basic time handling library«.
Doing so would be just an invitation to bypass proper time handling
and avoid the use of more demanding but also more adequate mental concepts.

So the next step will be to remove functions not deemed adequate, and
better directly inline the respective modulus based computations.
Other functions can be integrated into the respective implementation
translation units for time quantisation and timecode representation.
2025-05-27 20:43:52 +02:00
d31d4295a4 clean-up: remove gavl_time_t as external dependency
Indeed — this change set is kind of sad.
Because I still admire the design of the GAVL library,
and would love to use it for processing of raw video.
However, up to now, we never got to the point of actually
doing so. For the future, I am not sure if there remains
room to rely on lib-GAVL, since FFmpeg roughly covers
a similar ground (and a lot beyond that). And providing
a plug-in for FFmpeg is unavoidable, practically speaking.

So I still retain the nominal dependency on lib-GAVL
in the Build system (since it is still packaged in Debian).

But it is pointless to rely on this library just for an
external type-def `gavl_time_t`. We owe much to this
inspiration, but it can be expected that we'll wrap
these raw time-values into a dedicated marker type
soon, and we certainly won't be exposing any C-style
interface for time calculations in future, since
we do not want anyone to side-step the Lumiera
time handling framework in favour of working
„just with plain numbers“


NOTE: lib-GAVL hompage has moved to Github:
      https://github.com/bplaum/gavl
2025-05-17 23:12:47 +02:00
9393942366 Invocation: Analysis pertaining to storage for param data
During Render Node invocation, automation parameter data must be maintained.
For the simple standard path, this just implies to store the ''absolute nominal Time''
directly in the invoking stack frame and let some parameter adaptors do the translation.
However, it is conceivable to have much more elaborate translation functions,
and thus we must be prepared to handle an arbitrary number of parameter slots,
where each slot has arbitrary storage requirements.

The conclusion is to start with an intrusive linked list of overflow buckets.
2024-12-07 18:15:44 +01:00
806db414dd Copyright: clarify and simplify the file headers
* Lumiera source code always was copyrighted by individual contributors
 * there is no entity "Lumiera.org" which holds any copyrights
 * Lumiera source code is provided under the GPL Version 2+

== Explanations ==
Lumiera as a whole is distributed under Copyleft, GNU General Public License Version 2 or above.
For this to become legally effective, the ''File COPYING in the root directory is sufficient.''

The licensing header in each file is not strictly necessary, yet considered good practice;
attaching a licence notice increases the likeliness that this information is retained
in case someone extracts individual code files. However, it is not by the presence of some
text, that legally binding licensing terms become effective; rather the fact matters that a
given piece of code was provably copyrighted and published under a license. Even reformatting
the code, renaming some variables or deleting parts of the code will not alter this legal
situation, but rather creates a derivative work, which is likewise covered by the GPL!

The most relevant information in the file header is the notice regarding the
time of the first individual copyright claim. By virtue of this initial copyright,
the first author is entitled to choose the terms of licensing. All further
modifications are permitted and covered by the License. The specific wording
or format of the copyright header is not legally relevant, as long as the
intention to publish under the GPL remains clear. The extended wording was
based on a recommendation by the FSF. It can be shortened, because the full terms
of the license are provided alongside the distribution, in the file COPYING.
2024-11-17 23:42:55 +01:00
7ed8486774 Library: rework detection of ''same object''
We use the memory address to detect reference to ''the same language object.''
While primarily a testing tool, this predicate is also used in the
core application at places, especially to prevent self-assignment
and to handle custom allocations.

It turns out that actually we need two flavours for convenient usage
 - `isSameObject` uses strict comparison of address and accepts only references
 - `isSameAdr` can also accept pointers and even void*, but will dereference pointers
This leads to some further improvements of helper utilities related to memory addresses...
2024-11-15 00:11:14 +01:00
a90b9e5f16 Library: uniform definition scheme for error-IDs
In the Lumiera code base, we use C-String constants as unique error-IDs.
Basically this allows to create new unique error IDs anywhere in the code.

However, definition of such IDs in arbitrary namespaces tends to create
slight confusion and ambiguities, while maintaining the proper use statements
requires some manual work.

Thus I introduce a new **standard scheme**
 * Error-IDs for widespread use shall be defined _exclusively_ into `namespace lumiera::error`
 * The shorthand-Macro `LERR_()` can now be used to simplify inclusion and referral
 * (for local or single-usage errors, a local or even hidden definition is OK)
2024-03-21 19:57:34 +01:00
661d768fad Job-Planning: frame number now additionally required in FrameCoord
...which was the reason why the test failed;
the calculation works as expected


PS: rename JobPlanningSetup_test to JobPlanningPipeline_test
2023-06-17 03:10:57 +02:00
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