Changeset 52342 in vbox
- Timestamp:
- Aug 11, 2014 3:01:48 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/VideoRec.cpp
r52325 r52342 92 92 /* time stamp of the current frame */ 93 93 uint64_t u64TimeStamp; 94 /* encoder deadline */ 95 unsigned int uEncoderDeadline; 94 96 } VIDEORECSTREAM; 95 97 … … 487 489 AssertReturn(pStrm->pu8RgbBuf, VERR_NO_MEMORY); 488 490 491 pStrm->uEncoderDeadline = 1000000 / uFps; 492 489 493 /* Play safe: the file must not exist, overwriting is potentially 490 494 * hazardous as nothing prevents the user from picking a file name of some … … 513 517 pos = options.parseKeyValue(key, value, pos); 514 518 515 if(key == "kf_mode") 516 { 517 if(value == "auto") 518 pStrm->VpxConfig.kf_mode = VPX_KF_AUTO; 519 else if (value == "fixed") 520 pStrm->VpxConfig.kf_mode = VPX_KF_FIXED; 521 else if (value == "disabled") 522 pStrm->VpxConfig.kf_mode = VPX_KF_DISABLED; 523 else LogRel(("Unknown value %s for parameter keyframe", value.c_str())); 524 continue; 525 } 526 else if(key == "kf_min_dist") 527 { 528 pStrm->VpxConfig.kf_min_dist = value.toUInt32(); 529 } 530 else if(key == "kf_max_dist") 531 { 532 pStrm->VpxConfig.kf_max_dist = value.toUInt32(); 533 } 534 else if(key == "rc_buf_optimal_sz") 535 { 536 pStrm->VpxConfig.rc_buf_optimal_sz = value.toUInt32(); 537 } 538 else if(key == "rc_dropframe_thresh") 539 { 540 pStrm->VpxConfig.rc_dropframe_thresh = value.toUInt32(); 519 if (key == "quality") 520 { 521 if (value == "realtime") 522 { 523 pStrm->uEncoderDeadline = VPX_DL_REALTIME; 524 } 525 else if (value == "good") 526 { 527 pStrm->uEncoderDeadline = 1000000 / uFps; 528 } 529 else if (value == "best") 530 { 531 pStrm->uEncoderDeadline = VPX_DL_BEST_QUALITY; 532 } 533 else 534 { 535 LogRel(("Settings quality deadline to = %s\n", value.c_str())); 536 pStrm->uEncoderDeadline = value.toUInt32(); 537 } 541 538 } 542 539 else LogRel(("Getting unknown option: %s=%s\n", key.c_str(), value.c_str())); … … 728 725 10 /* how long to show this frame */, 729 726 0 /* flags */, 730 VPX_DL_REALTIME /* deadline*/);727 pStrm->uEncoderDeadline /* quality setting */); 731 728 if (rcv != VPX_CODEC_OK) 732 729 {
Note:
See TracChangeset
for help on using the changeset viewer.