- Timestamp:
- May 30, 2011 8:35:42 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/sdl_dev.c
r3537 r3577 33 33 # include "SDL_opengl.h" 34 34 # define OPENGL_DEV_IDX 1 35 #else 36 # define OPENGL_DEV_IDX -999 35 37 #endif 36 38 … … 55 57 { 56 58 #if PJ_IS_BIG_ENDIAN 57 {PJMEDIA_FORMAT_RGBA, 0, 0xFF000000, 0xFF0000, 0xFF00, 0xFF} , 58 {PJMEDIA_FORMAT_RGB24, 0, 0xFF0000, 0xFF00, 0xFF, 0} , 59 {PJMEDIA_FORMAT_BGRA, 0, 0xFF00, 0xFF0000, 0xFF000000, 0xFF} , 59 {PJMEDIA_FORMAT_RGBA, SDL_PIXELFORMAT_RGBA8888, 60 0xFF000000, 0xFF0000, 0xFF00, 0xFF} , 61 {PJMEDIA_FORMAT_RGB24, SDL_PIXELFORMAT_RGB24, 62 0xFF0000, 0xFF00, 0xFF, 0} , 63 {PJMEDIA_FORMAT_BGRA, SDL_PIXELFORMAT_BGRA8888, 64 0xFF00, 0xFF0000, 0xFF000000, 0xFF} , 60 65 #else 61 {PJMEDIA_FORMAT_RGBA, 0, 0xFF, 0xFF00, 0xFF0000, 0xFF000000} , 62 {PJMEDIA_FORMAT_RGB24, 0, 0xFF, 0xFF00, 0xFF0000, 0} , 63 {PJMEDIA_FORMAT_BGRA, 0, 0xFF0000, 0xFF00, 0xFF, 0xFF000000} , 64 #endif 65 66 {PJMEDIA_FORMAT_DIB , 0, 0xFF0000, 0xFF00, 0xFF, 0} , 66 {PJMEDIA_FORMAT_RGBA, SDL_PIXELFORMAT_ABGR8888, 67 0xFF, 0xFF00, 0xFF0000, 0xFF000000} , 68 {PJMEDIA_FORMAT_RGB24, SDL_PIXELFORMAT_BGR24, 69 0xFF, 0xFF00, 0xFF0000, 0} , 70 {PJMEDIA_FORMAT_BGRA, SDL_PIXELFORMAT_ARGB8888, 71 0xFF0000, 0xFF00, 0xFF, 0xFF000000} , 72 #endif 73 74 {PJMEDIA_FORMAT_DIB , SDL_PIXELFORMAT_RGB24, 75 0xFF0000, 0xFF00, 0xFF, 0} , 67 76 68 77 {PJMEDIA_FORMAT_YUY2, SDL_YUY2_OVERLAY, 0, 0, 0, 0} , … … 75 84 }; 76 85 86 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 87 @interface SDLDelegate: NSObject 88 { 89 @public 90 struct sdl_stream *strm; 91 } 92 93 - (void)sdl_init; 94 - (void)sdl_quit; 95 - (void)detect_new_fmt; 96 - (int)sdl_create; 97 - (void)sdl_destroy; 98 - (int)handle_event; 99 - (pj_status_t)put_frame; 100 @end 101 #endif 102 77 103 /* sdl_ device info */ 78 104 struct sdl_dev_info … … 90 116 unsigned dev_count; 91 117 struct sdl_dev_info *dev_info; 118 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 119 NSAutoreleasePool *apool; 120 SDLDelegate *delegate; 121 #endif 92 122 }; 93 94 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=095 @interface SDLDelegate: NSObject96 {97 @public98 struct sdl_stream *strm;99 }100 101 - (int)sdl_thread;102 - (int)handle_event;103 - (pj_status_t)put_frame;104 @end105 #endif106 123 107 124 /* Video stream. */ … … 120 137 pj_bool_t render_exited; 121 138 pj_status_t status; 122 139 pjmedia_format *new_fmt; 140 141 #if SDL_VERSION_ATLEAST(1,3,0) 142 SDL_Window *window; /**< Display window. */ 143 SDL_Renderer *renderer; /**< Display renderer. */ 144 SDL_Texture *scr_tex; /**< Screen texture. */ 145 int pitch; /**< Pitch value. */ 146 #endif 123 147 SDL_Rect rect; /**< Display rectangle. */ 124 148 SDL_Surface *screen; /**< Display screen. */ … … 126 150 SDL_Overlay *overlay; /**< YUV overlay. */ 127 151 #if PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL 152 #if SDL_VERSION_ATLEAST(1,3,0) 153 SDL_GLContext *gl_context; 154 #endif 128 155 GLuint texture; 129 156 void *tex_buf; … … 231 258 struct sdl_factory *sf = (struct sdl_factory*)f; 232 259 struct sdl_dev_info *ddi; 233 unsigned i; 260 unsigned i, j; 261 262 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 263 sf->apool = [[NSAutoreleasePool alloc] init]; 264 sf->delegate = [[SDLDelegate alloc] init]; 265 [sf->delegate performSelectorOnMainThread:@selector(sdl_init) 266 withObject:nil waitUntilDone:YES]; 267 #else 268 /* Initialize the SDL library */ 269 if (SDL_Init(SDL_INIT_VIDEO)) { 270 PJ_LOG(4, (THIS_FILE, "Cannot initialize SDL")); 271 return PJMEDIA_EVID_INIT; 272 } 273 #endif 234 274 235 275 sf->dev_count = 1; … … 245 285 strncpy(ddi->info.name, "SDL renderer", sizeof(ddi->info.name)); 246 286 ddi->info.name[sizeof(ddi->info.name)-1] = '\0'; 247 strncpy(ddi->info.driver, "SDL", sizeof(ddi->info.driver));248 ddi->info.driver[sizeof(ddi->info.driver)-1] = '\0';249 ddi->info.dir = PJMEDIA_DIR_RENDER;250 ddi->info.has_callback = PJ_FALSE;251 ddi->info.caps = PJMEDIA_VID_DEV_CAP_FORMAT |252 PJMEDIA_VID_DEV_CAP_OUTPUT_RESIZE;253 254 287 ddi->info.fmt_cnt = PJ_ARRAY_SIZE(sdl_fmts); 255 ddi->info.fmt = (pjmedia_format*)256 pj_pool_calloc(sf->pool, ddi->info.fmt_cnt,257 sizeof(pjmedia_format));258 for (i = 0; i < ddi->info.fmt_cnt; i++) {259 pjmedia_format *fmt = &ddi->info.fmt[i];260 pjmedia_format_init_video(fmt, sdl_fmts[i].fmt_id,261 DEFAULT_WIDTH, DEFAULT_HEIGHT,262 DEFAULT_FPS, 1);263 }264 288 265 289 #if PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL … … 268 292 strncpy(ddi->info.name, "SDL openGL renderer", sizeof(ddi->info.name)); 269 293 ddi->info.name[sizeof(ddi->info.name)-1] = '\0'; 270 strncpy(ddi->info.driver, "SDL", sizeof(ddi->info.driver));271 ddi->info.driver[sizeof(ddi->info.driver)-1] = '\0';272 ddi->info.dir = PJMEDIA_DIR_RENDER;273 ddi->info.has_callback = PJ_FALSE;274 ddi->info.caps = PJMEDIA_VID_DEV_CAP_FORMAT;275 276 ddi->info.fmt_cnt = PJ_ARRAY_SIZE(sdl_fmts);277 294 ddi->info.fmt_cnt = 1; 278 ddi->info.fmt = (pjmedia_format*) 279 pj_pool_calloc(sf->pool, ddi->info.fmt_cnt, 280 sizeof(pjmedia_format)); 281 for (i = 0; i < ddi->info.fmt_cnt; i++) { 282 pjmedia_format *fmt = &ddi->info.fmt[i]; 283 pjmedia_format_init_video(fmt, sdl_fmts[i].fmt_id, 284 DEFAULT_WIDTH, DEFAULT_HEIGHT, 285 DEFAULT_FPS, 1); 286 } 287 #endif 295 #endif 296 297 for (i = 0; i < sf->dev_count; i++) { 298 ddi = &sf->dev_info[i]; 299 strncpy(ddi->info.driver, "SDL", sizeof(ddi->info.driver)); 300 ddi->info.driver[sizeof(ddi->info.driver)-1] = '\0'; 301 ddi->info.dir = PJMEDIA_DIR_RENDER; 302 ddi->info.has_callback = PJ_FALSE; 303 ddi->info.caps = PJMEDIA_VID_DEV_CAP_FORMAT | 304 PJMEDIA_VID_DEV_CAP_OUTPUT_RESIZE; 305 #if SDL_VERSION_ATLEAST(1,3,0) 306 ddi->info.caps |= PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW; 307 #endif 308 309 ddi->info.fmt = (pjmedia_format*) 310 pj_pool_calloc(sf->pool, ddi->info.fmt_cnt, 311 sizeof(pjmedia_format)); 312 for (j = 0; j < ddi->info.fmt_cnt; j++) { 313 pjmedia_format *fmt = &ddi->info.fmt[j]; 314 pjmedia_format_init_video(fmt, sdl_fmts[j].fmt_id, 315 DEFAULT_WIDTH, DEFAULT_HEIGHT, 316 DEFAULT_FPS, 1); 317 } 318 } 288 319 289 320 PJ_LOG(4, (THIS_FILE, "SDL initialized")); … … 300 331 sf->pool = NULL; 301 332 pj_pool_release(pool); 333 334 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 335 [sf->delegate performSelectorOnMainThread:@selector(sdl_quit) 336 withObject:nil waitUntilDone:YES]; 337 [sf->delegate release]; 338 [sf->apool release]; 339 #else 340 SDL_Quit(); 341 #endif 302 342 303 343 return PJ_SUCCESS; … … 378 418 } 379 419 380 static void destroy_sdl(struct sdl_stream *strm )420 static void destroy_sdl(struct sdl_stream *strm, pj_bool_t destroy_win) 381 421 { 382 422 if (strm->surf) { … … 393 433 strm->texture = 0; 394 434 } 435 #endif 436 #if SDL_VERSION_ATLEAST(1,3,0) 437 #if PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL 438 if (strm->gl_context) { 439 SDL_GL_DeleteContext(strm->gl_context); 440 strm->gl_context = NULL; 441 } 442 #endif 443 if (strm->scr_tex) { 444 SDL_DestroyTexture(strm->scr_tex); 445 strm->scr_tex = NULL; 446 } 447 if (strm->renderer) { 448 SDL_DestroyRenderer(strm->renderer); 449 strm->renderer = NULL; 450 } 451 #ifndef __IPHONEOS__ 452 if (destroy_win) { 453 if (strm->window && 454 !(strm->param.flags & PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW)) 455 { 456 SDL_DestroyWindow(strm->window); 457 } 458 strm->window = NULL; 459 } 460 #endif 395 461 #endif 396 462 } … … 417 483 strm->rect.h = (Uint16)vfd->size.h; 418 484 485 destroy_sdl(strm, PJ_FALSE); 486 487 #if SDL_VERSION_ATLEAST(1,3,0) 488 if (!strm->window) { 489 Uint32 flags = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE; 490 491 if (strm->param.rend_id == OPENGL_DEV_IDX) 492 flags |= SDL_WINDOW_OPENGL; 493 494 if (strm->param.flags & PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW) { 495 /* Use the window supplied by the application. */ 496 strm->window = SDL_CreateWindowFrom(strm->param.window); 497 } else { 498 /* Create the window where we will draw. */ 499 strm->window = SDL_CreateWindow("pjmedia-SDL video", 500 SDL_WINDOWPOS_CENTERED, 501 SDL_WINDOWPOS_CENTERED, 502 strm->rect.w, strm->rect.h, 503 flags); 504 } 505 if (!strm->window) 506 return PJMEDIA_EVID_SYSERR; 507 } 508 509 SDL_SetWindowSize(strm->window, strm->rect.w, strm->rect.h); 510 511 /** 512 * We must call SDL_CreateRenderer in order for draw calls to 513 * affect this window. 514 */ 515 strm->renderer = SDL_CreateRenderer(strm->window, -1, 0); 516 if (!strm->renderer) 517 return PJMEDIA_EVID_SYSERR; 518 519 #if PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL 520 if (strm->param.rend_id == OPENGL_DEV_IDX) { 521 strm->gl_context = SDL_GL_CreateContext(strm->window); 522 if (!strm->gl_context) 523 return PJMEDIA_EVID_SYSERR; 524 SDL_GL_MakeCurrent(strm->window, strm->gl_context); 525 } 526 #endif 527 528 strm->screen = SDL_GetWindowSurface(strm->window); 529 530 #else 531 419 532 /* Initialize the display */ 420 533 strm->screen = SDL_SetVideoMode(strm->rect.w, strm->rect.h, 0, ( 421 534 #if PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL 422 535 strm->param.rend_id == OPENGL_DEV_IDX? 423 SDL_OPENGL :536 SDL_OPENGL | SDL_RESIZABLE: 424 537 #endif 425 538 SDL_RESIZABLE | SDL_SWSURFACE)); … … 429 542 SDL_WM_SetCaption("pjmedia-SDL video", NULL); 430 543 431 destroy_sdl(strm); 544 #endif 432 545 433 546 #if PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL … … 453 566 glGenTextures(1, &strm->texture); 454 567 568 if (!strm->texture) 569 return PJMEDIA_EVID_SYSERR; 570 455 571 #if defined(PJ_WIN32) && PJ_WIN32 != 0 456 572 /** … … 466 582 } else 467 583 #endif 584 #if SDL_VERSION_ATLEAST(1,3,0) 585 { 586 strm->scr_tex = SDL_CreateTexture(strm->renderer, sdl_info->sdl_format, 587 SDL_TEXTUREACCESS_STREAMING, 588 strm->rect.w, strm->rect.h); 589 if (strm->scr_tex == NULL) 590 return PJMEDIA_EVID_SYSERR; 591 592 strm->pitch = strm->rect.w * SDL_BYTESPERPIXEL(sdl_info->sdl_format); 593 } 594 #else 468 595 if (vfi->color_model == PJMEDIA_COLOR_MODEL_RGB) { 469 596 strm->surf = SDL_CreateRGBSurface(SDL_SWSURFACE, … … 483 610 return PJMEDIA_EVID_SYSERR; 484 611 } 612 #endif 485 613 486 614 return PJ_SUCCESS; 487 615 } 488 616 617 static void detect_fmt_change(struct sdl_stream *strm) 618 { 619 if (strm->new_fmt) { 620 /* Stop the stream */ 621 sdl_stream_stop((pjmedia_vid_dev_stream *)strm); 622 623 /* Re-initialize SDL */ 624 strm->status = init_sdl(strm, strm->new_fmt); 625 626 if (strm->status == PJ_SUCCESS) { 627 pjmedia_format_copy(&strm->param.fmt, strm->new_fmt); 628 /* Restart the stream */ 629 sdl_stream_start((pjmedia_vid_dev_stream *)strm); 630 } 631 strm->new_fmt = NULL; 632 } 633 } 634 489 635 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 490 636 @implementation SDLDelegate 491 - (int)sdl_thread 637 - (void)sdl_init 638 { 639 if (SDL_Init(SDL_INIT_VIDEO)) { 640 PJ_LOG(4, (THIS_FILE, "Cannot initialize SDL")); 641 } 642 } 643 644 - (void)sdl_quit 645 { 646 SDL_Quit(); 647 } 648 649 - (void)detect_new_fmt 650 { 651 detect_fmt_change(strm); 652 } 653 654 - (int)sdl_create 492 655 { 493 656 #else … … 496 659 struct sdl_stream *strm = (struct sdl_stream*)data; 497 660 #endif 498 499 /* Initialize the SDL library */500 if (SDL_Init(SDL_INIT_VIDEO)) {501 PJ_LOG(4, (THIS_FILE, "Cannot initialize SDL"));502 strm->status = PJMEDIA_EVID_INIT;503 goto on_return;504 }505 661 506 662 #if PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL … … 517 673 on_return: 518 674 if (strm->status != PJ_SUCCESS) { 519 destroy_sdl(strm); 520 SDL_Quit(); 675 destroy_sdl(strm, PJ_TRUE); 521 676 strm->screen = NULL; 522 677 } … … 524 679 return strm->status; 525 680 } 681 682 - (void)sdl_destroy 683 { 684 destroy_sdl(strm, PJ_TRUE); 685 } 526 686 527 687 - (int)handle_event … … 547 707 #endif 548 708 #endif 709 710 detect_fmt_change(strm); 711 549 712 /** 550 713 * The event polling must be placed in the same thread that … … 556 719 557 720 switch(sevent.type) { 558 case SDL_USEREVENT:559 {560 pjmedia_format *fmt;561 562 if (sevent.user.code == PJMEDIA_EVENT_NONE) {563 strm->is_quitting = PJ_TRUE;564 goto on_return;565 }566 567 pj_assert(sevent.user.code == PJMEDIA_VID_DEV_CAP_FORMAT);568 569 fmt = (pjmedia_format *)sevent.user.data1;570 571 /* Stop the stream */572 sdl_stream_stop((pjmedia_vid_dev_stream *)strm);573 574 /* Re-initialize SDL */575 strm->status = init_sdl(strm, fmt);576 577 if (strm->status == PJ_SUCCESS) {578 pjmedia_format_copy(&strm->param.fmt, fmt);579 /* Restart the stream */580 sdl_stream_start((pjmedia_vid_dev_stream *)strm);581 }582 583 break;584 }585 586 721 case SDL_MOUSEBUTTONDOWN: 587 722 pevent.event_type = PJMEDIA_EVENT_MOUSEBUTTONDOWN; … … 670 805 #endif 671 806 on_return: 672 destroy_sdl(strm); 673 SDL_Quit(); 807 destroy_sdl(strm, PJ_TRUE); 674 808 strm->screen = NULL; 675 809 … … 693 827 glTexCoord2f(1, 1); glVertex2i(stream->rect.w, stream->rect.h); 694 828 glEnd(); 829 #if SDL_VERSION_ATLEAST(1,3,0) 830 SDL_GL_SwapWindow(stream->window); 831 #else 695 832 SDL_GL_SwapBuffers(); 833 #endif 696 834 } 697 835 } … … 736 874 } 737 875 SDL_BlitSurface(stream->surf, NULL, stream->screen, NULL); 738 SDL_UpdateRect(stream->screen, 0, 0, 0, 0); 876 #if SDL_VERSION_ATLEAST(1,3,0) 877 SDL_UpdateWindowSurface(stream->window); 878 #else 879 SDL_UpdateRect(stream->screen, 0, 0, 0, 0); 880 #endif 739 881 } else if (stream->overlay) { 740 882 int i, sz, offset; … … 756 898 SDL_DisplayYUVOverlay(stream->overlay, &stream->rect); 757 899 } 900 #if SDL_VERSION_ATLEAST(1,3,0) 901 else if (stream->scr_tex) { 902 SDL_UpdateTexture(stream->scr_tex, NULL, frame->buf, stream->pitch); 903 SDL_RenderClear(stream->renderer); 904 SDL_RenderCopy(stream->renderer, stream->scr_tex, NULL, NULL); 905 SDL_RenderPresent(stream->renderer); 906 } 907 #endif 758 908 #if PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL 759 909 else if (stream->param.rend_id == OPENGL_DEV_IDX) { … … 778 928 stream->frame = frame; 779 929 [stream->delegate performSelectorOnMainThread:@selector(put_frame) 780 930 withObject:nil waitUntilDone:YES]; 781 931 782 932 return PJ_SUCCESS; … … 828 978 strm->status = PJ_SUCCESS; 829 979 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 830 pj_assert(![NSThread isMainThread]);831 980 strm->apool = [[NSAutoreleasePool alloc] init]; 832 981 strm->delegate = [[SDLDelegate alloc]init]; 833 982 strm->delegate->strm = strm; 834 /* On Mac OS X, we need to call SDL functions in the main thread */835 [strm->delegate performSelectorOnMainThread:@selector(sdl_ thread)983 /* On Darwin OS, we need to call SDL functions in the main thread */ 984 [strm->delegate performSelectorOnMainThread:@selector(sdl_create) 836 985 withObject:nil waitUntilDone:YES]; 837 986 if ((status = strm->status) != PJ_SUCCESS) { … … 847 996 848 997 while(strm->status == PJ_SUCCESS && !strm->surf && !strm->overlay 998 #if SDL_VERSION_ATLEAST(1,3,0) 999 && !strm->scr_tex 1000 #endif 849 1001 #if PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL 850 1002 && !strm->texture … … 939 1091 return PJ_SUCCESS; 940 1092 } else if (cap == PJMEDIA_VID_DEV_CAP_FORMAT) { 941 SDL_Event sevent; 942 943 strm->status = PJ_TRUE; 944 sevent.type = SDL_USEREVENT; 945 sevent.user.code = PJMEDIA_VID_DEV_CAP_FORMAT; 946 sevent.user.data1 = (void *)pval; 947 SDL_PushEvent(&sevent); 948 949 while (strm->status == PJ_TRUE) 1093 strm->new_fmt = (pjmedia_format *)pval; 1094 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 1095 [strm->delegate performSelectorOnMainThread:@selector(detect_new_fmt) 1096 withObject:nil waitUntilDone:YES]; 1097 #endif 1098 while (strm->new_fmt) 950 1099 pj_thread_sleep(10); 951 1100 … … 957 1106 * to its original format. 958 1107 */ 959 strm->status = PJ_TRUE; 960 sevent.user.data1 = &strm->param.fmt; 961 SDL_PushEvent(&sevent); 962 963 while (strm->status == PJ_TRUE) 1108 strm->new_fmt = &strm->param.fmt; 1109 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 1110 [strm->delegate performSelectorOnMainThread:@selector(detect_new_fmt) 1111 withObject:nil waitUntilDone:YES]; 1112 #endif 1113 while (strm->new_fmt) 964 1114 pj_thread_sleep(10); 965 1115 … … 1004 1154 /* Wait for renderer put_frame() to finish */ 1005 1155 stream->is_running = PJ_FALSE; 1006 for (i=0; !stream->render_exited && i<100; ++i) 1156 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 1157 if (![NSThread isMainThread]) 1158 #endif 1159 for (i=0; !stream->render_exited && i<50; ++i) 1007 1160 pj_thread_sleep(10); 1008 1161 … … 1015 1168 { 1016 1169 struct sdl_stream *stream = (struct sdl_stream*)strm; 1017 SDL_Event sevent;1018 1170 1019 1171 PJ_ASSERT_RETURN(stream != NULL, PJ_EINVAL); … … 1022 1174 1023 1175 if (!stream->is_quitting) { 1024 sevent.type = SDL_USEREVENT; 1025 sevent.user.code = PJMEDIA_EVENT_NONE; 1026 SDL_PushEvent(&sevent); 1176 stream->is_quitting = PJ_TRUE; 1027 1177 if (stream->sdl_thread) 1028 1178 pj_thread_join(stream->sdl_thread); … … 1030 1180 1031 1181 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 1032 if (stream->delegate) 1182 if (stream->delegate) { 1183 [stream->delegate performSelectorOnMainThread:@selector(sdl_destroy) 1184 withObject:nil waitUntilDone:YES]; 1033 1185 [stream->delegate release]; 1034 if (stream->apool) 1186 stream->delegate = NULL; 1187 } 1188 if (stream->apool) { 1035 1189 [stream->apool release]; 1190 stream->apool = NULL; 1191 } 1036 1192 #endif 1037 1193 pj_pool_release(stream->pool);
Note: See TracChangeset
for help on using the changeset viewer.