CMSampleBufferRef from frameAvailable has wrong PresentationTime on only MacOS

Hello. @jelena @Zak

Im facing issue that CMSampleBufferRef from frameAvailable has wrong PresentationTime on only MacOS.

It works fine on iOS

I call processFrame 15 times per 1 sec (15fps camera frame)
it will have 0.06xxx gap time.

#if TARGET_OS_IPHONE
//iOS
[_deepAR processFrame:pixelBufferRef mirror:NO];
#else
//Mac
[_deepAR processFrame:pixelBufferRef mirror:NO orientation:0];
#endif

and then called frameAvailable

  • (void)frameAvailable:(CMSampleBufferRef)sampleBuffer
    {
    Float64 time = CMTimeGetSeconds(CMSampleBufferGetPresentationTimeStamp(sampleBuffer));
    NSLog(@“daniel time %f”, time);
    }

in case of iOS,
timestamp is uniformly incremented by 0.06xx.

2023-06-08 14:24:10.025495+0900 VoxTester[1268:133552] daniel time 73241.717466
2023-06-08 14:24:10.096120+0900 VoxTester[1268:133552] daniel time 73241.785093
2023-06-08 14:24:10.161399+0900 VoxTester[1268:133552] daniel time 73241.851839
2023-06-08 14:24:10.226390+0900 VoxTester[1268:133552] daniel time 73241.917760
2023-06-08 14:24:10.296743+0900 VoxTester[1268:133552] daniel time 73241.985169
2023-06-08 14:24:10.361463+0900 VoxTester[1268:133552] daniel time 73242.051850
2023-06-08 14:24:10.430925+0900 VoxTester[1268:133552] daniel time 73242.118535
2023-06-08 14:24:10.497525+0900 VoxTester[1268:133552] daniel time 73242.185068
2023-06-08 14:24:10.562688+0900 VoxTester[1268:133552] daniel time 73242.251562
2023-06-08 14:24:10.628559+0900 VoxTester[1268:133552] daniel time 73242.318308
2023-06-08 14:24:10.694348+0900 VoxTester[1268:133552] daniel time 73242.384630
2023-06-08 14:24:10.760604+0900 VoxTester[1268:133552] daniel time 73242.451096
2023-06-08 14:24:10.830081+0900 VoxTester[1268:133552] daniel time 73242.518417
2023-06-08 14:24:10.894480+0900 VoxTester[1268:133552] daniel time 73242.584962
2023-06-08 14:24:10.963515+0900 VoxTester[1268:133552] daniel time 73242.651509

but macOS case
timestamp is uniformly incremented by 0.00006xxxx. it’s very small gap

2023-06-08 14:25:41.053736+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941040
2023-06-08 14:25:41.129664+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941107
2023-06-08 14:25:41.186480+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941175
2023-06-08 14:25:41.265192+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941238
2023-06-08 14:25:41.319194+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941306
2023-06-08 14:25:41.391354+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941373
2023-06-08 14:25:41.448202+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941437
2023-06-08 14:25:41.517733+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941507
2023-06-08 14:25:41.581989+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941572
2023-06-08 14:25:41.653803+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941642
2023-06-08 14:25:41.715090+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941703
2023-06-08 14:25:41.785293+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941772
2023-06-08 14:25:41.850129+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941838
2023-06-08 14:25:41.915822+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941904
2023-06-08 14:25:41.983228+0900 VoxTesterMOS[13162:16477957] daniel time 1686201.941972

please let me know why presentation gap is very small only macos