- Timestamp:
- Mar 19, 2011 5:33:21 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/ios_dev.m
r3459 r3467 74 74 struct ios_stream 75 75 { 76 pjmedia_vid_ stream base; /**< Base stream*/77 pjmedia_vid_param param;/**< Settings */78 pj_pool_t *pool; /**< Memory pool.*/79 80 pjmedia_vid_cb vid_cb; /**< Stream callback.*/81 void *user_data; /**< Application data.*/82 83 pjmedia_rect_size size;84 pj_uint8_t bpp;85 unsigned bytes_per_row;86 unsigned frame_size;76 pjmedia_vid_dev_stream base; /**< Base stream */ 77 pjmedia_vid_param param; /**< Settings */ 78 pj_pool_t *pool; /**< Memory pool */ 79 80 pjmedia_vid_cb vid_cb; /**< Stream callback */ 81 void *user_data; /**< Application data */ 82 83 pjmedia_rect_size size; 84 pj_uint8_t bpp; 85 unsigned bytes_per_row; 86 unsigned frame_size; 87 87 88 88 AVCaptureSession *cap_session; … … 110 110 unsigned index, 111 111 pjmedia_vid_param *param); 112 static pj_status_t ios_factory_create_stream(pjmedia_vid_dev_factory *f, 113 const pjmedia_vid_param *param, 114 const pjmedia_vid_cb *cb, 115 void *user_data, 116 pjmedia_vid_stream **p_vid_strm); 117 118 static pj_status_t ios_stream_get_param(pjmedia_vid_stream *strm, 112 static pj_status_t ios_factory_create_stream( 113 pjmedia_vid_dev_factory *f, 114 const pjmedia_vid_param *param, 115 const pjmedia_vid_cb *cb, 116 void *user_data, 117 pjmedia_vid_dev_stream **p_vid_strm); 118 119 static pj_status_t ios_stream_get_param(pjmedia_vid_dev_stream *strm, 119 120 pjmedia_vid_param *param); 120 static pj_status_t ios_stream_get_cap(pjmedia_vid_ stream *strm,121 static pj_status_t ios_stream_get_cap(pjmedia_vid_dev_stream *strm, 121 122 pjmedia_vid_dev_cap cap, 122 123 void *value); 123 static pj_status_t ios_stream_set_cap(pjmedia_vid_ stream *strm,124 static pj_status_t ios_stream_set_cap(pjmedia_vid_dev_stream *strm, 124 125 pjmedia_vid_dev_cap cap, 125 126 const void *value); 126 static pj_status_t ios_stream_start(pjmedia_vid_ stream *strm);127 static pj_status_t ios_stream_put_frame(pjmedia_vid_ stream *strm,127 static pj_status_t ios_stream_start(pjmedia_vid_dev_stream *strm); 128 static pj_status_t ios_stream_put_frame(pjmedia_vid_dev_stream *strm, 128 129 const pjmedia_frame *frame); 129 static pj_status_t ios_stream_stop(pjmedia_vid_ stream *strm);130 static pj_status_t ios_stream_destroy(pjmedia_vid_ stream *strm);130 static pj_status_t ios_stream_stop(pjmedia_vid_dev_stream *strm); 131 static pj_status_t ios_stream_destroy(pjmedia_vid_dev_stream *strm); 131 132 132 133 /* Operations */ … … 141 142 }; 142 143 143 static pjmedia_vid_ stream_op stream_op =144 static pjmedia_vid_dev_stream_op stream_op = 144 145 { 145 146 &ios_stream_get_param, … … 294 295 param->flags = PJMEDIA_VID_DEV_CAP_FORMAT; 295 296 param->clock_rate = DEFAULT_CLOCK_RATE; 296 param->frame_rate.num = DEFAULT_FPS;297 param->frame_rate.denum = 1;298 297 pj_memcpy(¶m->fmt, &di->info.fmt[0], sizeof(param->fmt)); 299 298 … … 384 383 385 384 /* API: create stream */ 386 static pj_status_t ios_factory_create_stream(pjmedia_vid_dev_factory *f, 387 const pjmedia_vid_param *param, 388 const pjmedia_vid_cb *cb, 389 void *user_data, 390 pjmedia_vid_stream **p_vid_strm) 385 static pj_status_t ios_factory_create_stream( 386 pjmedia_vid_dev_factory *f, 387 const pjmedia_vid_param *param, 388 const pjmedia_vid_cb *cb, 389 void *user_data, 390 pjmedia_vid_dev_stream **p_vid_strm) 391 391 { 392 392 struct ios_factory *qf = (struct ios_factory*)f; … … 489 489 490 490 if (param->flags & PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW && param->window) 491 window = param->window;491 window = (UIWindow *)param->window; 492 492 493 493 pj_assert(window); … … 522 522 523 523 on_error: 524 ios_stream_destroy((pjmedia_vid_ stream *)strm);524 ios_stream_destroy((pjmedia_vid_dev_stream *)strm); 525 525 526 526 return status; … … 528 528 529 529 /* API: Get stream info. */ 530 static pj_status_t ios_stream_get_param(pjmedia_vid_ stream *s,530 static pj_status_t ios_stream_get_param(pjmedia_vid_dev_stream *s, 531 531 pjmedia_vid_param *pi) 532 532 { … … 547 547 548 548 /* API: get capability */ 549 static pj_status_t ios_stream_get_cap(pjmedia_vid_ stream *s,549 static pj_status_t ios_stream_get_cap(pjmedia_vid_dev_stream *s, 550 550 pjmedia_vid_dev_cap cap, 551 551 void *pval) … … 567 567 568 568 /* API: set capability */ 569 static pj_status_t ios_stream_set_cap(pjmedia_vid_ stream *s,569 static pj_status_t ios_stream_set_cap(pjmedia_vid_dev_stream *s, 570 570 pjmedia_vid_dev_cap cap, 571 571 const void *pval) … … 586 586 587 587 /* API: Start stream. */ 588 static pj_status_t ios_stream_start(pjmedia_vid_ stream *strm)588 static pj_status_t ios_stream_start(pjmedia_vid_dev_stream *strm) 589 589 { 590 590 struct ios_stream *stream = (struct ios_stream*)strm; … … 606 606 607 607 /* API: Put frame from stream */ 608 static pj_status_t ios_stream_put_frame(pjmedia_vid_ stream *strm,608 static pj_status_t ios_stream_put_frame(pjmedia_vid_dev_stream *strm, 609 609 const pjmedia_frame *frame) 610 610 { … … 625 625 626 626 /* API: Stop stream. */ 627 static pj_status_t ios_stream_stop(pjmedia_vid_ stream *strm)627 static pj_status_t ios_stream_stop(pjmedia_vid_dev_stream *strm) 628 628 { 629 629 struct ios_stream *stream = (struct ios_stream*)strm; … … 641 641 642 642 /* API: Destroy stream. */ 643 static pj_status_t ios_stream_destroy(pjmedia_vid_ stream *strm)643 static pj_status_t ios_stream_destroy(pjmedia_vid_dev_stream *strm) 644 644 { 645 645 struct ios_stream *stream = (struct ios_stream*)strm;
Note: See TracChangeset
for help on using the changeset viewer.