14 #define __STDC_FORMAT_MACROS
19 #define PAGE_COMPOSITION_SEGMENT 0x10
20 #define REGION_COMPOSITION_SEGMENT 0x11
21 #define CLUT_DEFINITION_SEGMENT 0x12
22 #define OBJECT_DATA_SEGMENT 0x13
23 #define DISPLAY_DEFINITION_SEGMENT 0x14
24 #define DISPARITY_SIGNALING_SEGMENT 0x15
25 #define END_OF_DISPLAY_SET_SEGMENT 0x80
26 #define STUFFING_SEGMENT 0xFF
28 #define PGS_PALETTE_SEGMENT 0x14
29 #define PGS_OBJECT_SEGMENT 0x15
30 #define PGS_PRESENTATION_SEGMENT 0x16
31 #define PGS_WINDOW_SEGMENT 0x17
32 #define PGS_DISPLAY_SEGMENT 0x80
49 #define dbgdisplay(a...) if (DebugDisplay) SD.WriteHtml(a)
50 #define dbgpages(a...) if (DebugPages) SD.WriteHtml(a)
51 #define dbgregions(a...) if (DebugRegions) SD.WriteHtml(a)
52 #define dbgobjects(a...) if (DebugObjects) SD.WriteHtml(a)
53 #define dbgconverter(a...) if (DebugConverter) SD.WriteHtml(a)
54 #define dbgsegments(a...) if (DebugSegments) SD.WriteHtml(a)
55 #define dbgpixel(a...) if (DebugPixel) SD.WriteHtml(a)
56 #define dbgcluts(a...) if (DebugCluts) SD.WriteHtml(a)
57 #define dbgoutput(a...) if (DebugOutput) SD.WriteHtml(a)
59 #define DBGMAXBITMAPS 100
60 #define DBGBITMAPWIDTH 400
62 #define FIX_SUBTITLE_VERSION_BROADCASTER_STUPIDITY
98 int w = MaxX ? int(round(MaxX *
factor)) : Scaled->
Width();
99 int h = MaxY ? int(round(MaxY *
factor)) : Scaled->
Height();
100 uchar mem[w * h * 3];
101 for (
int x = 0; x < w; x++) {
102 for (
int y = 0; y < h; y++) {
104 int o = (y * w + x) * 3;
105 mem[o++] = (c & 0x00FF0000) >> 16;
106 mem[o++] = (c & 0x0000FF00) >> 8;
107 mem[o] = (c & 0x000000FF);
114 int f = open(ImgName, O_WRONLY | O_CREAT, DEFFILEMODE);
116 if (write(f, Jpeg, Size) < 0)
129 if (FILE *f = fopen(
"dbg-log.htm",
newFile ?
"w" :
"a")) {
131 va_start(ap, Format);
132 vfprintf(f, Format, ap);
166 int a = 0, r = 0, g = 0, b = 0;
176 for (
int i = 1; i < 16; ++i) {
178 r = (i & 1) ? 255 : 0;
179 g = (i & 2) ? 255 : 0;
180 b = (i & 4) ? 255 : 0;
183 r = (i & 1) ? 127 : 0;
184 g = (i & 2) ? 127 : 0;
185 b = (i & 4) ? 127 : 0;
191 for (
int i = 1; i < 256; ++i) {
193 r = (i & 1) ? 255 : 0;
194 g = (i & 2) ? 255 : 0;
195 b = (i & 4) ? 255 : 0;
201 r = ((i & 1) ? 85 : 0) + ((i & 0x10) ? 170 : 0);
202 g = ((i & 2) ? 85 : 0) + ((i & 0x20) ? 170 : 0);
203 b = ((i & 4) ? 85 : 0) + ((i & 0x40) ? 170 : 0);
207 r = ((i & 1) ? 85 : 0) + ((i & 0x10) ? 170 : 0);
208 g = ((i & 2) ? 85 : 0) + ((i & 0x20) ? 170 : 0);
209 b = ((i & 4) ? 85 : 0) + ((i & 0x40) ? 170 : 0);
213 r = 127 + ((i & 1) ? 43 : 0) + ((i & 0x10) ? 85 : 0);
214 g = 127 + ((i & 2) ? 43 : 0) + ((i & 0x20) ? 85 : 0);
215 b = 127 + ((i & 4) ? 43 : 0) + ((i & 0x40) ? 85 : 0);
219 r = ((i & 1) ? 43 : 0) + ((i & 0x10) ? 85 : 0);
220 g = ((i & 2) ? 43 : 0) + ((i & 0x20) ? 85 : 0);
221 b = ((i & 4) ? 43 : 0) + ((i & 0x40) ? 85 : 0);
233 #ifndef FIX_SUBTITLE_VERSION_BROADCASTER_STUPIDITY
240 while (!bs.
IsEOF()) {
242 bool entryClut2Flag = bs.
GetBit();
243 bool entryClut4Flag = bs.
GetBit();
244 bool entryClut8Flag = bs.
GetBit();
264 value =
yuv2rgb(yval, cbval, crval);
267 dbgcluts(
"%2d %d %d %d %08X<br>\n", clutEntryId, entryClut2Flag ? 2 : 0, entryClut4Flag ? 4 : 0, entryClut8Flag ? 8 : 0, value);
284 for (
int i = 0; i < 256; ++i)
286 while (!bs.
IsEOF()) {
294 value =
yuv2rgb(yval, cbval, crval);
297 dbgcluts(
"%2d %08X<br>\n", clutEntryId, value);
311 Er =
constrain((298 * Ey + 460 * Epr) / 256, 0, 255);
312 Eg =
constrain((298 * Ey - 55 * Epb - 137 * Epr) / 256, 0, 255);
313 Eb =
constrain((298 * Ey + 543 * Epb ) / 256, 0, 255);
315 return (Er << 16) | (Eg << 8) | Eb;
324 default:
esyslog(
"ERROR: wrong Bpp in cSubtitleClut::SetColor(%d, %d, %08X)", Bpp,
Index, Color);
334 default:
esyslog(
"ERROR: wrong Bpp in cSubtitleClut::GetPalette(%d)", Bpp);
398 #ifndef FIX_SUBTITLE_VERSION_BROADCASTER_STUPIDITY
423 int numberOfCodes = bs.
GetBits(8);
436 if (b.
Dirty(x1, y1, x2, y2)) {
438 dbgobjects(
"<img src=\"%s\"><br>\n", *ImgName);
450 int sequenceDescriptor = bs.
GetBits(8);
451 if (!(sequenceDescriptor & 0x80) &&
topData != NULL) {
477 if (NumberOfCodes > 0) {
478 char txt[NumberOfCodes + 1];
479 for (
int i = 0; i < NumberOfCodes; i++)
480 txt[i] = Data[i * 2 + 1];
481 txt[NumberOfCodes] = 0;
483 int len = NumberOfCodes;
485 dbgobjects(
" table %s raw '%s'", CharacterTable, from);
487 const char *s = conv.
Convert((
const char *)from);
497 int y = Even ? 0 : 1;
498 uint8_t map2to4[ 4] = { 0x00, 0x07, 0x08, 0x0F };
499 uint8_t map2to8[ 4] = { 0x00, 0x77, 0x88, 0xFF };
500 uint8_t map4to8[16] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
501 const uint8_t *mapTable = NULL;
503 while (!bs.
IsEOF()) {
506 dbgpixel(
"2-bit / pixel code string<br>\n");
507 switch (Bitmap->
Bpp()) {
508 case 8: mapTable = map2to8;
break;
509 case 4: mapTable = map2to4;
break;
510 default: mapTable = NULL;
break;
517 dbgpixel(
"4-bit / pixel code string<br>\n");
518 switch (Bitmap->
Bpp()) {
519 case 8: mapTable = map4to8;
break;
520 default: mapTable = NULL;
break;
527 dbgpixel(
"8-bit / pixel code string<br>\n");
532 dbgpixel(
"sub block 2 to 4 map<br>\n");
533 for (
int i = 0; i < 4; ++i)
537 dbgpixel(
"sub block 2 to 8 map<br>\n");
538 for (
int i = 0; i < 4; ++i)
542 dbgpixel(
"sub block 4 to 8 map<br>\n");
543 for (
int i = 0; i < 16; ++i)
547 dbgpixel(
"end of object line<br>\n");
552 dbgpixel(
"PGS code string, including EOLs<br>\n");
558 default:
dbgpixel(
"unknown sub block %s %d<br>\n", __FUNCTION__, __LINE__);
567 for (
int pos = x; pos < x + Length; pos++)
605 color = MapTable[color];
606 DrawLine(Bitmap, px + x, py + y, color, rl);
620 else if (bs->
GetBit() == 0) {
627 else if (bs->
GetBit() == 0) {
650 color = MapTable[color];
651 DrawLine(Bitmap, px + x, py + y, color, rl);
676 DrawLine(Bitmap, px + x, py + y, color, rl);
683 while (!bs->
IsEOF()) {
690 rl = (rl << 8) + bs->
GetBits(8);
691 color = flags & 0x80 ? bs->
GetBits(8) : 0;
694 DrawLine(Bitmap, px + x, py + y, color, rl);
737 if (so->ObjectId() == ObjectId)
882 #ifndef FIX_SUBTITLE_VERSION_BROADCASTER_STUPIDITY
926 switch (Bitmap->
Bpp()) {
930 default:
dbgregions(
"unknown bpp %d (%s %d)<br>\n", Bitmap->
Bpp(), __FUNCTION__, __LINE__);
935 so->Render(Bitmap, sor->ObjectHorizontalPosition(), sor->ObjectVerticalPosition(), sor->ForegroundPixelCode(), sor->BackgroundPixelCode());
996 tArea *
GetAreas(
int &NumAreas,
double FactorX,
double FactorY);
1021 #ifndef FIX_SUBTITLE_VERSION_BROADCASTER_STUPIDITY
1088 a->
x1 = int(round(FactorX * srr->RegionHorizontalAddress()));
1089 a->
y1 = int(round(FactorY * srr->RegionVerticalAddress()));
1090 a->
x2 = int(round(FactorX * (srr->RegionHorizontalAddress() + sr->RegionWidth() - 1)));
1091 a->
y2 = int(round(FactorY * (srr->RegionVerticalAddress() + sr->RegionHeight() - 1)));
1092 a->
bpp = sr->RegionDepth();
1093 while ((a->
Width() & 3) != 0)
1109 if (sc->ClutId() == ClutId)
1122 if (sr->RegionId() == RegionId)
1150 unsigned char *
Get(
int &Length);
1151 void Put(
const uchar *Data,
int Length);
1175 Size =
max(Size, 2048);
1181 esyslog(
"ERROR: can't allocate memory for subtitle assembler");
1197 unsigned char *result =
data +
pos;
1234 void DbgDump(
int WindowWidth,
int WindowHeight);
1263 bool AntiAlias =
true;
1267 for (
int i = 0; i <
numAreas; i++) {
1273 areas[i].bpp = Bpp[i];
1294 double End = Start + Duration;
1295 cBitmap Bitmap(WindowWidth, WindowHeight, 8);
1296 #define DBGBACKGROUND 0xA0A0A0
1309 SD.
WriteHtml(
"</td><td style=\"height:100%%\"><table" BORDER " style=\"height:100%%\">");
1310 SD.
WriteHtml(
"<tr><td valign=top><b>%.2f</b></td></tr>", Start);
1311 SD.
WriteHtml(
"<tr><td valign=middle>%.2f</td></tr>", Duration);
1312 SD.
WriteHtml(
"<tr><td valign=bottom>%.2f</td></tr>", End);
1322 :
cThread(
"subtitle converter")
1354 dbgconverter(
"converter reset -----------------------<br>\n");
1371 if (Data && Length > 8) {
1373 int SubstreamHeaderLength = 4;
1374 bool ResetSubtitleAssembler = Data[PayloadOffset + 3] == 0x00;
1377 if ((Data[7] & 0x01) && (Data[PayloadOffset - 3] & 0x81) == 0x01 && Data[PayloadOffset - 2] == 0x81) {
1379 SubstreamHeaderLength = 1;
1380 ResetSubtitleAssembler = Data[8] >= 5;
1383 if (Length > PayloadOffset + SubstreamHeaderLength) {
1387 const uchar *data = Data + PayloadOffset + SubstreamHeaderLength;
1388 int length = Length - PayloadOffset - SubstreamHeaderLength;
1389 if (ResetSubtitleAssembler)
1393 if (data[0] == 0x20 && data[1] == 0x00 && data[2] == 0x0F)
1401 if (b && b[0] == 0x0F) {
1417 if (Data && Length > 8) {
1419 if (Length > PayloadOffset) {
1423 const uchar *data = Data + PayloadOffset;
1424 int length = Length - PayloadOffset;
1426 if (length > 2 && data[0] == 0x20 && data[1] == 0x00 && data[2] == 0x0F) {
1430 const uchar *b = data;
1431 while (length > 0) {
1451 #define LimitTo32Bit(n) ((n) & 0x00000000FFFFFFFFL)
1463 if (Timeout.
TimedOut() || LastSetupLevel != NewSetupLevel) {
1467 LastSetupLevel = NewSetupLevel;
1475 if (Delta > (int64_t(1) << 31))
1476 Delta -= (int64_t(1) << 32);
1477 else if (Delta < -((int64_t(1) << 31) - 1))
1478 Delta += (int64_t(1) << 32);
1481 if (Delta < sb->Timeout() * 1000) {
1482 if (!sb->HasBitmaps()) {
1489 Timeout.
Set(sb->Timeout() * 1000);
1490 dbgconverter(
"PTS: %" PRId64
" STC: %" PRId64
" (%" PRId64
") timeout: %d<br>\n", sb->Pts(), STC, Delta, sb->Timeout());
1507 int OsdWidth, OsdHeight;
1509 int VideoWidth, VideoHeight;
1537 if (sp->PageId() == PageId)
1550 if (Length > 5 && bs.
GetBits(8) == 0x0F) {
1551 int segmentType = bs.
GetBits(8);
1556 int segmentLength = bs.
GetBits(16);
1559 switch (segmentType) {
1562 dbgsegments(
"END_OF_DISPLAY_SET_SEGMENT (simulated)<br>\n");
1566 page->
Parse(Pts, bs);
1591 #ifndef FIX_SUBTITLE_VERSION_BROADCASTER_STUPIDITY
1595 bool displayWindowFlag = bs.
GetBit();
1601 if (displayWindowFlag) {
1615 bool disparity_shift_update_sequence_page_flag = bs.
GetBit();
1618 if (disparity_shift_update_sequence_page_flag) {
1621 int division_period_count = bs.
GetBits(8);
1622 for (
int i = 0; i < division_period_count; ++i) {
1627 while (!bs.
IsEOF()) {
1629 bool disparity_shift_update_sequence_region_flag = bs.
GetBit();
1631 int number_of_subregions_minus_1 = bs.
GetBits(2);
1632 for (
int i = 0; i <= number_of_subregions_minus_1; ++i) {
1633 if (number_of_subregions_minus_1 > 0) {
1640 if (disparity_shift_update_sequence_region_flag) {
1643 int division_period_count = bs.
GetBits(8);
1644 for (
int i = 0; i < division_period_count; ++i) {
1660 dbgsegments(
"*** unknown segment type: %02X<br>\n", segmentType);
1671 int segmentType = bs.
GetBits(8);
1672 int segmentLength = bs.
GetBits(16);
1677 switch (segmentType) {
1680 dbgsegments(
"PGS_DISPLAY_SEGMENT (simulated)<br>\n");
1695 int regionHorizontalAddress = bs.
GetBits(16);
1696 int regionVerticalAddress = bs.
GetBits(16);
1697 int regionWidth = bs.
GetBits(16);
1698 int regionHeight = bs.
GetBits(16);
1724 dbgsegments(
"*** unknown segment type: %02X<br>\n", segmentType);
1739 bool Reduced =
false;
1742 int HalfBpp = Bpp / 2;
1744 for (
int i = 0; i < NumAreas; i++) {
1745 if (Areas[i].bpp >= Bpp) {
1746 Areas[i].
bpp = HalfBpp;
1757 for (
int i = 0; i < NumAreas; i++) {
1761 cBitmap *bm =
new cBitmap(sr->RegionWidth(), sr->RegionHeight(), sr->RegionDepth());
1762 bm->
Replace(*clut->GetPalette(sr->RegionDepth()));
1763 sr->Render(bm, Page->
Objects());
1765 if (sr->RegionDepth() != Areas[i].
bpp) {
1766 if (sr->RegionLevelOfCompatibility() <= Areas[i].
bpp) {
1769 dbgregions(
"reduce region %d bpp %d level %d area bpp %d<br>\n", sr->RegionId(), sr->RegionDepth(), sr->RegionLevelOfCompatibility(), Areas[i].
bpp);
1773 dbgregions(
"condense region %d bpp %d level %d area bpp %d<br>\n", sr->RegionId(), sr->RegionDepth(), sr->RegionLevelOfCompatibility(), Areas[i].
bpp);
1778 bm->
SetOffset(srr->RegionHorizontalAddress(), srr->RegionVerticalAddress());
const uint8_t * GetData(void) const
bool SetLength(int Length)
void ShrinkBpp(int NewBpp)
Shrinks the color depth of the bitmap to NewBpp by keeping only the 2^NewBpp most frequently used col...
void SetOffset(int X0, int Y0)
Sets the offset of this bitmap to the given values.
void ReduceBpp(const cPalette &Palette)
Reduces the color depth of the bitmap to that of the given Palette.
bool Dirty(int &x1, int &y1, int &x2, int &y2)
Tells whether there is a dirty area and returns the bounding rectangle of that area (relative to the ...
cBitmap * Scaled(double FactorX, double FactorY, bool AntiAlias=false) const
Creates a copy of this bitmap, scaled by the given factors.
tColor GetColor(int x, int y) const
Returns the color at the given coordinates.
void SetIndex(int x, int y, tIndex Index)
Sets the index at the given coordinates to Index.
void DrawRectangle(int x1, int y1, int x2, int y2, tColor Color)
Draws a filled rectangle defined by the upper left (x1, y1) and lower right (x2, y2) corners with the...
void Clean(void)
Marks the dirty area as clean.
void DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg=0, tColor ColorBg=0, bool ReplacePalette=false, bool Overlay=false)
Sets the pixels in this bitmap with the data from the given Bitmap, putting the upper left corner of ...
void Fill(tIndex Index)
Fills the bitmap data with the given Index.
void DrawText(int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width=0, int Height=0, int Alignment=taDefault)
Draws the given string at coordinates (x, y) with the given foreground and background color and font.
static const char * SystemCharacterTable(void)
const char * Convert(const char *From, char *To=NULL, size_t ToLength=0)
Converts the given Text from FromCode to ToCode (as set in the constructor).
static void SleepMs(int TimeoutMs)
Creates a cCondWait object and uses it to sleep for TimeoutMs milliseconds, immediately giving up the...
virtual void GetVideoSize(int &Width, int &Height, double &VideoAspect)
Returns the Width, Height and VideoAspect ratio of the currently displayed video material.
virtual int64_t GetSTC(void)
Gets the current System Time Counter, which can be used to synchronize audio, video and subtitles.
static cDevice * PrimaryDevice(void)
Returns the primary device.
virtual void GetOsdSize(int &Width, int &Height, double &PixelAspect)
Returns the Width, Height and PixelAspect ratio the OSD should use to best fit the resolution of the ...
virtual ~cDvbSubtitleAssembler()
void Put(const uchar *Data, int Length)
cDvbSubtitleAssembler(void)
unsigned char * Get(int &Length)
void DbgDump(int WindowWidth, int WindowHeight)
cDvbSubtitleBitmaps(int State, int64_t Pts, int Timeout, tArea *Areas, int NumAreas, double OsdFactorX, double OsdFactorY)
void AddBitmap(cBitmap *Bitmap)
cVector< cBitmap * > bitmaps
int Convert(const uchar *Data, int Length)
cDvbSubtitleConverter(void)
int windowHorizontalOffset
cList< cDvbSubtitleBitmaps > * bitmaps
void FinishPage(cDvbSubtitlePage *Page)
virtual void Action(void)
A derived cThread class must implement the code it wants to execute as a separate thread in this func...
int ExtractPgsSegment(const uchar *Data, int Length, int64_t Pts)
int ExtractSegment(const uchar *Data, int Length, int64_t Pts)
cDvbSubtitleAssembler * dvbSubtitleAssembler
cList< cDvbSubtitlePage > * pages
cDvbSubtitlePage * GetPageById(int PageId, bool New=false)
virtual ~cDvbSubtitleConverter()
static void SetupChanged(void)
int ConvertFragments(const uchar *Data, int Length)
cList< cSubtitleRegion > regions
cSubtitleClut * GetClutById(int ClutId, bool New=false)
void SetPending(bool Pending)
cSubtitleObjects * Objects(void)
cDvbSubtitlePage(int PageId)
tArea * GetAreas(int &NumAreas, double FactorX, double FactorY)
void Parse(int64_t Pts, cBitStream &bs)
cList< cSubtitleClut > cluts
int PageVersionNumber(void)
cSubtitleObject * GetObjectById(int ObjectId, bool New=false)
void AddRegionRef(cSubtitleRegionRef *rf)
cList< cSubtitleRegionRef > regionRefs
void ParsePgs(int64_t Pts, cBitStream &bs)
cSubtitleRegionRef * GetRegionRefByIndex(int RegionRefIndex)
cSubtitleRegion * GetRegionById(int RegionId, bool New=false)
virtual int Width(void) const =0
Returns the original character width as requested when the font was created, or 0 if the default widt...
static cFont * CreateFont(const char *Name, int CharHeight, int CharWidth=0)
Creates a new font object with the given Name and makes its characters CharHeight pixels high.
virtual int Height(void) const =0
Returns the height of this font in pixel (all characters have the same height).
void Del(cListObject *Object, bool DeleteObject=true)
void Add(cListObject *Object, cListObject *After=NULL)
const cSubtitleObject * Next(const cSubtitleObject *Object) const
< Returns the element immediately before Object in this list, or NULL if Object is the first element ...
const cSubtitleObject * First(void) const
Returns the first element in this list, or NULL if the list is empty.
const T * Get(int Index) const
Returns the list element at the given Index, or NULL if no such element exists.
static cOsd * NewOsd(int Left, int Top, uint Level=OSD_LEVEL_DEFAULT)
Returns a pointer to a newly created cOsd object, which will be located at the given coordinates.
The cOsd class is the interface to the "On Screen Display".
virtual eOsdError SetAreas(const tArea *Areas, int NumAreas)
Sets the sub-areas to the given areas.
virtual eOsdError CanHandleAreas(const tArea *Areas, int NumAreas)
Checks whether the OSD can display the given set of sub-areas.
virtual void DrawScaledBitmap(int x, int y, const cBitmap &Bitmap, double FactorX, double FactorY, bool AntiAlias=false)
Sets the pixels in the OSD with the data from the given Bitmap, putting the upper left corner of the ...
virtual void Flush(void)
Actually commits all data to the OSD hardware.
tColor Color(int Index) const
Returns the color at the given Index.
void Replace(const cPalette &Palette)
Replaces the colors of this palette with the colors from the given palette.
void SetColor(int Index, tColor Color)
Sets the palette entry at Index to Color.
int SubtitleFgTransparency
int SubtitleBgTransparency
char FontOsd[MAXFONTNAME]
static cString sprintf(const char *fmt,...) __attribute__((format(printf
void Parse(cBitStream &bs)
tColor yuv2rgb(int Y, int Cb, int Cr)
void SetColor(int Bpp, int Index, tColor Color)
int ClutVersionNumber(void)
const cPalette * GetPalette(int Bpp)
cSubtitleClut(int ClutId)
void ParsePgs(cBitStream &bs)
cString WriteJpeg(const cBitmap *Bitmap, int MaxX=0, int MaxY=0)
void SetFactor(double Factor)
void WriteHtml(const char *Format,...)
void SetFirstPts(int64_t FirstPts)
cSubtitleObjectRefPgs(cBitStream &bs)
int ObjectProviderFlag(void)
int ForegroundPixelCode(void)
int objectHorizontalPosition
int ObjectVerticalPosition(void)
int ObjectHorizontalPosition(void)
int BackgroundPixelCode(void)
int objectVerticalPosition
cSubtitleObject(int ObjectId)
bool Decode4BppCodeString(cBitmap *Bitmap, int px, int py, cBitStream *bs, int &x, int y, const uint8_t *MapTable)
void DecodeCharacterString(const uchar *Data, int NumberOfCodes)
bool Decode2BppCodeString(cBitmap *Bitmap, int px, int py, cBitStream *bs, int &x, int y, const uint8_t *MapTable)
bool Decode8BppCodeString(cBitmap *Bitmap, int px, int py, cBitStream *bs, int &x, int y)
void DrawLine(cBitmap *Bitmap, int x, int y, tIndex Index, int Length)
void ParsePgs(cBitStream &bs)
bool nonModifyingColorFlag
void DecodeSubBlock(cBitmap *Bitmap, int px, int py, const uchar *Data, int Length, bool Even)
void Render(cBitmap *Bitmap, int px, int py, tIndex IndexFg, tIndex IndexBg)
int ObjectVersionNumber(void)
bool DecodePgsCodeString(cBitmap *Bitmap, int px, int py, cBitStream *bs, int &x, int y)
int ObjectCodingMethod(void)
void Parse(cBitStream &bs)
bool NonModifyingColorFlag(void)
cSubtitleObject * GetObjectById(int ObjectId, bool New=false)
cSubtitleRegionRef(int id, int x, int y)
int regionVerticalAddress
int RegionHorizontalAddress(void)
int regionHorizontalAddress
int RegionVerticalAddress(void)
cList< cSubtitleObjectRef > objectRefs
int regionLevelOfCompatibility
void Parse(cBitStream &bs)
bool RegionFillFlag(void)
void SetDimensions(int Width, int Height)
void Render(cBitmap *Bitmap, cSubtitleObjects *Objects)
int RegionVersionNumber(void)
cSubtitleRegion(int RegionId)
void ParsePgs(cBitStream &bs)
int RegionLevelOfCompatibility(void)
void bool Start(void)
Sets the description of this thread, which will be used when logging starting or stopping of the thre...
bool Running(void)
Returns false if a derived cThread object shall leave its Action() function.
void Cancel(int WaitSeconds=0)
Cancels the thread by first setting 'running' to false, so that the Action() loop can finish in an or...
void Set(int Ms=0)
Sets the timer.
bool TimedOut(void) const
virtual void Append(T Data)
#define PGS_PALETTE_SEGMENT
#define OBJECT_DATA_SEGMENT
#define PGS_OBJECT_SEGMENT
#define CLUT_DEFINITION_SEGMENT
#define dbgsegments(a...)
static bool DebugSegments
#define END_OF_DISPLAY_SET_SEGMENT
#define REGION_COMPOSITION_SEGMENT
#define PAGE_COMPOSITION_SEGMENT
#define PGS_WINDOW_SEGMENT
#define PGS_DISPLAY_SEGMENT
static bool DebugConverter
#define DISPARITY_SIGNALING_SEGMENT
#define dbgconverter(a...)
#define PGS_PRESENTATION_SEGMENT
#define DISPLAY_DEFINITION_SEGMENT
const char * getCharacterTable(const unsigned char *&buffer, int &length, bool *isSingleByte)
#define OSD_LEVEL_SUBTITLES
tColor ArgbToColor(uint8_t A, uint8_t R, uint8_t G, uint8_t B)
int PesPayloadOffset(const uchar *p)
bool PesHasPts(const uchar *p)
int64_t PesGetPts(const uchar *p)