Unione di funzione/codec-immagini in funzione/decoder-h264 (catena della 0.3.0)

Porta nel decodificatore H.264 le regole senza componenti esterni, la sessione S4b e i codec
di immagini di casa (C1), così la richiesta di unione di questo ramo contiene già tutta la
catena. Conflitti risolti tenendo le due parti: in decisioni.md tutte le righe, prima quelle
della catena e poi quelle del decodificatore; in docker.md, processo.md e Sviluppo.md né
ffmpeg (uscito con questo ramo) né SkiaSharp (uscito con C1), con l'eccezione «da fare» delle
prove di conformità; nelle prove di Febe.Tests entrambe le cartelle di file copiati e, nelle
prove delle miniature, sia i video sia le immagini di riferimento.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-25 11:16:26 +01:00
commit 8bcc86e496
279 files changed
+25617 -816

No files matched your search

+39 -8
View File
@@ -261,7 +261,16 @@ public sealed class FebeApp : IAsyncDisposable
// Browser, connection, engine. The engine loop starts only once the browser is up.
// «Pagina iniziale» (issue #52) is the connection's, which exists only after the browser: looked up when pressed.
var context = new FebePlatformContext(o, data, Database, Clock, Log, Tracker, ct => Connection?.OpenStartPageAsync(ct) ?? Task.CompletedTask);
// The copy when Alberto closes the browser window (S4b) is the connection's too, looked up when it happens.
var context = new FebePlatformContext(
o,
data,
Database,
Clock,
Log,
Tracker,
ct => Connection?.OpenStartPageAsync(ct) ?? Task.CompletedTask,
(how, ct) => Connection?.CopyOnWindowClosedAsync(how, ct) ?? Task.CompletedTask);
var browser = await _platform.CreateBrowserAsync(context, ct).ConfigureAwait(false);
Browser = browser;
PrepareSavedSession(context, browser);
@@ -286,8 +295,9 @@ public sealed class FebeApp : IAsyncDisposable
random,
engineOptions,
userIsDriving: () => browser.UserIsDriving,
isConnected: () => connection.IsConnected == true,
ct: ct).ConfigureAwait(false);
isConnected: () => connection.IsReadyToCollect,
ct: ct,
sessionCopyMissing: () => connection.IsConnected == true && connection.SessionCopyMissing).ConfigureAwait(false);
// The diagnostic report (issue #39): one recorder for the engine, the pipeline and the interface. What the
// capture sees goes to the session in progress, if any.
var diagnostics = new CollectionDiagnostics(Clock, () => services.Runtime.CurrentSession?.SessionId, new DiagnosticLog(data.Diagnostics, Clock));
@@ -500,9 +510,7 @@ public sealed class FebeApp : IAsyncDisposable
InBackground(() => Connection.RunAsync(ct));
await engine.StartAsync(ct).ConfigureAwait(false);
Log.Info("motore", Connection.IsConnected == true
? "Motore avviato: il browser è collegato."
: "Motore avviato: aspetta il collegamento (pagina Collegamento, «Accedi a Instagram»).");
Log.Info("motore", StartedMessage(Connection));
_running.TrySetResult();
}
catch (OperationCanceledException) when (ct.IsCancellationRequested)
@@ -576,10 +584,15 @@ public sealed class FebeApp : IAsyncDisposable
var protector = _platform.CreateSessionProtector(context);
var saved = new FileSiteSession(context.Data.SessionFile, protector, message => Log.Info("sessione", message));
var rules = LoadSignalRules(context.Data);
_copier = new BrowserSessionCopier(browser.Cdp, SessionCapturePlan.For(o.Site, catalog, rules), saved, Clock, message => Log.Info("sessione", message));
var settings = context.Storage.Settings;
_copier = new BrowserSessionCopier(browser.Cdp, SessionCapturePlan.For(o.Site, catalog, rules), saved, Clock, message => Log.Info("sessione", message))
{
// What an incomplete copy does (S4b): read at every copy, so a change on the Collegamento page holds at once.
IncompleteCopy = async token => (await SessionCopySettings.LoadAsync(settings, token).ConfigureAwait(false)).IncompleteCopy,
};
_requestCatalog = catalog;
SavedSession = saved;
Log.Info("raccolta", $"Raccolta «richieste»: {catalog.Configured.Count().ToString(CultureInfo.InvariantCulture)} operazioni configurate in {Path.GetFileName(catalog.Source)}; la sessione si copia a «Ho finito».");
Log.Info("raccolta", $"Raccolta «richieste»: {catalog.Configured.Count().ToString(CultureInfo.InvariantCulture)} operazioni configurate in {Path.GetFileName(catalog.Source)}; la sessione si copia a «Ho finito», alla chiusura della finestra del browser e alla fine della guida.");
}
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or CryptographicException or PlatformNotSupportedException)
{
@@ -665,6 +678,24 @@ public sealed class FebeApp : IAsyncDisposable
}
}
/// <summary>
/// The start-up line of the engine, with what it waits for: the same state as the engine's own gate
/// (<see cref="BrowserConnectionService.IsReadyToCollect"/>), so that the log never says «collegato» while the monitor
/// says «Serve «Ho finito»».
/// </summary>
internal static string StartedMessage(BrowserConnectionService connection)
{
ArgumentNullException.ThrowIfNull(connection);
if (connection.IsReadyToCollect)
{
return "Motore avviato: il browser è collegato.";
}
return connection.IsConnected == true && connection.SessionCopyMissing
? "Motore avviato: il browser è collegato, ma aspetta la copia della sessione per le richieste (pagina Collegamento, «Ho finito»)."
: "Motore avviato: aspetta il collegamento (pagina Collegamento, «Accedi a Instagram»).";
}
/// <summary>The site's home page as the browser writes it (with its final slash), for «Pagina iniziale».</summary>
private static string HomeUrl(string baseUrl) =>
Uri.TryCreate(baseUrl, UriKind.Absolute, out var home) ? home.AbsoluteUri : baseUrl;