Ticket #3959: mpegrecorder_wolume_ctl.patch
File mpegrecorder_wolume_ctl.patch, 965 bytes (added by , 17 years ago) |
---|
-
libs/libmythtv/mpegrecorder.cpp
406 406 // Set recording volume 407 407 struct v4l2_control ctrl; 408 408 ctrl.id = V4L2_CID_AUDIO_VOLUME; 409 410 struct v4l2_queryctrl qctrl; 411 // getting volume max/min value 412 qctrl.id = V4L2_CID_AUDIO_VOLUME; 413 if (ioctl(chanfd, VIDIOC_QUERYCTRL, &qctrl) < 0) 414 { 415 //rather impossible 416 VERBOSE(VB_IMPORTANT, LOC_WARN + 417 "Unable to get recording volume parameters(max/min)" + ENO + "\n\t\t\t" + 418 "using defaults."); 409 419 ctrl.value = 65536 / 100 *audvolume; 420 } else { 421 ctrl.value=(qctrl.maximum - qctrl.minimum) * audvolume / 100 + qctrl.minimum; 422 } 423 424 425 410 426 411 427 if (ioctl(chanfd, VIDIOC_S_CTRL, &ctrl) < 0) 412 428 {