<div class="quote"><blockquote><font size="2"><a class="nopicture" rel="noopener" href="https://bbs.dji.com/forum.php?mod=redirect&goto=findpost&pid=147191&ptid=12497" target="_blank"><font color="#999999">DJI-SDK 发表于 2015-6-5 17:53</font></a></font>
您好,请问您是在调用这个设置相机工作模式的函数的时候出现错误,还是在点击开始录像的时候出现错误。请 ...</blockquote></div>在点击录像的时候,不报错,但是也不录像,是什么原因?
代码附上:<font color="#3495af"><font face="Menlo"><font style="font-size:19px">DJIInspireCamera</font></font></font><font style="color:rgb(0, 0, 0)"><font face="Menlo"><font style="font-size:19px">* inspireCamera = (</font></font></font><font color="#3495af"><font face="Menlo"><font style="font-size:19px">DJIInspireCamera</font></font></font><font style="color:rgb(0, 0, 0)"><font face="Menlo"><font style="font-size:19px">*)</font></font></font><font color="#3495af"><font face="Menlo"><font style="font-size:19px">_camera</font></font></font><font style="color:rgb(0, 0, 0)"><font face="Menlo"><font style="font-size:19px">;</font></font></font>
<div align="left"><font face="Menlo"><font style="font-size:19px"> if(self.isSubItem) {</font></font></div><div align="left"><font style="color:rgb(52, 149, 175)"><font face="Menlo"><font style="font-size:19px"> CameraWorkMode workMode = CameraWorkModeRecord;</font></font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> NSValue* itemValue = self.itemValue;</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> [itemValue getValue:&workMode];</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> [inspireCamera setCameraWorkMode:workMode withResult:^(DJIError *error){</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> if (error.errorCode == ERR_Successed){</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> NSLog(@"Set Work Mode Success");</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> }</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> else</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> {</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> NSLog(@"Set Work Mode Failed");</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> }</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> }];</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> }else{</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> [inspireCamera getCameraWorkModeWithResult:^(CameraWorkMode workMode, DJIError *error) {</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> if (error.errorCode == ERR_Successed) {</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> int index = (int)workMode;</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> PhotoRightView* item = [self.subSettings objectAtIndex:index];</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> [self setCheckmarkForItem:item];</font></font></div><div align="left"><font style="color:rgb(0, 143, 0)"><font face="Menlo"><font style="font-size:19px">// _selectedItem = item;</font></font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> }</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> }];</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> }</font></font></div><div align="left"><font style="color:rgb(52, 149, 175)"><font face="Menlo"><font style="font-size:19px"> if (mCameraSystemState.workMode != CameraWorkModeRecord) {</font></font></font></div><div align="left"><font style="color:rgb(180, 38, 26)"><font face="Menlo"><font style="font-size:19px"> ShowResult(@"Camera work mode error, please switch to Record mode.");</font></font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> return;</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> }</font></font></div><div align="left"><font style="color:rgb(52, 149, 175)"><font face="Menlo"><font style="font-size:19px"> if (mCameraSystemState.isRecording) {</font></font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> [_drone.camera stopRecord:^(DJIError *error) {</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> ShowResult(@"Stop Recording:%@", error.errorDeion);</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> }];</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> }</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> else</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> {</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> [_drone.camera startRecord:^(DJIError *error) {</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> ShowResult(@"Start Recording:%@", error.errorDeion);</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> }];</font></font></div><div align="left"><font face="Menlo"><font style="font-size:19px"> }</font></font></div>
|