diff options
author | Klaus Schmidinger <Klaus (dot) Schmidinger (at) tvdr (dot) de> | 2009-11-22 15:58:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <Klaus (dot) Schmidinger (at) tvdr (dot) de> | 2009-11-22 15:58:00 +0100 |
commit | ea01358b3bca9d55402ba632c95cdd6458abfdb3 (patch) | |
tree | 3a92e952e0c8de3cf109748da749b2841fed0da0 /dvbspu.c | |
parent | 06bf4c453e22a9bf03f5ec46f7b45593e2cb326c (diff) | |
download | vdr-patch-lnbsharing-ea01358b3bca9d55402ba632c95cdd6458abfdb3.tar.gz vdr-patch-lnbsharing-ea01358b3bca9d55402ba632c95cdd6458abfdb3.tar.bz2 |
Version 1.7.10vdr-1.7.10
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- Fixed wrong bracketing in cChannel::SubtitlingType() etc.
(thanks to Rolf Ahrenberg).
- Fixed not logging changes for channels that have no number
(reported by Timothy D. Lenz).
- Changed the project's URLs and email to tvdr.de.
- Added Lithuanian language translations (thanks to Valdemaras Pipiras).
- Updated Chinese language texts (thanks to Nan Feng).
- Only checking DVB_API_VERSION to be >=5 in order to stay compileable in case
the DVB API version number is increased (the API claims to always be backward
compatible).
- Fixed saving terminal settings when running in background (thanks to Manuel
Reimer).
- Fixed cFrameDetector::Analyze() to handle video streams where the frame type
is not detectable from the first TS packet of a frame.
- Fixed writing the PCR pid into the PMT in cPatPmtGenerator::GeneratePmt()
(reported by Rene van den Braken).
- Added Slovakian language texts (thanks to Milan Hrala).
- Fixed EntriesOnSameFileSystem() to avoid using f_fsid, which may be 0 (thanks
to Frank Schmirler).
- Fixed starting a recording at an I-frame.
- Fixed generating the index for recordings from channels that put a whole
GOP into one payload unit.
- The index file for TS recordings is now regenerated on-the-fly if a
recording is replayed that has no index. This can also be used to
re-create a broken index file by manually deleting the index file and then
replaying the recording (at least until the index file has been generated).
- The cRingBufferLinear::Read() function now returns -1 and sets errno to
EAGAIN if the buffer is already full.
- Fixed handling DVB subtitles for PES recordings (thanks to Rolf Ahrenberg).
- Added the audio id to the call of PlayAudio() in cDevice::PlayTsAudio()
(thanks to Andreas Schaefers).
- Fixed references to old *.vdr file names in MANUAL (reported by Arthur Konovalov).
- Reverted "Removed limitation to PAL resolution from SPU handling" because it
cause nothing but trouble. Besides, the core VDR doesn't use this, anyway.
- Fixed the default value for "Pause key handling" in the MANUAL (reported by
Diego Pierotto).
Diffstat (limited to 'dvbspu.c')
-rw-r--r-- | dvbspu.c | 34 |
1 files changed, 20 insertions, 14 deletions
@@ -8,7 +8,7 @@ * * parts of this file are derived from the OMS program. * - * $Id: dvbspu.c 2.1 2009/05/09 16:25:59 kls Exp $ + * $Id: dvbspu.c 2.2 2009/11/22 14:17:59 kls Exp $ */ #include "dvbspu.h" @@ -55,6 +55,9 @@ void cDvbSpuPalette::setPalette(const uint32_t * pal) #define setMin(a, b) if (a > b) a = b #define setMax(a, b) if (a < b) a = b +#define spuXres 720 +#define spuYres 576 + #define revRect(r1, r2) { r1.x1 = r2.x2; r1.y1 = r2.y2; r1.x2 = r2.x1; r1.y2 = r2.y1; } cDvbSpuBitmap::cDvbSpuBitmap(sDvbSpuRect size, @@ -63,8 +66,8 @@ cDvbSpuBitmap::cDvbSpuBitmap(sDvbSpuRect size, { size.x1 = max(size.x1, 0); size.y1 = max(size.y1, 0); - size.x2 = min(size.x2, Setup.OSDWidth); - size.y2 = min(size.y2, Setup.OSDHeight); + size.x2 = min(size.x2, spuXres - 1); + size.y2 = min(size.y2, spuYres - 1); bmpsize = size; revRect(minsize[0], size); @@ -72,7 +75,7 @@ cDvbSpuBitmap::cDvbSpuBitmap(sDvbSpuRect size, revRect(minsize[2], size); revRect(minsize[3], size); - int MemSize = bmpsize.width() * bmpsize.height() * sizeof(uint8_t); + int MemSize = spuXres * spuYres * sizeof(uint8_t); bmp = new uint8_t[MemSize]; if (bmp) @@ -93,10 +96,10 @@ cBitmap *cDvbSpuBitmap::getBitmap(const aDvbSpuPalDescr paldescr, int h = size.height(); int w = size.width(); - if (size.y1 + h >= bmpsize.height()) - h = bmpsize.height() - size.y1 - 1; - if (size.x1 + w >= bmpsize.width()) - w = bmpsize.width() - size.x1 - 1; + if (size.y1 + h >= spuYres) + h = spuYres - size.y1 - 1; + if (size.x1 + w >= spuXres) + w = spuXres - size.x1 - 1; if (w & 0x03) w += 4 - (w & 0x03); @@ -111,11 +114,13 @@ cBitmap *cDvbSpuBitmap::getBitmap(const aDvbSpuPalDescr paldescr, } // set the content - for (int yp = 0; yp < h; yp++) { - for (int xp = 0; xp < w; xp++) { - uint8_t idx = bmp[(size.y1 + yp) * bmpsize.width() + size.x1 + xp]; - ret->SetIndex(xp, yp, idx); - } + if (bmp) { + for (int yp = 0; yp < h; yp++) { + for (int xp = 0; xp < w; xp++) { + uint8_t idx = bmp[(size.y1 + yp) * spuXres + size.x1 + xp]; + ret->SetIndex(xp, yp, idx); + } + } } return ret; } @@ -149,7 +154,8 @@ bool cDvbSpuBitmap::getMinSize(const aDvbSpuPalDescr paldescr, void cDvbSpuBitmap::putPixel(int xp, int yp, int len, uint8_t colorid) { - memset(bmp + bmpsize.width() * yp + xp, colorid, len); + if (bmp) + memset(bmp + spuXres * yp + xp, colorid, len); setMin(minsize[colorid].x1, xp); setMin(minsize[colorid].y1, yp); setMax(minsize[colorid].x2, xp + len - 1); |