Skip to content

Commit

Permalink
Minor fix in AKDevice
Browse files Browse the repository at this point in the history
Summary: Using the function parameter instead of always using the suppored video formats of WorldTracking

Reviewed By: enpe

Differential Revision: D67956294

fbshipit-source-id: 9f1bc25dfa2def83fc38f480c7309788f39274e4
  • Loading branch information
janherling authored and facebook-github-bot committed Jan 9, 2025
1 parent 807d699 commit e45014b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions impl/ocean/devices/arkit/AKDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -736,14 +736,14 @@ - (void)session:(ARSession *)session didRemoveAnchors:(NSArray<__kindof ARAnchor
}
}

+ (ARVideoFormat*)determinePreferredVideoFormat:(NSArray<ARVideoFormat *> *)supportedVideoFormats withWidth:(unsigned int)preferredWidth withHeight:(unsigned int)preferredHeight withFps:(float)preferredFps withHDR:(int)preferredHDR
+ (ARVideoFormat*)determinePreferredVideoFormat:(NSArray<ARVideoFormat*>*)supportedVideoFormats withWidth:(unsigned int)preferredWidth withHeight:(unsigned int)preferredHeight withFps:(float)preferredFps withHDR:(int)preferredHDR
{
#ifdef OCEAN_DEBUG
Log::debug() << "Supported video formats for tracker:";

for (size_t n = 0; n < ARWorldTrackingConfiguration.supportedVideoFormats.count; ++n)
for (size_t n = 0; n < supportedVideoFormats.count; ++n)
{
ARVideoFormat* videoFormat = ARWorldTrackingConfiguration.supportedVideoFormats[n];
ARVideoFormat* videoFormat = supportedVideoFormats[n];

if (@available(iOS 16.0, *))
{
Expand Down Expand Up @@ -782,9 +782,9 @@ + (ARVideoFormat*)determinePreferredVideoFormat:(NSArray<ARVideoFormat *> *)supp

while (result == nullptr)
{
for (size_t n = 0; n < ARWorldTrackingConfiguration.supportedVideoFormats.count; ++n)
for (size_t n = 0; n < supportedVideoFormats.count; ++n)
{
ARVideoFormat* videoFormat = ARWorldTrackingConfiguration.supportedVideoFormats[n];
ARVideoFormat* videoFormat = supportedVideoFormats[n];

if (bestResolutionError < 0.0)
{
Expand Down

0 comments on commit e45014b

Please sign in to comment.