Changeset 3660
- Timestamp:
- Jul 15, 2011 8:36:23 AM (13 years ago)
- Location:
- pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/ios_dev.m
r3645 r3660 75 75 { 76 76 pjmedia_vid_dev_stream base; /**< Base stream */ 77 pjmedia_vid_ paramparam; /**< Settings */77 pjmedia_vid_dev_param param; /**< Settings */ 78 78 pj_pool_t *pool; /**< Memory pool */ 79 79 80 pjmedia_vid_ cb vid_cb; /**< Stream callback */80 pjmedia_vid_dev_cb vid_cb; /**< Stream callback */ 81 81 void *user_data; /**< Application data */ 82 82 … … 110 110 pjmedia_vid_dev_factory *f, 111 111 unsigned index, 112 pjmedia_vid_ param *param);112 pjmedia_vid_dev_param *param); 113 113 static pj_status_t ios_factory_create_stream( 114 114 pjmedia_vid_dev_factory *f, 115 pjmedia_vid_ param *param,116 const pjmedia_vid_ cb *cb,115 pjmedia_vid_dev_param *param, 116 const pjmedia_vid_dev_cb *cb, 117 117 void *user_data, 118 118 pjmedia_vid_dev_stream **p_vid_strm); 119 119 120 120 static pj_status_t ios_stream_get_param(pjmedia_vid_dev_stream *strm, 121 pjmedia_vid_ param *param);121 pjmedia_vid_dev_param *param); 122 122 static pj_status_t ios_stream_get_cap(pjmedia_vid_dev_stream *strm, 123 123 pjmedia_vid_dev_cap cap, … … 212 212 qdi->info.fmt_cnt = PJ_ARRAY_SIZE(ios_fmts); 213 213 qdi->info.caps |= PJMEDIA_VID_DEV_CAP_FORMAT; 214 qdi->info.fmt = (pjmedia_format*)215 pj_pool_calloc(qf->pool, qdi->info.fmt_cnt,216 sizeof(pjmedia_format));217 214 218 215 for (l = 0; l < PJ_ARRAY_SIZE(ios_fmts); l++) { … … 276 273 pjmedia_vid_dev_factory *f, 277 274 unsigned index, 278 pjmedia_vid_ param *param)275 pjmedia_vid_dev_param *param) 279 276 { 280 277 struct ios_factory *qf = (struct ios_factory*)f; … … 390 387 static pj_status_t ios_factory_create_stream( 391 388 pjmedia_vid_dev_factory *f, 392 pjmedia_vid_ param *param,393 const pjmedia_vid_ cb *cb,389 pjmedia_vid_dev_param *param, 390 const pjmedia_vid_dev_cb *cb, 394 391 void *user_data, 395 392 pjmedia_vid_dev_stream **p_vid_strm) … … 535 532 /* API: Get stream info. */ 536 533 static pj_status_t ios_stream_get_param(pjmedia_vid_dev_stream *s, 537 pjmedia_vid_ param *pi)534 pjmedia_vid_dev_param *pi) 538 535 { 539 536 struct ios_stream *strm = (struct ios_stream*)s; -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/qt_dev.m
r3645 r3660 77 77 { 78 78 pjmedia_vid_dev_stream base; /**< Base stream */ 79 pjmedia_vid_ paramparam; /**< Settings */79 pjmedia_vid_dev_param param; /**< Settings */ 80 80 pj_pool_t *pool; /**< Memory pool. */ 81 81 … … 83 83 unsigned cap_ts_inc; /**< Increment */ 84 84 85 pjmedia_vid_ cb vid_cb; /**< Stream callback. */85 pjmedia_vid_dev_cb vid_cb; /**< Stream callback. */ 86 86 void *user_data; /**< Application data. */ 87 87 … … 110 110 pjmedia_vid_dev_factory *f, 111 111 unsigned index, 112 pjmedia_vid_ param *param);112 pjmedia_vid_dev_param *param); 113 113 static pj_status_t qt_factory_create_stream( 114 114 pjmedia_vid_dev_factory *f, 115 pjmedia_vid_ param *param,116 const pjmedia_vid_ cb *cb,115 pjmedia_vid_dev_param *param, 116 const pjmedia_vid_dev_cb *cb, 117 117 void *user_data, 118 118 pjmedia_vid_dev_stream **p_vid_strm); 119 119 120 120 static pj_status_t qt_stream_get_param(pjmedia_vid_dev_stream *strm, 121 pjmedia_vid_ param *param);121 pjmedia_vid_dev_param *param); 122 122 static pj_status_t qt_stream_get_cap(pjmedia_vid_dev_stream *strm, 123 123 pjmedia_vid_dev_cap cap, … … 233 233 [dev hasMediaType:QTMediaTypeMuxed]) 234 234 { 235 unsigned j,k;235 unsigned k; 236 236 237 237 qdi = &qf->dev_info[qf->dev_count++]; … … 249 249 250 250 qdi->info.fmt_cnt = 0; 251 qdi->info.caps = PJMEDIA_VID_DEV_CAP_FORMAT; 251 252 for (k = 0; k < [[dev formatDescriptions] count]; k++) { 252 QTFormatDescription *desc = [[dev formatDescriptions]253 objectAtIndex:k];254 for (j = 0; j < PJ_ARRAY_SIZE(qt_fmts); j++) {255 if ([desc formatType] == qt_fmts[j].qt_format) {256 qdi->info.fmt_cnt++;257 break;258 }259 }260 }261 262 qdi->info.caps = PJMEDIA_VID_DEV_CAP_FORMAT;263 qdi->info.fmt = (pjmedia_format*)264 pj_pool_calloc(qf->dev_pool, qdi->info.fmt_cnt,265 sizeof(pjmedia_format));266 for (j = k = 0; k < [[dev formatDescriptions] count]; k++) {267 253 unsigned l; 268 254 QTFormatDescription *desc = [[dev formatDescriptions] 269 255 objectAtIndex:k]; 270 256 for (l = 0; l < PJ_ARRAY_SIZE(qt_fmts); l++) { 271 if ([desc formatType] == qt_fmts[j].qt_format) { 272 pjmedia_format *fmt = &qdi->info.fmt[j++]; 257 if ([desc formatType] == qt_fmts[l].qt_format) { 258 pjmedia_format *fmt = 259 &qdi->info.fmt[qdi->info.fmt_cnt++]; 273 260 pjmedia_format_init_video(fmt, 274 261 qt_fmts[l].pjmedia_format, … … 318 305 pjmedia_vid_dev_factory *f, 319 306 unsigned index, 320 pjmedia_vid_ param *param)307 pjmedia_vid_dev_param *param) 321 308 { 322 309 struct qt_factory *qf = (struct qt_factory*)f; … … 387 374 static pj_status_t qt_factory_create_stream( 388 375 pjmedia_vid_dev_factory *f, 389 pjmedia_vid_ param *param,390 const pjmedia_vid_ cb *cb,376 pjmedia_vid_dev_param *param, 377 const pjmedia_vid_dev_cb *cb, 391 378 void *user_data, 392 379 pjmedia_vid_dev_stream **p_vid_strm) … … 519 506 /* API: Get stream info. */ 520 507 static pj_status_t qt_stream_get_param(pjmedia_vid_dev_stream *s, 521 pjmedia_vid_ param *pi)508 pjmedia_vid_dev_param *pi) 522 509 { 523 510 struct qt_stream *strm = (struct qt_stream*)s;
Note: See TracChangeset
for help on using the changeset viewer.