Skip to content

[AVFoundation] Fix signature for LoadTrack*/LoadTracks* methods. Fixes #25606#25653

Open
rolfbjarne wants to merge 15 commits into
mainfrom
dev/rolf/issue-25606-loadtracks
Open

[AVFoundation] Fix signature for LoadTrack*/LoadTracks* methods. Fixes #25606#25653
rolfbjarne wants to merge 15 commits into
mainfrom
dev/rolf/issue-25606-loadtracks

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

The completion handler callbacks for LoadTrack*/LoadTracks* methods on several AVFoundation classes had incorrect parameter types (e.g. AVMutableCompositionTrack instead of AVMovieTrack).

This PR:

  • Obsoletes the incorrectly-typed methods (guarded behind XAMCORE_5_0)
  • Adds new correctly-typed overloads with named delegate types for each class
  • Uses 2 suffix where naming conflicts arise due to delegate type inheritance relationships (AVAsset, AVMutableMovie)
  • Adds unit tests for all new APIs

Affected classes:

  • AVAsset: LoadTrack2, LoadTrackWithMediaCharacteristics, LoadTracksWithMediaType
  • AVMovie (category): LoadTrack, LoadTracksWithMediaType, LoadTracksWithMediaCharacteristic
  • AVMutableMovie: LoadTrack2, LoadTracksWithMediaType, LoadTracksWithMediaCharacteristic
  • AVFragmentedMovie (category): LoadTrack, LoadTracksWithMediaType, LoadTracksWithMediaCharacteristic
  • AVComposition (category): LoadTrack, LoadTracksWithMediaType, LoadTracksWithMediaCharacteristic

Fixes #25606

🤖 Pull request created by Copilot

rolfbjarne and others added 2 commits June 5, 2026 16:42
…ixes #25606.

Fix the completion handler parameter types for LoadTrack/LoadTracksWithMediaType/
LoadTracksWithMediaCharacteristic methods in:
- AVAsset (AVCompositionTrack -> AVAssetTrack)
- AVMutableMovie (AVMovieTrack -> AVMutableMovieTrack)
- AVFragmentedMovie (AVMutableCompositionTrack -> AVFragmentedMovieTrack)
- AVComposition (AVMutableCompositionTrack -> AVCompositionTrack)

Fixes #25606.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…d signatures.

Tests cover the new correctly-typed callback overloads for:
- AVAsset.LoadTrack2, LoadTrackWithMediaCharacteristics, LoadTracksWithMediaType
- AVMovie.LoadTrack, LoadTracksWithMediaType, LoadTracksWithMediaCharacteristic
- AVMutableMovie.LoadTrack2, LoadTracksWithMediaType, LoadTracksWithMediaCharacteristic
- AVComposition.LoadTrack, LoadTracksWithMediaType, LoadTracksWithMediaCharacteristic

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rolfbjarne

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@rolfbjarne

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Move #if !__TVOS__ outside the #region directives so they nest properly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rolfbjarne

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@rolfbjarne

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

rolfbjarne and others added 2 commits July 2, 2026 16:19
…utes.

- Fix incorrect async method names in Obsolete messages (copy-paste errors
  referencing wrong methods like LoadTracksWithMediaCharacteristic2Async
  instead of LoadTracksWithMediaType2Async).
- Fix AVMovie.LoadTrack obsolete referencing 'AVMovieLoadTracksCallback'
  (plural) instead of 'AVMovieLoadTrackCallback' (singular).
- Add missing [Async] and platform attributes to AVAsset's
  LoadTracksWithMediaType (AVMediaTypes, ...) Wrap method for consistency.
- Sort Documentation.KnownFailures.txt entries correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne enabled auto-merge (squash) July 3, 2026 11:02
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #beb3498] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: beb349897077d8bb5067876e0d72e7ee74296aea [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #beb3498] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: beb349897077d8bb5067876e0d72e7ee74296aea [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #beb3498] Build passed (Build packages) ✅

Pipeline on Agent
Hash: beb349897077d8bb5067876e0d72e7ee74296aea [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: beb349897077d8bb5067876e0d72e7ee74296aea [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #beb3498] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

1 tests crashed, 0 tests failed, 196 tests passed.

Failures

❌ windows tests

🔥 Failed catastrophically on VSTS: test results - windows (no summary found).

Html Report (VSDrops) Download

Successes

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 17 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 18 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. [attempt 2] Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: beb349897077d8bb5067876e0d72e7ee74296aea [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AVAsset.LoadTracksWithMediaTypeAsync binding incorrect return type

4 participants