feat(server): route renders by settings format and adapted size; gate older servers
Owner review 1, phase 4 (P5). A render job now carries the output size its settings give (RenderSize, proportions win) and the settings format it needs, resolved on the server before the job is split, so only nodes that read that format and whose encoder takes the frame claim it, and a job no online node can read no longer waits for one. Nodes and the server announce the format they read; settings of a newer Chronos fail saying so. Encoder size limits are read as long edge x short edge: Media Foundation's software H.264 encoder, announced as 4096x2304, accepts portrait 2160x3840 (probed on this PC), so EncoderSelector and the provider take either orientation and cap a portrait frame against the turned limit. On the desktop, Sync and Send-and-render are disabled with the NeedsNewerServer tooltip while the server reads an older format than the working settings need. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e4364c4f25
commit
fca6c8dfea
27 files changed
+663
-47
No files matched your search
@@ -108,7 +108,7 @@ public sealed class ProjectMenuViewModel : LocalizedViewModel
|
||||
_source = source;
|
||||
_session = session;
|
||||
_ui = ui;
|
||||
_sync = new AsyncRelayCommand(() => SyncAsync(), () => !_isSyncing);
|
||||
_sync = new AsyncRelayCommand(() => SyncAsync(), () => !_isSyncing && PushBlockedReason is null);
|
||||
_updateMedia = new AsyncRelayCommand(UpdateMediaAsync, () => _copyJob == Guid.Empty);
|
||||
SaveVersionCommand = new RelayCommand(OpenSaveVersion, () => CanSaveVersion);
|
||||
HistoryCommand = new AsyncRelayCommand(OpenHistoryAsync);
|
||||
@@ -146,6 +146,18 @@ public sealed class ProjectMenuViewModel : LocalizedViewModel
|
||||
|
||||
public string StateToolTip => WorkspaceText.StateToolTip(_status, _isSyncing, IsServerHome);
|
||||
|
||||
/// <summary>
|
||||
/// Why the project cannot be sent to its server now (owner review 1, phase 4): its settings are of a format the server
|
||||
/// does not read (an older Chronos Server, which would refuse them); null when they can, and for a project of this PC's
|
||||
/// archive. Sync is disabled with this as its tooltip, and a render of the server's is held.
|
||||
/// </summary>
|
||||
public string? PushBlockedReason => IsServerHome && _source.Workspace is { } workspace && _host.HomeOf(workspace.Home) is { } home
|
||||
? ServerJobs.NeedsNewerServer(_session.Project.WrittenFormat, home.SettingsFormat)
|
||||
: null;
|
||||
|
||||
/// <summary>Sync in the menu: why it is disabled, else where the project stands.</summary>
|
||||
public string SyncToolTip => PushBlockedReason ?? StateToolTip;
|
||||
|
||||
/// <summary>The ▾ button: its name, then where the project stands, then what the menu holds.</summary>
|
||||
public string MenuToolTip => Loc.L("Tooltips.Editor.Project.Menu", Name, StateText);
|
||||
|
||||
@@ -270,6 +282,12 @@ public sealed class ProjectMenuViewModel : LocalizedViewModel
|
||||
if (_host.Settings.WorkspaceVersionOnRender && !await SaveForRenderAsync()) return false;
|
||||
// Rendered on this PC from the originals the workspace holds (phase 5c): the project renders as it is.
|
||||
if (!IsServerHome || _source.RendersLocally) return true;
|
||||
// Settings the server cannot read are neither sent nor rendered there (owner review 1, phase 4: an older server).
|
||||
if (PushBlockedReason is { } newer)
|
||||
{
|
||||
_ui.Notify(Loc.L("Editor.Workspace.RenderHeld"), newer, isError: true);
|
||||
return false;
|
||||
}
|
||||
await StoreEditAsync();
|
||||
var status = await _host.StatusAsync(ProjectId);
|
||||
if (_disposed) return false;
|
||||
@@ -386,6 +404,12 @@ public sealed class ProjectMenuViewModel : LocalizedViewModel
|
||||
public async Task SyncAsync(bool quiet = false)
|
||||
{
|
||||
if (_isSyncing) return;
|
||||
// Settings the server cannot read stay here until it is updated (owner review 1, phase 4): Sync says why.
|
||||
if (PushBlockedReason is { } newer)
|
||||
{
|
||||
if (!quiet) _ui.Notify(Loc.L("Editor.Workspace.NotSent"), newer, isError: true);
|
||||
return;
|
||||
}
|
||||
SetSyncing(true);
|
||||
try
|
||||
{
|
||||
@@ -1026,6 +1050,8 @@ public sealed class ProjectMenuViewModel : LocalizedViewModel
|
||||
OnPropertyChanged(nameof(StateText));
|
||||
OnPropertyChanged(nameof(StateKind));
|
||||
OnPropertyChanged(nameof(StateToolTip));
|
||||
OnPropertyChanged(nameof(PushBlockedReason));
|
||||
OnPropertyChanged(nameof(SyncToolTip));
|
||||
OnPropertyChanged(nameof(MenuToolTip));
|
||||
OnPropertyChanged(nameof(MenuName));
|
||||
OnPropertyChanged(nameof(HasMediaUpdate));
|
||||
@@ -1044,6 +1070,7 @@ public sealed class ProjectMenuViewModel : LocalizedViewModel
|
||||
OnPropertyChanged(nameof(CopyOriginalsToolTip));
|
||||
OnPropertyChanged(nameof(ProxiesOnlyToolTip));
|
||||
_updateMedia.RaiseCanExecuteChanged();
|
||||
_sync.RaiseCanExecuteChanged();
|
||||
CommandManager.InvalidateRequerySuggested();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user