Posts

Post not yet marked as solved
1 Replies
210 Views
We have a process that takes high resolution source PNG/JPG images and creates renditions of these images in various lower resolution formats / cropped versions. This process works well and gets the results we want. We can re-run these functions on hundreds of images and get the same output every time. We then commit these files in git repos. HOWEVER, every time we update macOS to a new version (such as updating to High Sierra, Monterey, etc.) when we run these functions ALL of the images result in an output that is different and has different hashes so git treats these images as being changed even though the source images are identical. FURTHER, JPG images seem to have a different output when run on an Intel mac vs. an Apple M1 mac. We have checked the head of the output images using a command like: od -bc banner.png | head This results in the same head data in all cases even though the actual image data doesn't match after version changes. We've also checked CGImageSourceCopyPropertiesAtIndex such as: Source Code { ColorModel = RGB; Depth = 8; HasAlpha = 1; PixelHeight = 1080; PixelWidth = 1920; ProfileName = "Generic RGB Profile"; "{Exif}" = { PixelXDimension = 1920; PixelYDimension = 1080; }; "{PNG}" = { InterlaceType = 0; }; } Which do not show any differences between versions of macOS or Intel vs. M1. We don't want the hash to keep changing on us and resulting in extra churn in git and hoping for feedback that may help in us getting consistent output in all cases. Any tips are greatly appreciated. Source code is attached because it was too long to be inline.
Posted
by dmi1011.
Last updated
.
Post not yet marked as solved
2 Replies
946 Views
Hi,I'm using AVPlayerViewController as a subview in a fullscreen UIViewController presented modally with UIModalTransitionStyleCrossDissolve.As of tvOS 11, no controller input would work except for the menu button. Swipes were not recognized, button presses not recognziend, etc.Adding a preferredFocusView fixes MOST of the control issues except Play/Pause is still not recognized.- (UIView*)preferredFocusedView { if (self.moviePlayerController != nil) { return ((AVPlayerViewController*)self.moviePlayerController).view; } else { return self.view; }}Additionally, after closing the video player, Play/Pause is no longer recognized anywhere in the application. Prior to presenting the AVPlayerViewController, the app receives Play/Pause button events just fine.I've tried capturing the Play/Pause events via UITapGestureRecognizer and subclassing UIApplication to override the sendEvent method. Neither fire for Play/Pause once the AVPlayerViewController is loaded and app must be restarted.- (void)sendEvent:(UIEvent*)event { [super sendEvent:event]; if (self.remoteControlEventsDelegate) { BOOL playPausePressed = NO; if (event.subtype == UIEventSubtypeRemoteControlPlay || event.subtype == UIEventSubtypeRemoteControlPause || event.subtype == UIEventSubtypeRemoteControlTogglePlayPause) { playPausePressed = YES; } else if ([event isKindOfClass:[UIPressesEvent class]]) { for (UIPress *press in [(UIPressesEvent *)event allPresses]) { BOOL buttonReleased = press.phase == UIPressPhaseEnded || press.phase == UIPressPhaseCancelled; switch (press.type) { case UIPressTypePlayPause: playPausePressed = buttonReleased; break; default: break; } } } if (playPausePressed && [self.remoteControlEventsDelegate respondsToSelector:@selector(playPausePressed)]) { [self.remoteControlEventsDelegate playPausePressed]; } }} This is a critical bug for video player apps.How can we resolve this issue?ThanksJames
Posted
by dmi1011.
Last updated
.