refactor!: rename Titano to Chronos and move CI and releases to Gitea (#6)
CI / Build and test (push) Successful in 8m14s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 7s
Release / Build, test and publish (push) Successful in 13m19s
CI / PostgreSQL 16 integration (push) Successful in 4m49s
CI / PostgreSQL 17 integration (push) Successful in 5m28s
CI / Docker image (push) Successful in 53s
Release / Server image (push) Failing after 10s

The owner renamed the product and moved the repository to the self-hosted
Gitea (https://gitea.encke-hake.ts.net/BalboSoft/Chronos) for more control,
and asked for Actions and a first automatic release with the server package
and the Windows exe (docs/requests/2026-10-23-chronos-gitea.md).

- Chronos everywhere: a byte-exact rename of contents and paths, then a
  per-language review of the forms the old name's ending had dictated.
- Gitea instead of GitHub: the update check, licence, issue and support
  links read ChronosReleasesUrl; the update check takes the highest stable
  version, offers a pre-release build its final release and reports a
  repository it cannot see as a failed check. EULA, security policy and
  Gitea issue forms live at the repository root.
- Gitea Actions for the Linux act_runner (.gitea/workflows): CI, release,
  nightly image and performance gates in the .NET SDK container with git
  checkout and the system SQLite. The release cross-compiles the Windows
  programs, checks their icon, version and DPI manifest, packs installers
  and zips, publishes the Gitea release and pushes the server image
  (REGISTRY_TOKEN). Windows-only tests run in an opt-in job on a Windows
  runner (WINDOWS_RUNNER).
- New Chronos.Tools commands: zip, gitea-release, postgres-ci (replaces the
  docker-exec script, which Gitea's service containers do not allow; the
  throw-away server runs without durability) and pe-check.
- Timed tests take their budget from TestTiming (CHRONOS_TEST_TIME_FACTOR,
  3 on the shared runner; the weekly performance gates keep theirs).

BREAKING CHANGE: programs, settings, data folders, file types, environment
variables and the Docker image use the new name; nothing is migrated from
Titano, which never had a release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #6.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-10-23 12:45:18 +02:00
1 parent c99842cc86
commit f2b58522b9
1801 files changed
+11804 -10676

No files matched your search

+134
View File
@@ -0,0 +1,134 @@
using Chronos.Core.Imaging;
namespace Chronos.Core.Video;
public enum VideoCodec
{
H264,
Hevc,
Av1,
Mjpeg,
JpegSequence,
PngSequence,
Tiff16Sequence,
LinearDngSequence,
Gif,
Apng,
}
public enum ContainerFormat
{
Mp4,
Avi,
ImageSequence,
Gif,
Apng,
}
public enum RateControl
{
Vbr,
Cbr,
Quality,
}
public enum CodecProfile
{
Auto,
H264Baseline,
H264Main,
H264High,
HevcMain,
HevcMain10,
Av1Main,
}
public static class VideoCodecInfo
{
public static ContainerFormat DefaultContainer(VideoCodec codec) => codec switch
{
VideoCodec.H264 or VideoCodec.Hevc or VideoCodec.Av1 => ContainerFormat.Mp4,
VideoCodec.Mjpeg => ContainerFormat.Avi,
VideoCodec.Gif => ContainerFormat.Gif,
VideoCodec.Apng => ContainerFormat.Apng,
_ => ContainerFormat.ImageSequence,
};
/// <summary>True for codecs every platform can produce without an OS encoder.</summary>
public static bool IsManaged(VideoCodec codec) => codec is not (VideoCodec.H264 or VideoCodec.Hevc or VideoCodec.Av1);
public static string FileExtension(VideoCodec codec) => codec switch
{
VideoCodec.H264 or VideoCodec.Hevc or VideoCodec.Av1 => ".mp4",
VideoCodec.Mjpeg => ".avi",
VideoCodec.Gif => ".gif",
VideoCodec.Apng => ".png",
VideoCodec.JpegSequence => ".jpg",
VideoCodec.PngSequence => ".png",
VideoCodec.Tiff16Sequence => ".tif",
VideoCodec.LinearDngSequence => ".dng",
_ => ".bin",
};
}
/// <summary>What an encoder on this machine can do (shown in Settings › Rendering).</summary>
public sealed record EncoderCapability(
VideoCodec Codec,
string Name,
bool Hardware,
int MaxWidth,
int MaxHeight,
bool SupportsTenBit,
string? Vendor = null);
/// <summary>Complete parameters of one encode.</summary>
public sealed record EncodeSettings
{
public required string OutputPath { get; init; }
public required VideoCodec Codec { get; init; }
public required int Width { get; init; }
public required int Height { get; init; }
public required Rational FrameRate { get; init; }
public CodecProfile Profile { get; init; } = CodecProfile.Auto;
public int BitDepth { get; init; } = 8;
public RateControl RateControl { get; init; } = RateControl.Vbr;
/// <summary>Average bit rate in bits per second (VBR/CBR).</summary>
public long BitRate { get; init; }
/// <summary>0–100 quality for <see cref="RateControl.Quality"/>, JPEG/MJPEG and GIF.</summary>
public int Quality { get; init; } = 90;
/// <summary>Distance between key frames in frames; 0 = encoder default (≈ 1 s).</summary>
public int GopLength { get; init; }
public int BFrames { get; init; } = 2;
public bool PreferHardware { get; init; } = true;
/// <summary>Optional specific encoder name from <see cref="EncoderCapability.Name"/>.</summary>
public string? EncoderName { get; init; }
}
/// <summary>One open encode. Frames are linear-light buffers at the output size.</summary>
public interface IVideoEncoderSession : IDisposable
{
/// <summary>Encoder actually used ("NVIDIA NVENC H.264", "Managed MJPEG").</summary>
string EncoderName { get; }
bool IsHardware { get; }
/// <summary>Appends a frame shown for <paramref name="duration90k"/> ticks of a 90 kHz clock.</summary>
void WriteFrame(ImageBuffer frame, long duration90k);
/// <summary>Flushes and closes the output. Without it, <see cref="IDisposable.Dispose"/> deletes the partial file.</summary>
void Complete();
}
/// <summary>A family of encoders (Media Foundation on Windows, managed everywhere).</summary>
public interface IVideoEncoderProvider
{
string Name { get; }
IReadOnlyList<EncoderCapability> Capabilities { get; }
bool CanEncode(EncodeSettings settings);
IVideoEncoderSession Open(EncodeSettings settings);
}