fix(tvos): make EAC3 playback conform to Dolby's guidance

Groundwork for #1300. Establishes the session, buffering and route
handling Dolby's application guide prescribes, and adds the diagnostic
arm needed to find out whether Apple's sample-buffer renderer can carry
Atmos objects at all.

Audio session, per the guide's sequence:

- Adopt the long-form playback profile in one atomic call at app launch
  and activate the session there. The SDK only accepts that policy with
  category Playback, a Default/MoviePlayback/SpokenAudio mode and no
  options, so it cannot be assembled from separate calls.
- Report the resolved rendering mode in the player, hidden unless the
  system resolves it. Apple only resolves it for CarPlay and AirPlay, so
  an unresolved value means unknown, never "not Dolby".

Diagnostics (Apple TV only, Settings > Video Playback > Atmos Output Test):

- Add a sample-buffer arm. It reads the asset with AVAssetReader at
  outputSettings nil and hands the untouched compressed buffers and the
  untouched format description straight to the renderer, with a variant
  that rebuilds the description the way playback builds it. Every
  existing mode went through AVPlayer, so nothing exercised the path
  playback actually uses; this is what tells us whether the renderer or
  our construction is at fault.
- Add an AirPlay route picker. AirPlay is the only route where the system
  resolves the rendering mode and the supported channel layouts, so it is
  what makes those observations reachable at all, and the AVPlayer arms
  now allow external playback so every arm can be compared on the same
  destination.
- Add a session-mode toggle for the one profile difference between the
  guide and previous playback behaviour.
- Report the session profile, supported layouts, both format
  descriptions, the magic cookie and the renderer status, and release the
  session on stop so a failed run cannot contaminate the next one.

Also bumps MPVKit to 1.0.14, which carries the matching audio output
work: the channel layout AVFoundation itself uses for Dolby content, a
renderer-failure observer so the fallback to PCM can actually run, the
prescribed feed ordering and preroll, flush recovery that re-supplies the
discarded audio instead of shifting later audio into its place, and
capability-driven fallback on route and capability changes.

This does not yet fix #1300. Whether the sample-buffer renderer can carry
JOC is still unknown; it removes every difference from the documented
setup that could explain the failure, and gives us the arm to answer it
on real hardware.
This commit is contained in:
edde746
2026-07-26 20:42:58 +02:00
parent a56b9a3dfb
commit 6c14049e95
62 changed files with 1743 additions and 148 deletions
+32 -4
View File
@@ -418,6 +418,15 @@ class _Translations$settings$hu extends Translations$settings$en {
@override String get atmosTestRawStreamDescription => 'A tesztfájlt pontosan úgy közvetíti, mint a lejátszón belüli Atmos lejátszás. Szükséges a tesztfájl URL-je.';
@override String get atmosTestRawFile => 'Nyers EAC3 fájl';
@override String get atmosTestRawFileDescription => 'Ismert hosszúságú tesztfájlt játszik le. Szükséges a tesztfájl URL-je.';
@override String get atmosTestAsbarNative => 'Mintapuffer-megjelenítő (natív)';
@override String get atmosTestAsbarNativeDescription => 'A fájl érintetlen tömörített hangját közvetlenül a rendszer megjelenítőjének adja. Szükséges a tesztfájl URL-je.';
@override String get atmosTestAsbarGenerated => 'Mintapuffer-megjelenítő (újraépített)';
@override String get atmosTestAsbarGeneratedDescription => 'Ugyanaz, de a lejátszás módján felépített hangleírással. Szükséges a tesztfájl URL-je.';
@override String get atmosTestSessionMode => 'Filmlejátszási mód használata';
@override String get atmosTestSessionModeDescription => 'Kikapcsolva a Dolby által dokumentált módot használja. Bekapcsolva a korábbi módot.';
@override String get atmosTestShowRoutePicker => 'AirPlay kimenet választása';
@override String get atmosTestHideRoutePicker => 'AirPlay kimenetválasztó elrejtése';
@override String get atmosTestRoutePickerDescription => 'Elküldi a tesztet egy AirPlay vevőnek. Csak az AirPlay jelzi a feloldott hangmódot.';
@override String get atmosTestStop => 'Teszt leállítása';
@override String get atmosTestUrl => 'Tesztfájl URL-je';
@override String get atmosTestUrlDescription => 'Nyers .ec3 Dolby Atmos fájl HTTP URL-je (pl. ffmpeg-gel kinyerve)';
@@ -1514,6 +1523,11 @@ class _Translations$videoSettings$hu extends Translations$videoSettings$en {
@override String get audioOutput => 'Hangkimenet';
@override String get performanceOverlay => 'Teljesítményadatok';
@override String get audioPassthrough => 'Hangtovábbítás (passthrough)';
@override String get audioOutputDolbyAtmos => 'Dolby Atmos';
@override String get audioOutputDolbyAudio => 'Dolby Audio';
@override String get audioOutputSurround => 'Térhatású';
@override String get audioOutputSpatial => 'Térbeli hang';
@override String get audioOutputStereo => 'Sztereó';
@override String get audioNormalization => 'Hangerő normalizálása';
@override String get audioDownmix => 'Lekeverés sztereóra';
}
@@ -2463,6 +2477,15 @@ extension on TranslationsHu {
'settings.atmosTestRawStreamDescription' => 'A tesztfájlt pontosan úgy közvetíti, mint a lejátszón belüli Atmos lejátszás. Szükséges a tesztfájl URL-je.',
'settings.atmosTestRawFile' => 'Nyers EAC3 fájl',
'settings.atmosTestRawFileDescription' => 'Ismert hosszúságú tesztfájlt játszik le. Szükséges a tesztfájl URL-je.',
'settings.atmosTestAsbarNative' => 'Mintapuffer-megjelenítő (natív)',
'settings.atmosTestAsbarNativeDescription' => 'A fájl érintetlen tömörített hangját közvetlenül a rendszer megjelenítőjének adja. Szükséges a tesztfájl URL-je.',
'settings.atmosTestAsbarGenerated' => 'Mintapuffer-megjelenítő (újraépített)',
'settings.atmosTestAsbarGeneratedDescription' => 'Ugyanaz, de a lejátszás módján felépített hangleírással. Szükséges a tesztfájl URL-je.',
'settings.atmosTestSessionMode' => 'Filmlejátszási mód használata',
'settings.atmosTestSessionModeDescription' => 'Kikapcsolva a Dolby által dokumentált módot használja. Bekapcsolva a korábbi módot.',
'settings.atmosTestShowRoutePicker' => 'AirPlay kimenet választása',
'settings.atmosTestHideRoutePicker' => 'AirPlay kimenetválasztó elrejtése',
'settings.atmosTestRoutePickerDescription' => 'Elküldi a tesztet egy AirPlay vevőnek. Csak az AirPlay jelzi a feloldott hangmódot.',
'settings.atmosTestStop' => 'Teszt leállítása',
'settings.atmosTestUrl' => 'Tesztfájl URL-je',
'settings.atmosTestUrlDescription' => 'Nyers .ec3 Dolby Atmos fájl HTTP URL-je (pl. ffmpeg-gel kinyerve)',
@@ -2690,6 +2713,8 @@ extension on TranslationsHu {
'videoControls.language' => 'Nyelv',
'videoControls.noSubtitlesFound' => 'Nem találhatók feliratok',
'videoControls.noSubtitlesAvailable' => 'Nincsenek elérhető feliratok',
_ => null,
} ?? switch (path) {
'videoControls.noAudioTracksAvailable' => 'Nincsenek elérhető hangsávok',
'videoControls.noTracksAvailable' => 'Nincsenek elérhető sávok',
'videoControls.subtitleDownloaded' => 'Felirat letöltve',
@@ -2699,8 +2724,6 @@ extension on TranslationsHu {
'messages.markedAsWatched' => 'Megjelölve megtekintettként',
'messages.markedAsUnwatched' => 'Megjelölve nem megtekintettként',
'messages.markedAsWatchedOffline' => 'Megjelölve megtekintettként (szinkronizálás online állapotban)',
_ => null,
} ?? switch (path) {
'messages.markedAsUnwatchedOffline' => 'Megjelölve nem megtekintettként (szinkronizálás online állapotban)',
'messages.autoRemovedWatchedDownload' => ({required Object title}) => 'Automatikusan eltávolítva: ${title}',
'messages.autoRemovedWatchedDownloads' => ({required num n}) => (_root.$meta.cardinalResolver ?? PluralResolvers.cardinal('hu'))(n, one: '${n} megtekintett letöltés automatikusan eltávolítva', other: '${n} megtekintett letöltés automatikusan eltávolítva', ),
@@ -3204,6 +3227,8 @@ extension on TranslationsHu {
'watchTogether.codeMustBe5Chars' => 'A munkamenetkódnak 5 karakterből kell állnia',
'watchTogether.joinInstructions' => 'Add meg a házigazda kódját a csatlakozáshoz.',
'watchTogether.failedToCreate' => 'Nem sikerült a munkamenet létrehozása',
_ => null,
} ?? switch (path) {
'watchTogether.failedToJoin' => 'Nem sikerült csatlakozni a munkamenethez',
'watchTogether.sessionCodeCopied' => 'A munkamenetkód a vágólapra másolva',
'watchTogether.relayUnreachable' => 'A relészerver nem érhető el. Az internetszolgáltató blokkolása megakadályozhatja a közös nézést.',
@@ -3213,8 +3238,6 @@ extension on TranslationsHu {
'watchTogether.joinCurrentPlaybackDescription' => 'Visszatérés ahhoz, amit a házigazda éppen néz',
'watchTogether.failedToOpenCurrentPlayback' => 'Nem sikerült megnyitni a jelenlegi lejátszást',
'watchTogether.participantJoined' => ({required Object name}) => '${name} csatlakozott',
_ => null,
} ?? switch (path) {
'watchTogether.participantLeft' => ({required Object name}) => '${name} kilépett',
'watchTogether.participantPaused' => ({required Object name}) => '${name} szüneteltette a lejátszást',
'watchTogether.participantResumed' => ({required Object name}) => '${name} folytatta a lejátszást',
@@ -3413,6 +3436,11 @@ extension on TranslationsHu {
'videoSettings.audioOutput' => 'Hangkimenet',
'videoSettings.performanceOverlay' => 'Teljesítményadatok',
'videoSettings.audioPassthrough' => 'Hangtovábbítás (passthrough)',
'videoSettings.audioOutputDolbyAtmos' => 'Dolby Atmos',
'videoSettings.audioOutputDolbyAudio' => 'Dolby Audio',
'videoSettings.audioOutputSurround' => 'Térhatású',
'videoSettings.audioOutputSpatial' => 'Térbeli hang',
'videoSettings.audioOutputStereo' => 'Sztereó',
'videoSettings.audioNormalization' => 'Hangerő normalizálása',
'videoSettings.audioDownmix' => 'Lekeverés sztereóra',
'performanceOverlay.color' => 'Szín',