summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hanisch <dvb@flensrocker.de>2010-08-20 21:02:14 +0200
committerLars Hanisch <dvb@flensrocker.de>2010-08-20 21:02:14 +0200
commit4f56cb2cfaa5845d81156c18bd19862321cd8db4 (patch)
tree9bdeee3e34bded2bba90851a2bbd6fb1935a2e61
parent884c592eec37a35d3c7987f5510573574c5071a3 (diff)
downloadvdr-plugin-pvrinput-4f56cb2cfaa5845d81156c18bd19862321cd8db4.tar.gz
vdr-plugin-pvrinput-4f56cb2cfaa5845d81156c18bd19862321cd8db4.tar.bz2
replace constants with identifiers
-rwxr-xr-xdevice.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/device.c b/device.c
index a5b2070..633b784 100755
--- a/device.c
+++ b/device.c
@@ -277,7 +277,7 @@ void cPvrDevice::Stop(void)
log(pvrDEBUG2,"cPvrDevice::Stop() for Device %i", i);
PvrDevices[i]->StopReadThread();
PvrDevices[i]->SetEncoderState(eStop);
- PvrDevices[i]->SetVBImode(PvrDevices[i]->CurrentLinesPerFrame, 0);
+ PvrDevices[i]->SetVBImode(PvrDevices[i]->CurrentLinesPerFrame, V4L2_MPEG_STREAM_VBI_FMT_NONE);
}
}
}
@@ -638,8 +638,6 @@ bool cPvrDevice::SetVBImode(int vbiLinesPerFrame, int vbistatus)
memset(&ctrl, 0, sizeof(ctrl));
ctrl.id = V4L2_CID_MPEG_STREAM_VBI_FMT;
ctrl.value = vbistatus;
- /* 0 = V4L2_MPEG_STREAM_VBI_FMT_NONE, No VBI in the MPEG stream
- 1 = V4L2_MPEG_STREAM_VBI_FMT_IVTV, VBI in private packets, IVTV format */
ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
ctrls.controls = &ctrl;
ctrls.count = 1;
@@ -648,7 +646,7 @@ bool cPvrDevice::SetVBImode(int vbiLinesPerFrame, int vbistatus)
number, CARDNAME[cardname], errno, strerror(errno));
return false;
}
- if (ctrl.value == V4L2_MPEG_STREAM_VBI_FMT_IVTV && vbiLinesPerFrame == 625) {
+ if ((ctrl.value == V4L2_MPEG_STREAM_VBI_FMT_IVTV) && (vbiLinesPerFrame == 625)) {
vbifmt.fmt.sliced.service_set = V4L2_SLICED_TELETEXT_B;
vbifmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
vbifmt.fmt.sliced.reserved[0] = 0;
@@ -873,7 +871,7 @@ bool cPvrDevice::OpenDvr(void)
FirstChannelSwitch = false;
} //end: if ((!ChannelSettingsDone)
if (CurrentInputType == eTelevision)
- SetVBImode(newLinesPerFrame, PvrSetup.SliceVBI);
+ SetVBImode(newLinesPerFrame, PvrSetup.SliceVBI ? V4L2_MPEG_STREAM_VBI_FMT_IVTV : V4L2_MPEG_STREAM_VBI_FMT_NONE);
SetEncoderState(eStart);
if (!readThreadRunning) {
log(pvrDEBUG2, "cPvrDevice::OpenDvr: create new readThread on /dev/video%d (%s)", number, CARDNAME[cardname]);
@@ -894,7 +892,7 @@ void cPvrDevice::CloseDvr(void)
if (dvrOpen) {
StopReadThread();
SetEncoderState(eStop);
- SetVBImode(CurrentLinesPerFrame, 0);
+ SetVBImode(CurrentLinesPerFrame, V4L2_MPEG_STREAM_VBI_FMT_NONE);
}
dvrOpen = false;
isClosing = false;