This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[avcustomedit] Some timing and simplification fixes (#349)
Running this sample on device with the interpreter has spotted a few issues in the sample. * Timing issue: Use `DispatchGroup.Notify` (like sample) instead of `Waiting` (it's not the same) and remove the `InvokeOnMainThread` since we're already running on that thread. Also uncomment some code that, likely, did not work because `Notify` was not used; * Timing issue: `composition` can be `null` but it triggers an `ArgumentNullException` (because the API does not _officially_ accept `nil`). * Enhancement: Set initial capacity of `List<T>` - just like it's done in the original sample; * Simplification: There's no point in checking for `null` values inside `List<T>` since that would have triggered an `ArgumentNullException`; * Simplification" There's no point in converting `CMTimeRange` into `NSValue` (and back into `CMTimeRange`). In contrast to `NSArray` we can add non-`NSObject` (including value type like struct) inside `List<T>`; * Cleanup: remove ugly `goto` and use `_` for unused `out NSError` This will fix xamarin/xamarin-macios#5364
- Loading branch information
Showing
2 changed files
with
35 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters