- 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/qt_dev.m
r3459 r3467 73 73 struct qt_stream 74 74 { 75 pjmedia_vid_ stream base;/**< Base stream */76 pjmedia_vid_param param;/**< Settings */77 pj_pool_t *pool;/**< Memory pool. */78 79 pj_timestamp cap_frame_ts;/**< Captured frame tstamp */80 unsigned cap_ts_inc; /**< Increment */81 82 pjmedia_vid_cb vid_cb;/**< Stream callback. */83 void *user_data;/**< Application data. */75 pjmedia_vid_dev_stream base; /**< Base stream */ 76 pjmedia_vid_param param; /**< Settings */ 77 pj_pool_t *pool; /**< Memory pool. */ 78 79 pj_timestamp cap_frame_ts; /**< Captured frame tstamp */ 80 unsigned cap_ts_inc; /**< Increment */ 81 82 pjmedia_vid_cb vid_cb; /**< Stream callback. */ 83 void *user_data; /**< Application data. */ 84 84 85 85 QTCaptureSession *cap_session; … … 101 101 unsigned index, 102 102 pjmedia_vid_param *param); 103 static pj_status_t qt_factory_create_stream(pjmedia_vid_dev_factory *f, 104 const pjmedia_vid_param *param, 105 const pjmedia_vid_cb *cb, 106 void *user_data, 107 pjmedia_vid_stream **p_vid_strm); 108 109 static pj_status_t qt_stream_get_param(pjmedia_vid_stream *strm, 103 static pj_status_t qt_factory_create_stream( 104 pjmedia_vid_dev_factory *f, 105 const pjmedia_vid_param *param, 106 const pjmedia_vid_cb *cb, 107 void *user_data, 108 pjmedia_vid_dev_stream **p_vid_strm); 109 110 static pj_status_t qt_stream_get_param(pjmedia_vid_dev_stream *strm, 110 111 pjmedia_vid_param *param); 111 static pj_status_t qt_stream_get_cap(pjmedia_vid_ stream *strm,112 static pj_status_t qt_stream_get_cap(pjmedia_vid_dev_stream *strm, 112 113 pjmedia_vid_dev_cap cap, 113 114 void *value); 114 static pj_status_t qt_stream_set_cap(pjmedia_vid_ stream *strm,115 static pj_status_t qt_stream_set_cap(pjmedia_vid_dev_stream *strm, 115 116 pjmedia_vid_dev_cap cap, 116 117 const void *value); 117 static pj_status_t qt_stream_start(pjmedia_vid_ stream *strm);118 static pj_status_t qt_stream_stop(pjmedia_vid_ stream *strm);119 static pj_status_t qt_stream_destroy(pjmedia_vid_ stream *strm);118 static pj_status_t qt_stream_start(pjmedia_vid_dev_stream *strm); 119 static pj_status_t qt_stream_stop(pjmedia_vid_dev_stream *strm); 120 static pj_status_t qt_stream_destroy(pjmedia_vid_dev_stream *strm); 120 121 121 122 /* Operations */ … … 130 131 }; 131 132 132 static pjmedia_vid_ stream_op stream_op =133 static pjmedia_vid_dev_stream_op stream_op = 133 134 { 134 135 &qt_stream_get_param, … … 302 303 param->flags = PJMEDIA_VID_DEV_CAP_FORMAT; 303 304 param->clock_rate = DEFAULT_CLOCK_RATE; 304 param->frame_rate.num = DEFAULT_FPS;305 param->frame_rate.denum = 1;306 305 pj_memcpy(¶m->fmt, &di->info.fmt[0], sizeof(param->fmt)); 307 306 … … 348 347 349 348 /* API: create stream */ 350 static pj_status_t qt_factory_create_stream(pjmedia_vid_dev_factory *f, 351 const pjmedia_vid_param *param, 352 const pjmedia_vid_cb *cb, 353 void *user_data, 354 pjmedia_vid_stream **p_vid_strm) 349 static pj_status_t qt_factory_create_stream( 350 pjmedia_vid_dev_factory *f, 351 const pjmedia_vid_param *param, 352 const pjmedia_vid_cb *cb, 353 void *user_data, 354 pjmedia_vid_dev_stream **p_vid_strm) 355 355 { 356 356 struct qt_factory *qf = (struct qt_factory*)f; … … 445 445 446 446 pj_assert(vfd->fps.num); 447 strm->cap_ts_inc = PJMEDIA_SPF2( &strm->param.clock_rate, &vfd->fps, 1);447 strm->cap_ts_inc = PJMEDIA_SPF2(strm->param.clock_rate, &vfd->fps, 1); 448 448 449 449 [strm->video_output setMinimumVideoFrameInterval: … … 470 470 471 471 on_error: 472 qt_stream_destroy((pjmedia_vid_ stream *)strm);472 qt_stream_destroy((pjmedia_vid_dev_stream *)strm); 473 473 474 474 return status; … … 476 476 477 477 /* API: Get stream info. */ 478 static pj_status_t qt_stream_get_param(pjmedia_vid_ stream *s,478 static pj_status_t qt_stream_get_param(pjmedia_vid_dev_stream *s, 479 479 pjmedia_vid_param *pi) 480 480 { … … 495 495 496 496 /* API: get capability */ 497 static pj_status_t qt_stream_get_cap(pjmedia_vid_ stream *s,497 static pj_status_t qt_stream_get_cap(pjmedia_vid_dev_stream *s, 498 498 pjmedia_vid_dev_cap cap, 499 499 void *pval) … … 515 515 516 516 /* API: set capability */ 517 static pj_status_t qt_stream_set_cap(pjmedia_vid_ stream *s,517 static pj_status_t qt_stream_set_cap(pjmedia_vid_dev_stream *s, 518 518 pjmedia_vid_dev_cap cap, 519 519 const void *pval) … … 534 534 535 535 /* API: Start stream. */ 536 static pj_status_t qt_stream_start(pjmedia_vid_ stream *strm)536 static pj_status_t qt_stream_start(pjmedia_vid_dev_stream *strm) 537 537 { 538 538 struct qt_stream *stream = (struct qt_stream*)strm; … … 553 553 554 554 /* API: Stop stream. */ 555 static pj_status_t qt_stream_stop(pjmedia_vid_ stream *strm)555 static pj_status_t qt_stream_stop(pjmedia_vid_dev_stream *strm) 556 556 { 557 557 struct qt_stream *stream = (struct qt_stream*)strm; … … 569 569 570 570 /* API: Destroy stream. */ 571 static pj_status_t qt_stream_destroy(pjmedia_vid_ stream *strm)571 static pj_status_t qt_stream_destroy(pjmedia_vid_dev_stream *strm) 572 572 { 573 573 struct qt_stream *stream = (struct qt_stream*)strm;
Note: See TracChangeset
for help on using the changeset viewer.