Search the Community
Showing results for tags 'cameraremotesdk'.
-
#include <iostream> #include <iomanip> #include "../CRSDK/CameraRemote_SDK.h" #include "Text.hpp" int main(int argc, const char * argv[]) { auto init_success = SCRSDK::Init(); if (!init_success) { SDKTest::tout << "Failed to initialize Remote SDK. Terminating.\n"; // cr_lib->Release(); SCRSDK::Release(); std::exit(EXIT_FAILURE); } SDKTest::tout << "SDK successuflly initialized. \n\n"; CrInt32u version = SCRSDK::GetSDKVersion(); int major = (version & 0xFF000000) >> 24; int minor = (version & 0x00FF0000) >> 16; int patch = (version & 0x0000FF00) >> 8; SDKTest::tout << "Remote SDK version: "; SDKTest::tout << major << "." << minor << "." << std::setfill(TEXT('0')) << std::setw(2) << patch << "\n"; SCRSDK::ICrEnumCameraObjectInfo* camera_list = nullptr; auto enum_status = SCRSDK::EnumCameraObjects(&camera_list); if (CR_FAILED(enum_status) || camera_list == nullptr) { SDKTest::tout << "Current Status: " << enum_status << "\n"; SDKTest::tout << "No cameras detected. Connect a camera and retry.\n"; // cr_lib->Release(); SCRSDK::Release(); std::exit(EXIT_FAILURE); } SDKTest::tout << "Current Status:" << enum_status << "\n"; SCRSDK::Release(); } The above is my code for testing SONY CameraRemote SDK 1.3.0 using A7R4, and "Text.hpp" is from the source code in official sample app of CameraRemoteSDK, and my problem is when the camera is not connected, SCRSDK::EnumCameraObjects returns 0 which means CrError_None and this is OK, however when I connected my A7R4, it returns Error 1, but in the definition of CrError.h there is no error or warning code 1, and the sample app works normally, could anyone help with my problem? Thanks in advance!