Comparison & arithmetic through different time bases
are bogus (start_offset timebase vs streams pts timebase) when
rescaled using our own helpers.
We need to use the same rescaling functions to avoid different
roundings, then errors.
refs #25117
Since Qt signals/slots are incompatible with templates, the base list
model was initially split into two parts:
- MLBaseModel, non-template, with signals/slots
- MLSlidingWindowModel, template, inheriting MLBaseModel
Now that MLSlidingWindowModel is not template anymore, there is no
reason to keep it separated. Simplify.
Signed-off-by: Pierre Lamot <pierre@videolabs.io>
MLSlidingWindowModel has many subclasses. Since it depended on the
ListCache<T> header, every change in this header caused huge incremental
compilation times.
Before this commit and the two previous ones, here is the time it took
on my machine to recompile after touching listcache.hpp:
$ time make -j8
...
real 0m45.001s
user 4m55.672s
sys 0m9.414s
After these changes:
$ time make -j8
real 0m10.676s
user 0m11.840s
sys 0m0.946s
Signed-off-by: Pierre Lamot <pierre@videolabs.io>
MLSlidingWindowModel was generic over its item type, and with many
non-template subclasses, each subclasses defining the actual concrete
type.
Therefore, this static genericity was "internal". In practice, it didn't
bring a lot a value, but it caused every subclass to recompile
the whole implementation.
To improve compilation times, remove the template parameter and always
use the item super-type MLItem. When an item of the concrete type is
necessary (once per subclass), just cast locally.
This change alone does not improve complitation times significantly,
because the implementation is still in the header file, which also
includes the whole ListCache implementation. The following commits will
solve these problems.
Signed-off-by: Pierre Lamot <pierre@videolabs.io>
Concrete medialib item types are defined by the template parameter on
MLSlidingWindowModel.
Create a super-type to be able to "untemplatize" MLSlidingWindowModel
(in order to simplify and improve compilation times).
As a side-effect, this also makes explicit the necessity to define a
getId() method (called from MLSlidingWindowModel), a constraint which
could not be explicitly expressed on a template parameter.
Signed-off-by: Pierre Lamot <pierre@videolabs.io>
The item id sometimes represents the id of the "current" item, sometimes
the id of the "parent" item. Therefore, the fact that it is a "parent"
id depends on the context, and is not intrinsic to the type.
This caused confusion when getId() returned a MLParentId, representing
the id of the current item.
Rename to MLItemId to clarify.
Signed-off-by: Pierre Lamot <pierre@videolabs.io>
+ change its normal behavior from being invisible to being disabled when there are not chapters.
+ fix sizing issue
Signed-off-by: Pierre Lamot <pierre@videolabs.io>
This patch fixes the SortControl being improperly displaced in PlaylistToolbar when mainInterface scaling changes.
Signed-off-by: Pierre Lamot <pierre@videolabs.io>
CursorShape of MouseArea which is used in HorizontalResizeHandle is only valid when the mouse location stays inside MouseArea's boundingRect. However, we would like to see the cursor intact even when mouse goes outside during resizing.
Signed-off-by: Pierre Lamot <pierre@videolabs.io>
This patch fixes the 'jumping widget' problem which happens when dragging starts. To reproduce the problem, set its width to something large and see how it behaves.
Signed-off-by: Pierre Lamot <pierre@videolabs.io>
This patch fixes the annoying transition effect of StackViewExt. With sine easing, it is smoother even at half duration.
Signed-off-by: Pierre Lamot <pierre@videolabs.io>
Instead of creating separate left, center, and right button layouts in players; use PlayerButtonsLayout.
With this patch PlayerButtonsLayout.qml content is moved to ButtonsLayout.qml. And PlayerButtonsLayout.qml now handles three separate button layouts itself.
Signed-off-by: Pierre Lamot <pierre@videolabs.io>