]> git.sesse.net Git - nageru/log
nageru
4 years agoFix some leftovers in warning messages.
Steinar H. Gunderson [Sun, 29 Mar 2020 11:25:54 +0000 (13:25 +0200)]
Fix some leftovers in warning messages.

4 years agoSupport getting all 8 channels from DeckLink capture cards.
Steinar H. Gunderson [Wed, 25 Mar 2020 18:14:42 +0000 (19:14 +0100)]
Support getting all 8 channels from DeckLink capture cards.

You could select channels 3–8 in the UI, but Nageru would simply
crash with an assertion failure.

4 years agoFix an issue with 10-bit input and nonstandard heights (e.g. 1920x800).
Steinar H. Gunderson [Sat, 28 Mar 2020 23:47:38 +0000 (00:47 +0100)]
Fix an issue with 10-bit input and nonstandard heights (e.g. 1920x800).

4 years agoUpdate for newer CEF.
Steinar H. Gunderson [Fri, 20 Mar 2020 18:59:48 +0000 (19:59 +0100)]
Update for newer CEF.

4 years agoWhen deciding which signal to connect, delay the mapping to cards.
Steinar H. Gunderson [Wed, 18 Mar 2020 18:38:25 +0000 (19:38 +0100)]
When deciding which signal to connect, delay the mapping to cards.

This fixes an issue where scenes that get display() once at start
and then never afterwards wouldn't get updated properly when mappings
changed in the UI.

4 years agoStretch the ease length to get back into the right cadence.
Steinar H. Gunderson [Mon, 16 Mar 2020 22:00:50 +0000 (23:00 +0100)]
Stretch the ease length to get back into the right cadence.

Unless the speed change is very small, we can stretch the ease a bit
(from the default 200 ms into anything in the [0,2] second range)
such that we conveniently hit an original frame. This means that if
we go into a speed such as 100% or 200%, we've got a very high
likelyhood of going into a locked cadence, with the associated
quality and performance benefits.

4 years agoOnly bother going into an ease if there is an actual speed change.
Steinar H. Gunderson [Sat, 14 Mar 2020 23:47:47 +0000 (00:47 +0100)]
Only bother going into an ease if there is an actual speed change.

4 years agoAdd versions of the binary search utilities that take in const references.
Steinar H. Gunderson [Sat, 14 Mar 2020 16:14:34 +0000 (17:14 +0100)]
Add versions of the binary search utilities that take in const references.

4 years agoWhenever the speed changes, ease into it over the next 200 ms.
Steinar H. Gunderson [Wed, 11 Mar 2020 20:30:15 +0000 (21:30 +0100)]
Whenever the speed changes, ease into it over the next 200 ms.

This causes a slight delay compared to the operator's wishes,
but that should hardly be visible, and it allows for somewhat
better behavior when we get very abrupt changes from the controller
(or the lock button suddenly is pressed) -- it's essentially
more of an interpolation. Even more importantly, it will allow us
to make a little trick to increase performance in the next patch
that would be somewhat more jerky without it.

4 years agoRefactor the handling of the various time origins in Player into a class.
Steinar H. Gunderson [Wed, 11 Mar 2020 18:58:54 +0000 (19:58 +0100)]
Refactor the handling of the various time origins in Player into a class.

4 years agoChange Futatabi frames to be cached as textures instead of in system memory.
Steinar H. Gunderson [Sun, 8 Mar 2020 14:57:51 +0000 (15:57 +0100)]
Change Futatabi frames to be cached as textures instead of in system memory.

The JPEGs are now decoded into PBO bounce buffers, which saves a lot of CPU
time (copying is asynchronous, and done by the GPU -- plus we save a copy
into a staging buffer).

Similarly, keeping the cache in textures allows the driver (if it wants!)
to keep it in VRAM, saving repeated uploading if the same frame is used
multiple times.

CPU usage is down from 1.05 to 0.60 cores on my machine, when not playing.
More importantly, the 99-percentile player queue status is extremely much
better.

4 years agoAdd metrics for how many frames we are decoding, but did not have the time to display.
Steinar H. Gunderson [Sun, 8 Mar 2020 14:02:21 +0000 (15:02 +0100)]
Add metrics for how many frames we are decoding, but did not have the time to display.

4 years agoMove RefCountedTexture to shared.
Steinar H. Gunderson [Fri, 6 Mar 2020 21:18:41 +0000 (22:18 +0100)]
Move RefCountedTexture to shared.

4 years agoAdd a metric for general Futatabi player health (how much buffer there is left).
Steinar H. Gunderson [Wed, 4 Mar 2020 23:16:47 +0000 (00:16 +0100)]
Add a metric for general Futatabi player health (how much buffer there is left).

4 years agoFix MJPEG white balance information when VA-API is in use.
Steinar H. Gunderson [Wed, 4 Mar 2020 18:53:49 +0000 (19:53 +0100)]
Fix MJPEG white balance information when VA-API is in use.

The JPEG headers were cached (per resolution) and never invalidated,
causing wrong/outdated information to be sent.

I can't really remember why I wanted to cache these, but I suppose
I had a reason, so I'm a bit reluctant to just kill the cache.
Hopefully, the white balance won't change often enough, and these
objects are so small, that we won't need invalidation; we can just
let it grow until program exit.

4 years agoAdd summaries for tracking fade and interpolation latency across the GPU.
Steinar H. Gunderson [Sat, 29 Feb 2020 23:32:15 +0000 (00:32 +0100)]
Add summaries for tracking fade and interpolation latency across the GPU.

4 years agoAdd a Futatabi metric for JPEG decode times.
Steinar H. Gunderson [Sat, 29 Feb 2020 23:07:27 +0000 (00:07 +0100)]
Add a Futatabi metric for JPEG decode times.

4 years agoFix a deadlock in Futatabi when using MIDI devices.
Steinar H. Gunderson [Sat, 29 Feb 2020 22:25:11 +0000 (23:25 +0100)]
Fix a deadlock in Futatabi when using MIDI devices.

If something in the UI wanted to update a light on the MIDI device
at the exact same time the operator pressed a button on said device,
we could get a deadlock. The problem was that MIDIDevice::handle_event()
would lock the MIDIDevice and then go to tell MIDIMapper that the
note was coming (which needs a lock on the MIDIMapper), while in the
other thread, MIDIMapper::refresh_lights() would first lock the MIDIMapper
and then call MIDIDevice::update_lights() with the new set of lights
(which nedes a lock on the MIDIDevice). This is a classic lock ordering
issue.

The solution is to simply make MIDIDevice::handle_event() not lock the
MIDIDevice for anything that calls MIDIMapper; it doesn't actually modify
any state in MIDIDevice, except when we hotplug new devices (and that never
calls MIDIMapper).

4 years agoMake so that auto white balance is stored per (physical) card, not per signal.
Steinar H. Gunderson [Sat, 29 Feb 2020 21:44:07 +0000 (22:44 +0100)]
Make so that auto white balance is stored per (physical) card, not per signal.

This fixes an issue where auto white balance would be completely off if
any signals were remapped out of the default. It means you no longer can
duplicate a signal and have different white balance on it, but that seems
narrow enough that one could use manual white balance for that (I can't
really imagine what the use case would be).

4 years agoNomenclature cleanups around channels, signals and cards.
Steinar H. Gunderson [Sat, 29 Feb 2020 21:30:30 +0000 (22:30 +0100)]
Nomenclature cleanups around channels, signals and cards.

4 years agoMake it possible to get and set EQ parameters from the theme.
Steinar H. Gunderson [Wed, 26 Feb 2020 17:47:55 +0000 (18:47 +0100)]
Make it possible to get and set EQ parameters from the theme.

4 years agoFix an issue where a Kaeru connected to a nonfunctional input would get lots of socke...
Steinar H. Gunderson [Tue, 25 Feb 2020 23:00:07 +0000 (00:00 +0100)]
Fix an issue where a Kaeru connected to a nonfunctional input would get lots of sockets in CLOSE_WAIT (and useless threads).

It would actually eventually run out of sockets and go entirely zombie
if left for too long, which is obviously suboptimal.

4 years agoLog a warning when we kill a client that is not keeping up.
Steinar H. Gunderson [Tue, 25 Feb 2020 22:02:49 +0000 (23:02 +0100)]
Log a warning when we kill a client that is not keeping up.

4 years agoMake CHECK_VASTATUS error messages textual instead of numeric.
Steinar H. Gunderson [Fri, 21 Feb 2020 18:07:37 +0000 (19:07 +0100)]
Make CHECK_VASTATUS error messages textual instead of numeric.

4 years agoIn Futatabi, make it possible to set custom source labels.
Steinar H. Gunderson [Mon, 17 Feb 2020 22:13:29 +0000 (23:13 +0100)]
In Futatabi, make it possible to set custom source labels.

An operator was consistently confused by having 3 on a left camera
and 4 on a right camera, and wanted L3 and R4 labels, so here goes :-)
There's no auto-import from Nageru at this point; it needs to be set
using --source-label NUM:LABEL (or -l NUM:LABEL) from the command line.

4 years agoStop refreshing the Futatabi channel overlay every frame.
Steinar H. Gunderson [Mon, 17 Feb 2020 22:11:21 +0000 (23:11 +0100)]
Stop refreshing the Futatabi channel overlay every frame.

4 years agoEdit is normally to the left of View, so fix Futatabi.
Steinar H. Gunderson [Mon, 17 Feb 2020 21:21:59 +0000 (22:21 +0100)]
Edit is normally to the left of View, so fix Futatabi.

4 years agoUnbreak showing the first two channels in the tally JSON.
Steinar H. Gunderson [Mon, 17 Feb 2020 20:26:17 +0000 (21:26 +0100)]
Unbreak showing the first two channels in the tally JSON.

4 years agoRevert "Make for faster shutdown of DeckLink cards."
Steinar H. Gunderson [Sun, 31 Mar 2019 12:36:11 +0000 (14:36 +0200)]
Revert "Make for faster shutdown of DeckLink cards."

This breaks turning on HDMI/SDI output mode from the GUI.

This reverts commit be7ba768a138bea4543a712c8261b1bfdc6e1dd0.

4 years agoFix an assertion error when FFmpeg inputs were dropping frames.
Steinar H. Gunderson [Mon, 17 Feb 2020 19:00:50 +0000 (20:00 +0100)]
Fix an assertion error when FFmpeg inputs were dropping frames.

4 years agoGive the theme access to basic audio information.
Steinar H. Gunderson [Sun, 16 Feb 2020 23:59:14 +0000 (00:59 +0100)]
Give the theme access to basic audio information.

Currently, it can get (not set) number of buses and channel names,
get/set fader volume, and get/set mute. This should already be fairly
useful for most applications.

4 years agoMake it possible to siphon out a single MJPEG stream.
Steinar H. Gunderson [Sat, 15 Feb 2020 16:28:17 +0000 (17:28 +0100)]
Make it possible to siphon out a single MJPEG stream.

The URL for this is /feeds/N.mp4 (although the .mp4 suffix will be ignored
in practice), where N is the card index (starting from zero). You are allowed to
use a feed that is not part of the “regular” multicam MJPEG input.

This can be used for remote debugging, recording of a given card with wget,
streaming a specific card as an aux, and probably over things.

4 years agoFix compilation in debug mode.
Steinar H. Gunderson [Sat, 15 Feb 2020 14:21:01 +0000 (15:21 +0100)]
Fix compilation in debug mode.

4 years agoMake the MJPEG card-to-stream mapping invisible to outside callers.
Steinar H. Gunderson [Wed, 12 Feb 2020 23:39:52 +0000 (00:39 +0100)]
Make the MJPEG card-to-stream mapping invisible to outside callers.

As an important side effect, this allows should_encode_mjpeg_for_card()
to contain more complex policy in the future.

4 years agoSplit out some work from the MJPEG encoder constructor.
Steinar H. Gunderson [Wed, 12 Feb 2020 23:32:13 +0000 (00:32 +0100)]
Split out some work from the MJPEG encoder constructor.

4 years agoFix a comment typo.
Steinar H. Gunderson [Wed, 12 Feb 2020 21:41:08 +0000 (22:41 +0100)]
Fix a comment typo.

4 years agoMake it possible for auto white balance to be controlled by another input.
Steinar H. Gunderson [Wed, 12 Feb 2020 16:59:12 +0000 (17:59 +0100)]
Make it possible for auto white balance to be controlled by another input.

This is useful if you want to run white balance on something that could
e.g. have an overlay.

4 years agoFix invalid white balance from nonconnected FFmpeg inputs.
Steinar H. Gunderson [Wed, 12 Feb 2020 16:57:49 +0000 (17:57 +0100)]
Fix invalid white balance from nonconnected FFmpeg inputs.

4 years agoFix auto-WB of certain kinds of input.
Steinar H. Gunderson [Wed, 12 Feb 2020 16:54:57 +0000 (17:54 +0100)]
Fix auto-WB of certain kinds of input.

4 years agoMake Futatabi fades apply white balance.
Steinar H. Gunderson [Tue, 11 Feb 2020 21:42:53 +0000 (22:42 +0100)]
Make Futatabi fades apply white balance.

When there are two different video streams involved, they will often
have different white points, so we can't just echo the Exif data back;
we need to apply it when converting, and then get back a result in
standard sRGB. It's not entirely correct since we still run with
crushed whites/black, but it's good enough.

This completes Nageru/Futatabi white balance round trip support.

4 years agoMake Futatabi copy Exif data for interpolated frames.
Steinar H. Gunderson [Tue, 11 Feb 2020 17:15:24 +0000 (18:15 +0100)]
Make Futatabi copy Exif data for interpolated frames.

This means that interpolated frames also get the right white balance,
so now only faded frames get none.

4 years agoHeed the Exif white point when playing back (MJPEG) video.
Steinar H. Gunderson [Mon, 10 Feb 2020 23:18:38 +0000 (00:18 +0100)]
Heed the Exif white point when playing back (MJPEG) video.

4 years agoIn the MJPEG export, include white balance information.
Steinar H. Gunderson [Mon, 10 Feb 2020 17:52:49 +0000 (18:52 +0100)]
In the MJPEG export, include white balance information.

We do this by converting it to an x-y white point and storing it in Exif,
which is the closest thing I could find to a standard in this space.

4 years agoChange to using RGBTriplet for white balance.
Steinar H. Gunderson [Sun, 9 Feb 2020 22:48:57 +0000 (23:48 +0100)]
Change to using RGBTriplet for white balance.

4 years agoVarious fixes for non-VA-API MJPEG encoding.
Steinar H. Gunderson [Sun, 9 Feb 2020 18:10:31 +0000 (19:10 +0100)]
Various fixes for non-VA-API MJPEG encoding.

4 years agoSupport auto white balance (ie., not controlled by the theme).
Steinar H. Gunderson [Sun, 9 Feb 2020 13:43:17 +0000 (14:43 +0100)]
Support auto white balance (ie., not controlled by the theme).

This is added as a regular (optional) white balance effect, but it automatically
intercepts set_wb() calls and stores it locally. (You can still set neutral_color
manually, but it's probably sort of pointless.)

This simplifies the themes somewhat and allows in some cases for fewer different
scene instantiations (since image inputs don't get white balance), but more
importantly, it will allow exporting the white balance setting in the MJPEG
export.

4 years agoFactor out find_signal_to_connect().
Steinar H. Gunderson [Sun, 9 Feb 2020 13:41:43 +0000 (14:41 +0100)]
Factor out find_signal_to_connect().

4 years agoNeutral white balance is (1,1,1), not (0.5,0.5,0.5). Probably irrelevant in practice...
Steinar H. Gunderson [Sun, 9 Feb 2020 13:40:38 +0000 (14:40 +0100)]
Neutral white balance is (1,1,1), not (0.5,0.5,0.5). Probably irrelevant in practice currently, though.

4 years agoRelease Nageru and Futatabi 1.9.1. 1.9.1
Steinar H. Gunderson [Sun, 17 Nov 2019 19:08:09 +0000 (20:08 +0100)]
Release Nageru and Futatabi 1.9.1.

5 years agoFix an assertion failure when fading into a zero-length clip.
Steinar H. Gunderson [Wed, 30 Oct 2019 23:26:23 +0000 (00:26 +0100)]
Fix an assertion failure when fading into a zero-length clip.

5 years agoFix an issue where it was not possible to add new infinite clips to a playlist
Steinar H. Gunderson [Wed, 30 Oct 2019 23:14:55 +0000 (00:14 +0100)]
Fix an issue where it was not possible to add new infinite clips to a playlist
that was already playing.

Non-infinite clips were okay all along, but infinite clips would have zero
(well, negative) length.

5 years agoFix the previous fix for the infinite display; it was causing crashes and odd stuff...
Steinar H. Gunderson [Wed, 30 Oct 2019 22:55:17 +0000 (23:55 +0100)]
Fix the previous fix for the infinite display; it was causing crashes and odd stuff in the UI.

5 years agoShow preview display when using cue in or cue out, not just on scrubbing.
Steinar H. Gunderson [Wed, 30 Oct 2019 19:01:46 +0000 (20:01 +0100)]
Show preview display when using cue in or cue out, not just on scrubbing.

5 years agoFix the “time remaining” display when queueing infinite clips.
Steinar H. Gunderson [Wed, 30 Oct 2019 18:54:30 +0000 (19:54 +0100)]
Fix the “time remaining” display when queueing infinite clips.

5 years agoWhen starting a new clip, start at the correct master speed (it was always at 100%).
Steinar H. Gunderson [Wed, 30 Oct 2019 18:46:14 +0000 (19:46 +0100)]
When starting a new clip, start at the correct master speed (it was always at 100%).

5 years agoWhen exporting interpolated files, don't include the subtitles meant for Nageru inter...
Steinar H. Gunderson [Mon, 21 Oct 2019 19:43:07 +0000 (21:43 +0200)]
When exporting interpolated files, don't include the subtitles meant for Nageru internal consumption.

5 years agoFix some jerkiness when playing back with no interpolation.
Steinar H. Gunderson [Mon, 21 Oct 2019 19:32:34 +0000 (21:32 +0200)]
Fix some jerkiness when playing back with no interpolation.

When hitting a frame exactly, we'd choose [pts_of_previous_frame, pts]
as our candidate range, and always pick the lower. This would make us
jerk around a lot, which would be a particular problem with audio.

Fix by taking a two-pronged approach: First, if we hit a frame exactly,
just send [pts,pts]. Second, activate snapping even when interpolation
is off.

We still have a problem when playing back audio in the case of dropped
video frames (we'll output the same audio twice), but better audio
handling is somewhat outside the scope of this commit.

5 years agoAdd a missing dependency on -pthread.
Steinar H. Gunderson [Fri, 18 Oct 2019 20:52:16 +0000 (22:52 +0200)]
Add a missing dependency on -pthread.

Patch by Morten Linderud.

5 years agoAdd a mailmap file to change my personal email address in old commits.
Steinar H. Gunderson [Sun, 11 Aug 2019 08:47:42 +0000 (10:47 +0200)]
Add a mailmap file to change my personal email address in old commits.

sgunderson@bigfoot.com has been de facto dead for a year or two,
and is now definitely dead.

5 years agoFix the wording of a warning.
Steinar H. Gunderson [Wed, 31 Jul 2019 17:44:53 +0000 (19:44 +0200)]
Fix the wording of a warning.

5 years agoSupport disabling optional effects if a given other effect is _enabled_.
Steinar H. Gunderson [Sun, 28 Jul 2019 20:06:24 +0000 (22:06 +0200)]
Support disabling optional effects if a given other effect is _enabled_.

There are some restrictions (see the comments), but this is generally
useful if two effects are mutually exclusive, e.g., an overlay that can
be at one of many different points in the chain.

5 years agoMake it possible for the theme to override the status line.
Steinar H. Gunderson [Wed, 24 Jul 2019 13:06:29 +0000 (15:06 +0200)]
Make it possible for the theme to override the status line.

This is done by declaring a function format_status_line, which receives
the text that would normally be there (disk space left), as well as the
length of the current recording file in seconds. It can then return
whatever it would like.

My own code, but inspired by a C++ patch by Alex Thomazo in the Breizhcamp
repository (which did it by hardcoding a different status line in C++).

5 years agoRelease Nageru and Futatabi 1.9.0. 1.9.0
Steinar H. Gunderson [Sat, 20 Jul 2019 14:57:39 +0000 (16:57 +0200)]
Release Nageru and Futatabi 1.9.0.

5 years agoFix a typo in NEWS.
Steinar H. Gunderson [Sat, 20 Jul 2019 09:05:35 +0000 (11:05 +0200)]
Fix a typo in NEWS.

5 years agoMake it possible to call set_channel_name() for live and preview.
Steinar H. Gunderson [Fri, 19 Jul 2019 15:34:48 +0000 (17:34 +0200)]
Make it possible to call set_channel_name() for live and preview.

The use case for this is if you want to copy the channel name to
preview or similar. Does not affect the legacy channel_name()
callback (it is still guaranteed never to get 0 or 1).

Probably doesn't affect the analyzer; I haven't tested.

5 years agoClean some duplicate code from the default theme.
Steinar H. Gunderson [Fri, 19 Jul 2019 14:56:18 +0000 (16:56 +0200)]
Clean some duplicate code from the default theme.

5 years agoMake it possible to put checkboxes on theme menu entries.
Steinar H. Gunderson [Fri, 19 Jul 2019 11:54:17 +0000 (13:54 +0200)]
Make it possible to put checkboxes on theme menu entries.

5 years agoAdd get_frame_width() and get_frame_height() to the signals given to the theme, which...
Steinar H. Gunderson [Fri, 19 Jul 2019 11:24:03 +0000 (13:24 +0200)]
Add get_frame_width() and get_frame_height() to the signals given to the theme, which is usually what the user wants.

5 years agoFix a Lua crash on exit.
Steinar H. Gunderson [Fri, 19 Jul 2019 10:39:48 +0000 (12:39 +0200)]
Fix a Lua crash on exit.

5 years agoDeal better with the user forgetting to set width/height on effects that require...
Steinar H. Gunderson [Wed, 17 Jul 2019 13:46:40 +0000 (15:46 +0200)]
Deal better with the user forgetting to set width/height on effects that require them.

5 years agoFix an issue where we would show no signal even when there was a signal. Patch by...
Steinar H. Gunderson [Tue, 16 Jul 2019 11:40:02 +0000 (13:40 +0200)]
Fix an issue where we would show no signal even when there was a signal. Patch by Martin Sandsmark.

5 years agoRemove some leftover debugging code.
Steinar H. Gunderson [Tue, 25 Jun 2019 18:03:19 +0000 (20:03 +0200)]
Remove some leftover debugging code.

5 years agoAdd disable_if_always_disabled() to Block objects.
Steinar H. Gunderson [Sat, 22 Jun 2019 13:16:14 +0000 (15:16 +0200)]
Add disable_if_always_disabled() to Block objects.

This allows the theme to specify that a given effect only makes sense
if another effect is enabled; e.g. a crop that only makes sense if
immediately followed by a resize. This can cut down the number of
instantiations in some cases.

Also change so that 0 is no longer always the canonical choice;
if disabling a block is a possibility, that is. In situations with
things disabling each other transitively, this could reduce the
number of instantiations further.

5 years agoMore theme cleaning.
Steinar H. Gunderson [Fri, 21 Jun 2019 21:31:40 +0000 (23:31 +0200)]
More theme cleaning.

5 years agoFix cross-compilation.
Steinar H. Gunderson [Fri, 21 Jun 2019 20:11:39 +0000 (22:11 +0200)]
Fix cross-compilation.

Patch from Helmut Grohne.

5 years agoMove is_plain_signal(), which was now placed a bit confusingly.
Steinar H. Gunderson [Fri, 21 Jun 2019 18:16:57 +0000 (20:16 +0200)]
Move is_plain_signal(), which was now placed a bit confusingly.

5 years agoConvert channel_signal() and supports_set_wb() to imperative versions.
Steinar H. Gunderson [Fri, 21 Jun 2019 18:12:39 +0000 (20:12 +0200)]
Convert channel_signal() and supports_set_wb() to imperative versions.

This completes the theme conversion for all called-only-once functions.
As before, the old versions are supported for pre-1.9.0 compatibility.

5 years agoCorrect a comment.
Steinar H. Gunderson [Fri, 21 Jun 2019 18:05:55 +0000 (20:05 +0200)]
Correct a comment.

5 years agoAdd a missing hint.
Steinar H. Gunderson [Fri, 21 Jun 2019 18:04:22 +0000 (20:04 +0200)]
Add a missing hint.

5 years agoMake it possible to set number of channels imperatively instead of using a callback.
Steinar H. Gunderson [Fri, 21 Jun 2019 17:43:29 +0000 (19:43 +0200)]
Make it possible to set number of channels imperatively instead of using a callback.

num_channels() will still be used if it exists, for compatibility with older
themes.

5 years agoMake it possible to set channel names imperatively instead of using a callback.
Steinar H. Gunderson [Fri, 21 Jun 2019 17:31:28 +0000 (19:31 +0200)]
Make it possible to set channel names imperatively instead of using a callback.

channel_name() will still be used if it exists, for compatibility with older
themes.

5 years agoMove the handling of human-readable input resolution printing into C++; every theme...
Steinar H. Gunderson [Fri, 21 Jun 2019 16:22:28 +0000 (18:22 +0200)]
Move the handling of human-readable input resolution printing into C++; every theme should not need to care about this.

5 years agoSupport submenus within theme menus.
Steinar H. Gunderson [Fri, 21 Jun 2019 15:45:54 +0000 (17:45 +0200)]
Support submenus within theme menus.

5 years agoFix a possible deadlock in CEF.
Steinar H. Gunderson [Tue, 18 Jun 2019 20:47:08 +0000 (22:47 +0200)]
Fix a possible deadlock in CEF.

5 years agoSupport optional effects with multiple inputs.
Steinar H. Gunderson [Sun, 16 Jun 2019 17:14:24 +0000 (19:14 +0200)]
Support optional effects with multiple inputs.

This allows you to prune away entire sections of the chain; the typical
case is if you have an OverlayEffect(a, b) and want to disable that.
In the disabled versions of the chain, the OverlayEffect will be replaced
with an IdentityEffect that passes through a only and leaves the entire
subgraph under b noninstantiated.

5 years agoRefactor out find_inputs_for_block().
Steinar H. Gunderson [Sun, 16 Jun 2019 17:12:11 +0000 (19:12 +0200)]
Refactor out find_inputs_for_block().

5 years agoAdd an enable_if() to Block, for convenience.
Steinar H. Gunderson [Sun, 16 Jun 2019 09:02:11 +0000 (11:02 +0200)]
Add an enable_if() to Block, for convenience.

5 years agoSmall refactoring in Block.
Steinar H. Gunderson [Sun, 16 Jun 2019 08:38:03 +0000 (10:38 +0200)]
Small refactoring in Block.

5 years agoRename chain -> scene as appropriate.
Steinar H. Gunderson [Sun, 16 Jun 2019 08:30:38 +0000 (10:30 +0200)]
Rename chain -> scene as appropriate.

5 years agoMake Block.choose() return the effect that was chosen.
Steinar H. Gunderson [Sat, 15 Jun 2019 23:14:55 +0000 (01:14 +0200)]
Make Block.choose() return the effect that was chosen.

5 years agoFix so that parameters directly on effects actually override the ones on the block...
Steinar H. Gunderson [Sat, 15 Jun 2019 23:14:40 +0000 (01:14 +0200)]
Fix so that parameters directly on effects actually override the ones on the block, as was intended.

5 years agoRename choose_alternative() to choose().
Steinar H. Gunderson [Sat, 15 Jun 2019 22:31:20 +0000 (00:31 +0200)]
Rename choose_alternative() to choose().

5 years agoAllow calling disable() on everything that has an IdentityEffect as alternative.
Steinar H. Gunderson [Sat, 15 Jun 2019 22:02:56 +0000 (00:02 +0200)]
Allow calling disable() on everything that has an IdentityEffect as alternative.

5 years agoAllow giving class names to Block.choose_alternative.
Steinar H. Gunderson [Sat, 15 Jun 2019 22:01:05 +0000 (00:01 +0200)]
Allow giving class names to Block.choose_alternative.

5 years agoScene doesn't need theme->input_state to be set, as we never get Lua callacks from...
Steinar H. Gunderson [Sat, 15 Jun 2019 14:23:24 +0000 (16:23 +0200)]
Scene doesn't need theme->input_state to be set, as we never get Lua callacks from its setup_chain.

5 years agoGive a slightly friendlier error message if the user forgets to connect an input.
Steinar H. Gunderson [Sat, 15 Jun 2019 13:03:52 +0000 (15:03 +0200)]
Give a slightly friendlier error message if the user forgets to connect an input.

5 years agoRework the chain concept.
Steinar H. Gunderson [Thu, 13 Jun 2019 20:59:18 +0000 (22:59 +0200)]
Rework the chain concept.

For complex themes, building the multitude of chains one might need
has become very bothersome, with tricky Lua scripting and non-typesafe
multidimensional tables.

To alleviate this somewhat, we introduce a concept called Scenes.
A Scene is pretty much an EffectChain with a better name and significantly
more functionality. In particular, scenes don't consist of single Effects;
they consist of blocks, which can hold any number of alternatives for
Effects. On finalize, we will instantiate all possible variants of
EffectChains behind-the-scenes, like the Lua code used to have to do itself,
but this is transparent to the theme.

In particular, this means that inputs are much more flexible. Instead of
having to make separate chains for regular inputs, deinterlaced inputs,
video inputs and CEF inputs, you now just make an input, and can connect
any type to it runtime (or “display”, as it's now called). Output is also
flexible; by default, any scene will get both Y'CbCr and RGBA versions
compiled. (In both cases, you can make non-flexible versions to reduce
the number of different instantiations. This can be a good idea in
complex chains.)

This also does away with the concept of the prepare function for a chain;
any effect settings are snapshotted when you return from get_scene() (the new
name for get_chain(), obviously), so you don't need to worry about capturing
anything or get threading issues like you used to.

All existing themes will continue to work unmodified for the time being,
but it is strongly recommended to migrate from EffectChain to Scene.

5 years agoMove some Lua utility functions into a separate header file.
Steinar H. Gunderson [Tue, 11 Jun 2019 20:31:30 +0000 (22:31 +0200)]
Move some Lua utility functions into a separate header file.

5 years agoWork around a Mesa shader cache issue.
Steinar H. Gunderson [Sat, 25 May 2019 15:36:33 +0000 (17:36 +0200)]
Work around a Mesa shader cache issue.

5 years agoAdd a helper so that theme script warnings get line numbers.
Steinar H. Gunderson [Mon, 10 Jun 2019 10:07:49 +0000 (12:07 +0200)]
Add a helper so that theme script warnings get line numbers.