Commit graph

6977 commits

Author SHA1 Message Date
3a5bbd8fb4 Upgrade: put the new tuple_like concept into use
- integrate the concept definition into tuple-helper.hpp
- use it to replace the `is_Structured` traits check
- do not need `enable_if_TupleProtocol` any more

Integrate test coverage of the concept metafunctions
and the generalised get accessor

''This changeset was made at LAC 2025 in Lyon, France''
2025-06-28 00:42:23 +02:00
3a1f64ec41 Upgrade: now able to reformulate the tuple_like concept
Now this draft seems ready to be put into actual use in the code base.
Furthermore, a generic ''get adapter'' is introduced to level the difference
between both tolerated forms of element access, also working correctly
for const and RValue references
2025-06-24 01:03:57 +02:00
bb0b73e2a7 Upgrade: switch existing usages of forEachIDX
...to rely on the new formulation and the extended template `WithIdxSeq`

This is in preparation to use this new iteration scheme also from the tuple_like concept
2025-06-23 22:59:37 +02:00
49e7b31511 Upgrade: develop better formulation for ''and-all-generic''
...need to do this in a test context first,
since `variadic-helper` is in widespread use
2025-06-23 04:24:00 +02:00
7d461adabc Upgrade: explore construction of a ''tuple-like'' concept
Motivated by the difficulties encountered with `std::apply` —
which basically forced us to define our own alternative with
conceptually more adequate limitations....

...so these are the first attempts towards building a C++20 concept.
2025-06-22 19:42:03 +02:00
de066348af Upgrade: workaround for compiler-bug
Compilation failure with GCC-14.2 with the following code

class Base
  {
  protected:
    Base() = default;
  };

struct Feed
  : Base
  { };

int
main (int, char**)
  {
    Feed f1;
//  Feed f2{};       /// does not compile with GCC 14.2
    return 0;
  }

In the actual code base this can be triggered when instantiating
classes with the `NonCopyable`-mix-in; seemingly the compiler attempts
to invoke the base class ctor directly, while it should invoke a
(synthesised) default ctor for the derived class.

The problem could not be reproduced with other compiler versions at Godbolt.org
2025-06-20 18:29:51 +02:00
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
d888891d84 clean-up: trifles 2025-06-07 23:59:57 +02:00
20392eee1c clean-up: successfully replaced the old fixed type sequence (closes: #987)
This resolves an intricate problem related to metaprogramming with
variadic templates and function signatures. Due to exceptional complexity,
a direct solution was blocked for several years, and required a better
organisation of the support code involved; several workarounds were
developed, gradually leading to a transition path, which could now
be completed in an focused clean-up effort over the last week.

Metaprogramming with sequences of types is organised into three layers:
- simple tasks can be solved with the standard facilities of the language,
  using pattern match with variadic template specialisations
- the ''type-sequence'' construct `Types<T...>` takes the centre stage
  for the explicit definition of collections of types; it can be re-bound
  to other variadic templates and supports simple direct manipulation
- for more elaborate and advanced processing tasks, a ''Loki-style type list''
  can be obtained from a type-sequence, allowing to perform recursive
  list processing task with a technique similar to LISP.
2025-06-07 18:04:59 +02:00
acc77654d1 clean-up: can now switch remaining downstream usages
after all the relevant library components do support both kinds of
type sequences transparently, any usages in core code can now be
switched over to the new, variadic type sequences.
2025-06-07 01:07:36 +02:00
95a9ceac35 clean-up: simplify function-closure -- avoiding std::function
A very performance relevant shortcoming of the existing implementation
of partial function closure is that the result is always wrapped into a
std::function, which typically causes a heap allocation when more than
a single pre-bound argument must be stored — which is annoying,
since the underlying Binder provides inline storage and thus
could be handled directly as a value object.

However, returning the Binder directly is also problematic, since
this object is outfitted with several overloaded function call operators,
which defeats most techniques to detect a function signature. Notably,
relevant down-stream metaprogramming code, like the tuple-closure used
in the `NodeBuilder` would break when being confronted directly with
a binder object.

An investigation shows that there is no direct remedy, short of
wrapping the binder into another functor. This can be accomplished
with a helper template, that generates a wrapper; however, this
wrapper builder must be supplied with explicit type information
regarding the function arguments (precisely because this type
signature can not be picked up from the Binder object itself)
2025-06-06 19:44:24 +02:00
10daa06ba2 clean-up: simplify function-closure -- enable forwarding and remove workarounds
This is a rather intricate and technical change, but allows in the end
to switch back all usages to a main implementation patch, which is now
based on `func::BindToArgument` — so this could become the final
implementation core and replace the old `PApply` template eventually...

Largely, these changes are related to allow for ''perfect forwarding''
of the functor and the argument values to be closed; these will be
copied into the ''Binder object'' created by `std::bind`.

Notably the `TupleConstructor` was changed to perfect-forward its »source«
into the specialised `ElmMapper`; this is possible since the latter
already receives a `SRC` template parameter, which can be supplied
with whatever base type the `std::forward` invocation will expose.
In the specialisation relevant here, template `PartiallyInitTuple`,
now an ''universal reference'' is stored and passed to `std::get`,
so that (depending on the input used), either a LValue or an
RValue reference is used for the extracted data elements.

After these changes, all existing usages of `applyFirst()` or `applyLast()`
can be replaced by this modernised implementation back-end, thus obsoleting
the various hard-coded workaround added during the last years.
2025-06-06 03:23:34 +02:00
f6f8220fbe clean-up: simplify function-closure -- can now remove obsoleted impl
A lot of repetitive, pre C++11 metaprogramming code can now be removed,
and several helper constructs, which were needed to handle generic
function application and passing a tuple of values to create a binder.

Note however, the highly complex and technical core of this header
still remains intact; which is to create a ''partial closure'' over
some arguments of a function, while keeping the remaining arguments
open as parameters for invocation.

TODO: Even in the remaining code there is a lot of redundancy
and helper construct which are no longer necessary
2025-06-05 19:11:46 +02:00
738d9e5b67 clean-up: simplify function-closure -- investigate BindToArgument
...because swapping in the new standards-based implementation
leads to compile failures on tests to cover out-of-bounds cases.

Under the (wrong) assumption, that some mistake must be hidden in
the Splice-metafunction, I first provided a complete test coverage;
while the actual problem was right below my nose, and quite obvious...

The old implementation, being based on a case distinction over the argument count,
simply was not able even to notice excess arguments; other the new implementation,
based on variadics and `std::apply`, which is fully generic and thus
passes excess arguments to `std::bind` when a position beyond the actual
argument list is specified to be closed.

The old behaviour was to silently ignore such an out-of-bounds spec,
and this can be reinstated by explicitly capping the prepared tuple
of binders and actual arguments passed to `std::bind`

Another question of course is, if being tolerant here is a good idea.


And beyond that, function-closure.hpp is still terrifyingly complex,
unorganised and use-case driven, to start with....
2025-06-05 18:00:05 +02:00
415e4746a6 clean-up: simplify function-closure -- rebuild the 'bind' case
...can now be formulated in a single function,
based on the apply-to-λ technique invented by David Vandervoorde.

WARNING: the rewritten version of BindToArgument<...>::reduced()
does not compile in the out-of-bounds case, revealing a possibly
long standing defect in the typelist-metafunction Splice
2025-06-05 03:19:03 +02:00
400d0eb92e clean-up: simplify function-closure -- eliminate the 'apply' case
This library header was developed at a time, where C++ had no built-in support
for so called "invokables"; `std::invoke` and `std::apply` were added much later;
So in that early version that was a significant technical hurdle to overcome.

seems like it might be possible to get rid of the TupleApplicator alltogether?
2025-06-05 01:18:59 +02:00
1a2c2ededa clean-up: switch the tricky function-closure
This is one of the most problematic headers, because it is highly complex
and comprises tightly interwoven definitions (in functional programming style),
which in turn are used deep within other features.

What concerns me is that this header is very much tangled
and pushes me (as the author) to my mental limits.

And on top of this comes that this code has to deal with intricate aspects
like perfect forwarding, and proper handling of binder instances and
function argument copying (which basically should be left to `std::bind`)

Fortunately, the changes ''for this specific topic'' are transparent:
Type sequences are not used on the API for function closure and composition,
but only as an internal tool to assemble argument tuples used for either
binding or invocation of the resulting (partially closed) function.
2025-06-04 01:49:07 +02:00
429a7e2339 clean-up: define variadic type-sequences independently
To bootstrap this tricky refactoring, initially a bridge definition
was used, with a variadic argument pack, but delegating to the old
non-variadic type sequence and from there further into LISP style
list processing of types and meta definitions, as pioneered by the
Loki libarary. Luimiera uses this technique since a long time to
perform the complex tasks sometimes required for code generation
and generic function and type adaptation.

with this changeset, a direct variadics based entrance into
type list processing is provided, so that the old definition
is now completely separate and can be removed eventually.
2025-06-04 03:21:18 +02:00
412abbace2 clean-up: validate use of variadic seq with tuples and generators
Most of the type-list and type-sequence related eccosystem can be
just switched over, after having added the conversion variants for
the new-style variadic type sequences

Again this was used as opportunity to improve readability of related tests
2025-06-03 16:14:13 +02:00
47b57da646 clean-up: validate the typelist manipulations
As expected, these work on the new-style variadic type sequences
equally well than on the old ones (tail-filled with `Nil` markers).

On that occasion, a complete makeover of the huge test case was carried out,
now relying on `ExpectString` instead of printing to STDOUT. This has the
benefit of showing the expectation immediately next to the code to be tested,
and thus makes it much easier to ''actually see'' how these meta-functions
operate on their parameters (which in fact are types in a type list)
2025-06-02 23:55:08 +02:00
c8187bdf88 clean-up: complement and modernise basic type-lists
- provide complete conversion paths old-style ⟷ new-style
- switch the basic tests to the new variadic sequences
- modernise the code; replace typedefs by `using`
- change some struct-style ''meta-functions'' into
  constexpr or compile-time constants
2025-06-02 19:07:05 +02:00
f8517b7011 clean-up: the big anti-bang -- NullType becomes Nil
Since I've convinced myself during the last years that this kind
of typelist programming is ''not a workaround'' — it is even
superior to pattern matching on variadics for certain kinds
of tasks — the empty struct defined as `NullType` got into
more widespread use as a marker type in the Lumiera code base.

It seems adequate though to give it a much more evocative name
2025-06-02 17:46:40 +02:00
7aa1698a95 clean-up: prepare for variadic Type-Sequences (see #987)
Attempting to reduce the remaining pre-C++11 workarounds before upgrade to C++20...

As a first step: rename the old type-sequence implementation into `TyOLD`
to make it clearly distinguishable; a new variadic implementation `TySeq`
was already introduced as partial workaround, and the next steps
will be to switch over essential parts of the type-sequence library.
2025-06-02 03:24:44 +02:00
1da5d57098 clean-up: RefArray is gone (closes: #473)
After the leftovers of the first Render-Engine implementation attempt were removed,
only one further usage of `RefArray` remains to be sorted out: the ''Session Element Tracker''.

Luckily, this one did not actually make any use of the abstraction abilities
of the `RefArray` — rather it basically stated that ''the interface is a data structure...''
After considering ''what kind of data'' can be expected to live in this structure,
it became clear that ''this will be a symbolic representation''

And thus the container can be simply switched to a `std::vector`.
This change allows to retain the existing placeholder-implementation unaffected,
while it would be possible to maintain algebraic terms here, in future.

__As an asside__: in order to decide about a suitable replacement in the Session,
                  I had to consier a first draft regarding the intended usage
                  and the prospective way of content representation
2025-06-01 02:44:40 +02:00
08bdb912a5 clean-up: some further bits never actually used
design sketches, prototype, textbook-implementation,
this-might-be-a-good-idea stuff
2025-06-01 00:53:35 +02:00
bec55a89e0 clean-up: ScopedHolder now obsoleted (closes: #958)
Investigated this topic again...
 * these were initially created before C++11
 * at that time, ''non-copyable'' objects were not common place
 * but we embraced that concept already, and thus had quite some pain
   when attempting to use such objects in STL containers
 * with C++11 and ''move semantics'' these problems basically evaporated
 * most usages were already upgraded and resolved
 * another use case is to handle a state variable, which is based on
   an immutable entity (like Time entities); `ItemWrapper` can be used
   as a remedy in such a situation
2025-05-31 19:43:43 +02:00
2bec3ccd4e clean-up: make ScopedPtrVect move-assignable to use it in STL containers
This was a pre-C++11 implementation, and at that time,
I developed the ScopedHolder to allow handling non-copyable objects in STL containers

Meanwhile we have move semantics to achieve the same goal;
and since `ScopedPtrVect` shall be retained, it should be upgraded,
using the copy-and-swap approach
2025-05-31 19:10:19 +02:00
071ab82a7a clean-up: review and validate ScopedPtrVect
This is a plausible concept, and without obvious replacement
(letting aside `boost::ptr_vector`). It has a small number
of usages, and provides a dedicated API to show the
semantics when used as implementation of an ''Object Manager''

The original implementation used private inheritance from `std::vector`,
which is not really justified here, since we neither use the ''template method''
pattern, nor want to gain access to protected internals.
So this can be replaced with a private member.
2025-05-31 19:02:43 +02:00
8960aed7ba clean-up: ItemWrapper now stands on its own
...initially, this header was a collection of small helpers made on occasion;
one of them, the `ItemWrapper` used in transforming pipelines came
into widespread use and was much augmented and improved over the years.

many other tiny helpers could be replaced by standard library facilities...
2025-05-31 01:21:57 +02:00
bc6a219543 clean-up: trash ReplacableItem (closes: #1059)
Now looking into largely obsolete library facilities...
Starting from `ScopedHolder`, I found a surprising problem with ''perfect forwarding....''

...which however turned out to be the result of ''sloppy programming'' on my side.
At that time, in 2017, seemingly I was under pressure to define a Session-Command,
which captures a Time-entity as »State Memento«. Which turned out to be impossible,
since the Time entities were conceived as being immutable -- a questionable design
decision (see #1261), which already generated quite some additional complexities.


In the course of this »exercise«, I could again clarify that the implementation
of perfect forwarding works as expected on modern compilers — confusion may arrise
sometimes due to ''copy elision'' (which the compiler is required to perform
since C++17, even when the elided constructor has observable side effects).
And it can be derailed when (as was the case here) a »grab everything« constructor
accidentally ends up generating a copy- or move-constructor for the container class
itself. This is an instance of the problem documented with #963 ...

.... and the best solution is to abide by the rule-of-five (and a half)
and to put that `ReplacableItem` to where it belongs...
2025-05-30 19:12:01 +02:00
11322ad955 clean-up: finally discard remainders form the first Render Engine draft
During the early stage of the Project, at some point I attempted
to »attack« the topic of Engine and Render Nodes following a ''top down path.''

This effort went into a dead end eventually — due to the total lack
of tangible reference points to relate to. However, the implementation
at that time prompted the development of several supporting facilities,
which remain relevant until today. And it resulted in a ''free wheeling''
compound of implementation structures, which could even be operated
through some highly convoluted unit test.

This piece of implementation code was valuable as starting point for th
»Playback Vertical Slice« in 2024 — resulting in a new design which was
''re-oriented'' towards a new degree of freedom (the »Domain Ontology«)
while handling the configuration and connectivity of Render Nodes in
a rather fixed and finite way. This new approach seems to be much more
successful, as we're now able to build, connect and invoke Render Nodes,
thereby mapping the processing through a functor binding into some
arbitrary, external processing function (which will later be supplied
by a media processing library — and thus be part of some »Domain Ontology«)
2025-05-30 01:47:27 +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
27089550d2 clean-up: relocate frame quantisation operations
The `FixedFrameQuantiser` relied on three functions from the raw-time handling library.
Since this (and NTSC drop-frame) are the only usages, these functions
can be relocated into the implemntation translation unit `lib/time/quantiser.cpp`

On closer inspection, this reveals some room for improvements:
Instead of relying on raw-computation functions written in C,
we could rather revert the dependency and express these computations
in terms of our Time-entities, which are written in C++, are much more
systematic and provide consistency checks and protection against numeric
overflow, all integrated with linear arithmetic and concise notation.

After performing these rearrangements,
most of the functions can be collapsed into ''almost nothing''.

This was taken as opportunity to re-check and improve the remaining
implementation core of the `FixedFrameQuantiser` -- the handling of
extreme corner cases can be much improved, now representing the
"grid-local time" as `Offset`, which doubles the possible value range.

The reworked unit test shows that, with this change, now the limitation
happens prior to quantisation, meaning that we always get a grid-aligned
result, even in the most extreme corner cases.
2025-05-28 23:49:01 +02:00
255fc82a1b clean-up: relocate NTSC drop-frame conversion functions
...extract these functions and the associated test
from the low-level C time handling library and
document them with a dedicated C++ header and test.

''This is unfinished work'' —
the extracted functions provide only the low level computations;
actually, a specialised time quantisation or time code would be required.

------------
Note though,
after extracting these functions, the rest of the plain-C test
can be removed, since equivalent functionality is covered in
much more detail by the tests of the C++ time handling framework.

Notably this allows to get rid of the direct component accessor functions.

------------
__Remark__: the base implementation of many time conversion functions
            and especially NTSC drop-frame was provided by Stefan Kangas

See:
6a44134833
2025-05-27 23:39: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
ee6e720d00 Clean-up: sort out further leftovers from the GTK-2 UI
After the Dummy-Player (interface and prototype implementation)
is removed, some further bits of debris can be sorted out.
The first version of the Timeline was mostly rewritten and
the obsolete parts were removed in 2023, yet a small number
of files was kept around as reference for later.

Some of these are no longer considered of any information value,
other ones were moved into the widget package (and further problematic
parts were annotated, but can be still used with GTK-3)
2025-05-15 23:41:54 +02:00
017ba5f160 Clean-up: remove dummy-player services and interfaces (see #1342)
For the [ticket:1221 »Playback Vertical Slice«] one of the next steps
will be to define a way to pass buffers from the core to the UI.

The `DisplayService` and the `DummyPlayerService` where parts of an
early architecture study to see how such a flexible connection between
components in different layers can be accomplished.

The findings from this prototyping work helped to shape the design
of the actual `PlayService`...
2025-05-14 01:32:21 +02:00
8abeb02397 XV-Display: prototype for flexible control of ouput pixel format
As an example, the `PixbufDisplayer` needs packed RGB888 data,
while the `XvDisplayer` expects YUV (MPEG-style) pixels.

The research setup is not well equipped to handle any kind of content
or format negotiation; yet for the experimentation, the connections can
be wired as !SigC-Signals. After the preceding refactorings,
`DummyImageGenerator` can be configured to perform the conversion to YUV
only when necessary, and to use the working buffer flexibly.

When supplied with packed RGB pixel data, the display in the Gtk::Image
is now correct, and also handles layout and scaling appropriately.
2025-05-12 03:43:09 +02:00
b42143f425 XV-Display: refine the formulation of the image-generator
- since we now use 32bit int arithmetic (which is faster),
   we can also use the exact value of the MPEG / Rec.601 coefficients

 - and also the generation of the NTSC colour bar pattern
   can be written much simpler and cleare with C++
2025-05-11 16:06:20 +02:00
8fe50e37a4 XV-Display: reorganise image-generator code
This is a first step towards the ability to produce several different output formats...

Refactor the code to separate
 - the double buffering
 - the actual image generation, which works in RGB
 - the conversion routine

Furthermore, replace unsigned char by std::byte
and introduce std::array and structured binding
to avoid many usages of pointers; hopefully this
makes the intention of the code clearer.

Verified and cross-checked the actual converion logic;
in fact this is a conversion to "YUV" as used by MPEG,
which in more precise terms is Y'CrCb with Rec.601 colour space
and a scan range limitation (16...235) on the Luma component.
2025-05-11 01:18:19 +02:00
42ce53aa09 XV-Display: investigate and fix some problems with this XV code
Generally speaking, this experiment shows that we need some additional know-how
regarding the XVideo standard. And we should re-think the means of integration.

From some further debugging end experimenting with this code,
the following conlusions can be drawn:

- the code retrieves the GDK-Window, to which the widget was mapped
- it uses this to access an underlying X-Window
- seemingly the docking panel uses a separate X-Window, which also
  hosts the header area of the panel
- this whole underlying X-Window is treated with some compositing method,
  presumably (just guessing from the code) we use keying with a
  marker-colour. This explains why the whole area of the panel
  is no longer updated regularly
- furthermore, we need to take into account that the actual display widget
  area uses some part of this window, which can be found out from
  the VideoWidget's ''Allocation''
- when correcting the origin of the video display by using this
  allocation's origin, at least the display of the video is precisely
  at the right location and size

Furthermore, the code takes quite some shortcut and basically
looks for one specific display format, and uses the corresponding
configuration for the "port" it got.

This Format has the Abbreviation "YUY2" (packed)
2025-05-09 04:28:17 +02:00
5d3710fca8 XV-Display: the old XVideo display code indeed still works
''it basically works...''
TODO
 - the image is updated only when moving the mouse over the widget
 - calculation of window decoration is not correct
 - a strange transparent zone appears in the UI directly above the widget
2025-05-08 17:31:27 +02:00
7fd3e71936 XV-Display: partial success with the fallback / pixbuf display
The new solution is to (still) use a Gdk::Pixbuf,
because in GTK-3 the more modern alternatives are not yet provided.
But we can pass this Pixbuf directly to Gtk::Image, instead of trying
to do low-level drawing on the X-Window.

Other than that, I more or less transformed the old C-style code
into the corresponding calls in Gdkmm.

__SUCCESS__: we get **some display**
__TODO__ : the displayed image is Garbage, which means that the pixel layout is not correct
2025-05-07 18:39:11 +02:00
93a62af39e XV-Display: re-implement fallback video display technique
In cases where none of the preferred, library based approaches works,
we can attempt to provide a ''poor man's video display'' by placing the
image data into a bitmap, which can be rendered by the UI toolkit.

The existing solution for such bitmap content is the GDK Pixmap.
But note, this approach is ''deprecated with GTK-4'', since,
generally speaking, GTK moves away from the notion of an
''underlying windowing system'' and relies on the concept
of ''graphic surfaces, textures and paintables'' rather...
2025-05-06 19:41:51 +02:00
02ac4a169b XV-Display: establish wiring for the controller and verify logic
Here we face the problem that the buttons in the play control panel
need to be connected to the controller, which sits in the viewer panel.

Obviously a direct connection is not correct, since there could be
several panels, and furthermore the controller should be a service and
addressed by commands via UI-Bus.

But this is an experiment, and we'll have to figure out anyway
how the playback-display-connection works, as one of the next tasks
for the »Playback Vertical Slice«

Thus we'll use the PanelManager to fetch the first viewer panel,
and then forward to the controller calls. With this setup,
the controller logic can be verified by printing to STDOUT.

TODO: we are not yet invoking any XVideo code....
2025-05-06 03:54:03 +02:00
b0e8fa2ff6 XV-Display: introduce a new kind of docking panel for the play-control
While this is not strictly necessary for this experiment,
this is something we should try to establish early:

A »play control« should be handled as an independent UI element,
without tying it logically with some viewer (or timeline); the reason is
that such a play control needs a set of very well designed keyboard bindings,
and thus we will attempt use a focus concept to link to some active viewer
instead of creating one primary viewer, which gets the benefit of the
well accessible keybindings.

Basically we want to create an explicit association between
 - a timeline
 - some viewer
 - a play-control

Introducing a new kind of panel shows again that the `PanelManager`
needs a rework; everything there is way too much ''hard wired''

And the new panel with the play control needs an **Icon** — which is
a challenge in itself; my proposal here is to build on the film metaphor,
and combine the symbol of "Play / Pause" with an stylised film or tape player
(with the secondary idea that this icon also somewhat looks like a owl face)
2025-05-05 23:48:22 +02:00
ac5a2f371d XV-Display: build new GTK-3 widget framework and controller
- place a `DemoController` instance as direct member into the `ViewerPanel`
 - create a direct wiring, so that the `DemoController` can push to the `VideoDisplayWidget`
 - make the `DemoController` directly instantiate a `TickService` and `DummyImageGenerator`
 - reimplement play control functions by direct invocation
 - add a new class to the Lumiera CSS stylesheet
2025-05-03 23:33:44 +02:00
0ae96294e8 XV-Display: start a research project to port the existing code (see #1403)
- initial assessment shows that the Design of the **Displayer** framework is adequate
 - for context: this code originates from the »Kino« video editor 20 years ago
 - notably the `XvDisplayer` contains almost no GTK(2)-code
 - so it seems feasible to attempt a port to GTK-3

This is a limited research project, and the setup shall be based mostly on existing code.
In the early stage of the Lumiera application, we did some architecture studies
regarding ongoing video generation and display, resulting in a `DemoVideoPlayer`.

This code was broken by the GTK-3 transition, but kept in-tree for later referral.
For this research project, we can mostly short-circuit all of the layer separation
and service communication stuff and build a minimal invocation directly hooked-up
behind the GUI widget. In preparation for such a setup, the existing
demo player code is partially forked by this changeset, pushing aside
the (defunct) !DummyPlayer pseudo-subsystem.
2025-05-02 23:19:55 +02:00
998e225490 Clean-up: reimplement the SeachPathSplitter
...to be more compliant to the »Lumiera Forward Iterator« concept.
This can be easily achieved by inheriting from util::RegexSearchIter,
similar to the example in CSV.hpp

Regarding #896, I changed the string rendering to use fs::path::generic_string
where appropriate, which means that we're using the normalised path rendering
2025-04-28 19:14:27 +02:00