Post

Replies

Boosts

Views

Activity

Why isReadyForMoreMediaData is false sometimes?
Hi, Recording Videos with AVAssetWriter, capture fps(camera output fps) is ok, but final result video fps was lower, the reason is AVAssetWriterInput.isReadyForMoreMediaData is false sometimes. Yes, I have read document many times, it said need to set expectsMediaDataInRealTime to true and balabala... I really be tortured by this problem for a long time, can I debug this problem? or any advice?
2
0
651
Sep ’24
why does tripple camera take photo faster than single camera device?
I found this phenomenon, and it can be reproduced stably. If I use a triple-camera to take a photo, if the picture is moving, or I move the phone, let's assume it moves horizontally, when I aim at an object, I press the shutter, which is called time T. At this time, the picture in the viewfinder is T0, and the photo produced is about T+100ms. If I use a single-camera to take a photo, use the same speed to move the phone to move the picture, and press the shutter when aiming at the same object, the photo produced is about T+400ms later. Let me describe the problem I encountered in another way. Suppose a pile of cards are placed horizontally on the table, and the cards are written with numbers from left to right, 0,1,2,3,4,5,6... Now aim the camera at the number 0, and then move to the right at a uniform speed. The numbers pass through the camera's viewfinder and continue to increase. When aiming at the number 5, press the shutter. If it is a triple-camera, the photo obtained will probably show 6, while if it is taken with a single-camera, the photo obtained will be about 9. This means the triple camera can capture photos faster, but why is this the case? Any explanation?
2
0
509
Dec ’24
ControlWidget can't open APP
My custom control widget is show up and I can set it to Lock Screen, but it doesn't launch my app when I clicked it. any problem? in A.swift file, code like below: @available(iOS 18.0, *) struct LockScreenAppLaunchWidget: ControlWidget { var body: some ControlWidgetConfiguration { StaticControlConfiguration(kind: "abc") { ControlWidgetButton(action: LaunchAppIntent()) { // <-- HERE Label("Something", systemImage: "arrow.up") } } .displayName("Open app") } } @available(iOS 18, *) struct LaunchAppIntent: AppIntent { static var title: LocalizedStringResource = "ABC" static var description: IntentDescription? = "abcd" static var openAppWhenRun: Bool = true @MainActor func perform() async throws -> some IntentResult & OpensIntent { return .result() } }
2
1
639
Sep ’24
take raw photo, photoOutput error: Domain=AVFoundationErrorDomain Code=-11800, Domain=NSOSStatusErrorDomain Code=-16415
Error Domain=AVFoundationErrorDomain Code=-11800 "这项操作无法完成" UserInfo={NSUnderlyingError=0x1102b4940 {Error Domain=NSOSStatusErrorDomain Code=-16415 "(null)"}, NSLocalizedFailureReason=发生未知错误(-16415), AVErrorRecordingFailureDomainKey=4, NSLocalizedDescription=这项操作无法完成}
3
2
1.9k
Nov ’22