iphone - How to display a PBFrame in iOS -


i working on app uses live stream ip camera(pnp ip/network camera manufactured v star). when connected using api provided frame o/p pbframes. having trouble displaying them. have been through please help. in advance

void *thread_receivevideo(void *arg) { nslog(@"[thread_receivevideo] starting...");  int avindex = *(int *)arg; char *buf = malloc(video_buf_size); unsigned int frmno; int ret; frameinfo_t frameinfo;  while (1)  {     ret = avrecvframedata(avindex, buf, video_buf_size, (char *)&frameinfo, sizeof(frameinfo_t), &frmno);      if(ret == av_er_data_noready)     {         usleep(30000);         continue;     }     else if(ret == av_er_losed_this_frame)     {         nslog(@"lost video frame no[%d]", frmno);         continue;     }     else if(ret == av_er_incomplete_frame)     {         nslog(@"incomplete video frame no[%d]", frmno);         nslog(@" biffer : %lu",sizeof(buf));           continue;     }     else if(ret == av_er_session_close_by_remote)     {         nslog(@"[thread_receivevideo] av_er_session_close_by_remote");         break;     }     else if(ret == av_er_remote_timeout_disconnect)     {         nslog(@"[thread_receivevideo] av_er_remote_timeout_disconnect");         break;     }     else if(ret == iotc_er_invalid_sid)     {         nslog(@"[thread_receivevideo] session cant used anymore");         break;     }       nslog(@"fram info flag :%hhu ",frameinfo.flags); if(frameinfo.flags == ipc_frame_flag_pbframe)     {         // got pbframe, draw it.         nslog(@"got video iframe display");       //  nsstring *iframestring = [nsstring stringwithutf8string:buf];         printf("correclty recieved frame  %s",buf);     //                                          } } free(buf); nslog(@"[thread_receivevideo] thread exit");     return 0;    } 


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -