/// <summary> /// Developer should change the work mode to transcode or playback in order to enhance download speed /// </summary> private async void Mode() { var current = await cameraHandler.GetCameraWorkModeAsync(); var currMode = current.value?.value; if (currMode != CameraWorkMode.PLAYBACK && currMode != CameraWorkMode.TRANSCODE) { var msg = new CameraWorkModeMsg { value = CameraWorkMode.TRANSCODE }; SDKError err = await cameraHandler.SetCameraWorkModeAsync(msg); System.Diagnostics.Debug.WriteLine("Mode {0})", err.ToString()); } else { var msg = new CameraWorkModeMsg { value = CameraWorkMode.SHOOT_PHOTO }; SDKError err = await cameraHandler.SetCameraWorkModeAsync(msg); System.Diagnostics.Debug.WriteLine("Mode {0})", err.ToString()); } }
private async Task <SDKError> SetCameraWorkMode(CameraWorkMode mode) { CameraWorkModeMsg workMode = new CameraWorkModeMsg { value = mode, }; SDKError retCode = await DJISDKManager.Instance.ComponentManager.GetCameraHandler(0, 0).SetCameraWorkModeAsync(workMode); return(retCode); }
private async void SetCameraWorkMode(CameraWorkMode mode) { if (DJISDKManager.Instance.ComponentManager != null) { CameraWorkModeMsg workMode = new CameraWorkModeMsg { value = mode, }; var retCode = await DJISDKManager.Instance.ComponentManager.GetCameraHandler(0, 0).SetCameraWorkModeAsync(workMode); if (retCode != SDKError.NO_ERROR) { OutputTB.Text = "Set camera work mode to " + mode.ToString() + "failed, result code is " + retCode.ToString(); } } else { OutputTB.Text = "SDK hasn't been activated yet."; } }