Hi guys, I downloaded the sdk from https://github.com/ricohapi/theta-api2.1-ios-sdk and run the sample project. The app is able to connect to the theta camera, but I kept getting the error log like this
I just tried theta-client demo-ios with S and SC2, still got the “picture decode failed” error, looks like it only successfully decoded some live frames, the rest was failed to be decoded, so the live view is kind of stuck.
I’m not sure if this is related to what you mentioned setting the API version to 1 or v2.1. If so, could you please let me know how to set it up? since the link in the article you posted is not available.
Is there a way to disconnect from the camera using theta-client? I don’t see it in the doc
The reason for it is because my app needs to connect to the camera multiple times, after too many time connection, I got this error below, and I guess it might be because there are too many sessions?
Error Domain=KotlinException Code=0 "Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80)." UserInfo={NSLocalizedDescription=Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80)., KotlinException=com.ricoh360.thetaclient.ThetaRepository.NotConnectedException: Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80)., KotlinExceptionOrigin=}
As I’m not an expert with theta-client, I feel you’ll get the best help if you open up a GitHub issue and start a communication process directly with the RICOH engineers.
I’ll try again on iOS native with the SC2. I do not have an S.
I have an SC2 in my office and I’m in the process of installing XCode on a MacBook Air here. I’m test the SC2 after I finish setting up the company MacBook Air.
Hey Craig, as it says it supports SC, so I just test with SC and iphoneX, the image decoded issue is gone, but it still has connection problem, please see the video link. The error appears at around 1:23.
(1) In ThetaSdk.swift:
Function Theta.livePreview() has wrong callback function invoke().
(2) In TakePhotoView.swift:
When back button is tapped, getThetaInfo() is called before finishing getLivePreview().
To fix the first problem, please replace the 76th line through the 93th line of ThetaSdk.swift with following codes:
func invoke(p1: Any?) async throws -> Any? {
let now = CACurrentMediaTime()
if (now - last > Self.FrameInterval) {
var result = false
autoreleasepool {
if let frameData = p1 as? KotlinPair<KotlinByteArray, KotlinInt> {
let nsData = PlatformKt.frameFrom(
packet: frameData
)
result = handler(nsData)
}
}
last = now
return result
} else {
return true
}
}
To fix the second problem, please replace the 59th line through 61th line of TakePhotoView.swift with following codes: