- Timestamp:
- Sep 16, 2011 2:32:12 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-videodev/ios_dev.m
r3715 r3750 93 93 UIImageView *imgView; 94 94 void *buf; 95 dispatch_queue_t render_queue; 95 96 96 97 pj_timestamp frame_ts; … … 334 335 CGImageRelease(quartzImage); 335 336 337 dispatch_async(dispatch_get_main_queue(), 338 ^{[stream->imgView setImage:image];}); 339 /* 336 340 [stream->imgView performSelectorOnMainThread:@selector(setImage:) 337 341 withObject:image waitUntilDone:NO]; 342 */ 338 343 339 344 [pool release]; … … 507 512 strm->vout_delegate->stream = strm; 508 513 } 514 515 strm->render_queue = dispatch_queue_create("com.pjsip.render_queue", 516 NULL); 517 if (!strm->render_queue) 518 goto on_error; 509 519 510 520 strm->buf = pj_pool_alloc(pool, strm->frame_size); … … 596 606 PJ_UNUSED_ARG(stream); 597 607 598 PJ_LOG(4, (THIS_FILE, "Starting qtvideo stream"));608 PJ_LOG(4, (THIS_FILE, "Starting ios video stream")); 599 609 600 610 if (stream->cap_session) { … … 619 629 pj_memcpy(stream->buf, frame->buf, frame->size); 620 630 /* Perform video display in a background thread */ 621 // [stream->vout_delegate update_image]; 631 /* 632 [stream->vout_delegate update_image]; 622 633 [NSThread detachNewThreadSelector:@selector(update_image) 623 634 toTarget:stream->vout_delegate withObject:nil]; 635 */ 636 dispatch_async(stream->render_queue, 637 ^{[stream->vout_delegate update_image];}); 624 638 625 639 [pool release]; … … 635 649 PJ_UNUSED_ARG(stream); 636 650 637 PJ_LOG(4, (THIS_FILE, "Stopping qtvideo stream"));651 PJ_LOG(4, (THIS_FILE, "Stopping ios video stream")); 638 652 639 653 if (stream->cap_session && [stream->cap_session isRunning]) … … 677 691 } 678 692 */ 693 if (stream->render_queue) { 694 dispatch_release(stream->render_queue); 695 stream->render_queue = NULL; 696 } 679 697 680 698 pj_pool_release(stream->pool);
Note: See TracChangeset
for help on using the changeset viewer.