summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2010-06-05 19:15:53 +0200
committerChristian Gmeiner <christian.gmeiner@gmail.com>2010-06-05 19:15:53 +0200
commitd6d9bdefa017c0256397ac7337847bce37a6b07c (patch)
tree8ea7bf7d498f0033712f517ecf1b356c16790540
parent5b8a98c6f1a0b90d155e31bbd1e8e29f94a5a574 (diff)
downloadvdr-plugin-dxr3-d6d9bdefa017c0256397ac7337847bce37a6b07c.tar.gz
vdr-plugin-dxr3-d6d9bdefa017c0256397ac7337847bce37a6b07c.tar.bz2
prebuffer 500ms of video
-rw-r--r--dxr3device.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dxr3device.c b/dxr3device.c
index 95ab812..6d968ca 100644
--- a/dxr3device.c
+++ b/dxr3device.c
@@ -40,6 +40,7 @@ static const char *DEV_DXR3_VIDEO = "_mv";
static const char *DEV_DXR3_CONT = "";
static const int SILENT_AUDIO_SIZE = 16384;
+static const int TIMESTAMPS_500MS = 45000;
cDxr3Device::cDxr3Device() : spuDecoder(NULL), pluginOn(true), vPts(0), scrSet(false), playCount(0), aspectRatio(EM8300_ASPECTRATIO_4_3)
{
@@ -148,7 +149,7 @@ bool cDxr3Device::SetPlayMode(ePlayMode PlayMode)
// set the scr into future so that the firmware/hardware
// clears the buffers.
CHECK(ioctl(fdControl, EM8300_IOCTL_SCR_GET, &val));
- val += 10000;
+ val += TIMESTAMPS_500MS * 4;
CHECK(ioctl(fdControl, EM8300_IOCTL_SCR_SET, &val));
break;
@@ -583,8 +584,7 @@ void cDxr3Device::setPlayMode()
void cDxr3Device::playVideoFrame(cDxr3PesFrame *frame, uint32_t pts)
{
if (pts > 0) {
- uint32_t val = pts + 45000;
- val = pts - offset;
+ uint32_t val = pts - offset;
CHECK(ioctl(fdVideo, EM8300_IOCTL_VIDEO_SETPTS, &val));
}
@@ -640,7 +640,7 @@ void cDxr3Device::setScr(uint32_t val)
{
uint32_t scr;
CHECK(ioctl(fdControl, EM8300_IOCTL_SCR_GET, &scr));
- offset = val - scr;
+ offset = val - scr - TIMESTAMPS_500MS;
}
// Local variables: