- Timestamp:
- Aug 23, 2018 4:48:03 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-videodev/darwin_dev.m
r5628 r5867 142 142 AVCaptureSession *cap_session; 143 143 AVCaptureDeviceInput *dev_input; 144 pj_bool_t has_image; 144 145 AVCaptureVideoDataOutput *video_output; 145 146 VOutDelegate *vout_delegate; … … 547 548 548 549 [stream->frame_lock lock]; 550 stream->has_image = PJ_TRUE; 549 551 550 552 if (stream->is_planar && stream->capture_buf) { … … 569 571 570 572 p = (pj_uint8_t*)CVPixelBufferGetBaseAddressOfPlane(img, 0); 573 571 574 p_len = stream->vid_size.w * stream->vid_size.h; 572 575 Y = (pj_uint8_t*)stream->capture_buf; … … 630 633 { 631 634 struct darwin_stream *stream = (struct darwin_stream *)strm; 635 636 if (!stream->has_image) { 637 frame->size = 0; 638 frame->type = PJMEDIA_FRAME_TYPE_NONE; 639 frame->timestamp.u64 = stream->frame_ts.u64; 640 return PJMEDIA_EVID_NOTREADY; 641 } 632 642 633 643 frame->type = PJMEDIA_FRAME_TYPE_VIDEO; … … 1303 1313 [stream->cap_session stopRunning]; 1304 1314 }); 1315 stream->has_image = PJ_FALSE; 1305 1316 1306 1317 return PJ_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.