node-mac-recorder 2.21.39 → 2.21.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/camera_recorder.mm +4 -18
package/package.json
CHANGED
package/src/camera_recorder.mm
CHANGED
|
@@ -922,15 +922,9 @@ static BOOL MRIsContinuityCamera(AVCaptureDevice *device) {
|
|
|
922
922
|
if (CMTIME_IS_VALID(baseline)) {
|
|
923
923
|
frameSeconds = CMTimeGetSeconds(CMTimeSubtract(bufferTime, baseline));
|
|
924
924
|
}
|
|
925
|
-
//
|
|
925
|
+
// Do NOT extend camera stop limit by audio start offset.
|
|
926
|
+
// Clamping to the same stopLimit as audio ensures durations match.
|
|
926
927
|
double effectiveStopLimit = stopLimit;
|
|
927
|
-
if (hasAudioStart && CMTIME_IS_VALID(baseline)) {
|
|
928
|
-
CMTime startDeltaTime = CMTimeSubtract(baseline, audioStart);
|
|
929
|
-
double startDelta = CMTimeGetSeconds(startDeltaTime);
|
|
930
|
-
if (startDelta > 0) {
|
|
931
|
-
effectiveStopLimit += startDelta;
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
928
|
double tolerance = self.expectedFrameRate > 0 ? (1.5 / self.expectedFrameRate) : 0.02;
|
|
935
929
|
if (tolerance < 0.02) {
|
|
936
930
|
tolerance = 0.02;
|
|
@@ -1022,16 +1016,8 @@ static BOOL MRIsContinuityCamera(AVCaptureDevice *device) {
|
|
|
1022
1016
|
|
|
1023
1017
|
double stopLimit = MRSyncGetStopLimitSeconds();
|
|
1024
1018
|
if (stopLimit > 0) {
|
|
1025
|
-
//
|
|
1026
|
-
|
|
1027
|
-
if (CMTIME_IS_VALID(audioStartTS) && CMTIME_IS_VALID(self.firstSampleTime)) {
|
|
1028
|
-
CMTime startDeltaTS = CMTimeSubtract(self.firstSampleTime, audioStartTS);
|
|
1029
|
-
double startDelta = CMTimeGetSeconds(startDeltaTS);
|
|
1030
|
-
if (startDelta > 0) {
|
|
1031
|
-
stopLimit += startDelta;
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1019
|
+
// Do NOT extend camera stop limit by audio start offset.
|
|
1020
|
+
// Using the same stopLimit as audio keeps durations aligned.
|
|
1035
1021
|
double frameSeconds = CMTimeGetSeconds(relativeTimestamp);
|
|
1036
1022
|
double tolerance = self.expectedFrameRate > 0 ? (1.5 / self.expectedFrameRate) : 0.02;
|
|
1037
1023
|
if (tolerance < 0.02) {
|