- Timestamp:
- Mar 25, 2011 8:38:26 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/v4l2_dev.c
r3459 r3489 129 129 pjmedia_vid_param *param); 130 130 static pj_status_t vid4lin_factory_create_stream(pjmedia_vid_dev_factory *f, 131 constpjmedia_vid_param *prm,131 pjmedia_vid_param *prm, 132 132 const pjmedia_vid_cb *cb, 133 133 void *user_data, … … 412 412 pj_uint32_t pix_fmt) 413 413 { 414 constpjmedia_video_format_detail *vfd;414 pjmedia_video_format_detail *vfd; 415 415 struct v4l2_format v4l2_fmt; 416 416 pj_status_t status; … … 438 438 (v4l2_fmt.fmt.pix.height != vfd->size.h)) 439 439 { 440 status = PJMEDIA_EVID_BADSIZE; 441 return status; 440 /* Size has changed */ 441 vfd->size.w = v4l2_fmt.fmt.pix.width; 442 vfd->size.h = v4l2_fmt.fmt.pix.height; 442 443 } 443 444 … … 514 515 /* API: create stream */ 515 516 static pj_status_t vid4lin_factory_create_stream(pjmedia_vid_dev_factory *f, 516 constpjmedia_vid_param *param,517 pjmedia_vid_param *param, 517 518 const pjmedia_vid_cb *cb, 518 519 void *user_data, … … 525 526 const vid4lin_fmt_map *fmt_map; 526 527 const pjmedia_video_format_info *fmt_info; 528 pjmedia_video_format_detail *vfd; 527 529 pj_status_t status = PJ_SUCCESS; 530 528 531 529 532 PJ_ASSERT_RETURN(f && param && p_vid_strm, PJ_EINVAL); … … 539 542 540 543 vdi = &cf->dev_info[param->cap_id]; 544 vfd = pjmedia_format_get_video_format_detail(¶m->fmt, PJ_TRUE); 541 545 542 546 /* Create and Initialize stream descriptor */ … … 552 556 stream->user_data = user_data; 553 557 stream->fd = INVALID_FD; 554 555 PJ_LOG(4,(THIS_FILE, "Opening video4linux2 device %s: format=%s..",556 stream->name, fmt_info->name));557 558 558 559 stream->fd = v4l2_open(vdi->dev_name, O_RDWR | O_NONBLOCK, 0);
Note: See TracChangeset
for help on using the changeset viewer.