Warnings with Xine Plugin and vdr-1.3.27
Commit Message
Reinhard Nissl wrote:
> Hi,
>
> C.Y.M wrote:
>
>> There are a few new warnings when building the Xine plugin with
>> vdr-1.3.27.
>>
>> ccache g++ -g -O2 -Wall -Woverloaded-virtual -c -D_GNU_SOURCE
>> -DPLUGIN_NAME_I18N='"xine"' -DFIFO_DIR=\"/tmp/vdr-xine\" `xine-config
>> --cflags`
>> -I../../../include -I../DVB/include xine.c
>> ccache g++ -g -O2 -Wall -Woverloaded-virtual -c -D_GNU_SOURCE
>> -DPLUGIN_NAME_I18N='"xine"' -DFIFO_DIR=\"/tmp/vdr-xine\" `xine-config
>> --cflags`
>> -I../../../include -I../DVB/include xineDevice.c
>> In file included from xineDevice.c:8:
>> ../../../include/vdr/osd.h:280: warning: `virtual void
>> cOsd::DrawBitmap(int,
>> int, const cBitmap&, unsigned int, unsigned int, bool)' was hidden
>> xineOsd.h:49: warning: by `virtual void
>> PluginXine::cXineOsd::DrawBitmap(int,
>> int, const cBitmap&, unsigned int, unsigned int)'
>> ccache g++ -g -O2 -Wall -Woverloaded-virtual -c -D_GNU_SOURCE
>> -DPLUGIN_NAME_I18N='"xine"' -DFIFO_DIR=\"/tmp/vdr-xine\" `xine-config
>> --cflags`
>> -I../../../include -I../DVB/include xineLib.c
>> In file included from xineLib.c:7:
>> ../../../include/vdr/osd.h:280: warning: `virtual void
>> cOsd::DrawBitmap(int,
>> int, const cBitmap&, unsigned int, unsigned int, bool)' was hidden
>> xineOsd.h:49: warning: by `virtual void
>> PluginXine::cXineOsd::DrawBitmap(int,
>> int, const cBitmap&, unsigned int, unsigned int)'
>> ccache g++ -g -O2 -Wall -Woverloaded-virtual -c -D_GNU_SOURCE
>> -DPLUGIN_NAME_I18N='"xine"' -DFIFO_DIR=\"/tmp/vdr-xine\" `xine-config
>> --cflags`
>> -I../../../include -I../DVB/include xineOsd.c
>> In file included from xineOsd.c:4:
>> ../../../include/vdr/osd.h:280: warning: `virtual void
>> cOsd::DrawBitmap(int,
>> int, const cBitmap&, unsigned int, unsigned int, bool)' was hidden
>> xineOsd.h:49: warning: by `virtual void
>> PluginXine::cXineOsd::DrawBitmap(int,
>> int, const cBitmap&, unsigned int, unsigned int)'
>
>
> I'm sorry that I cannot supply a patch already (and I don't know when
> this will happen due to beeing busy with other things).
>
> Just have a look into osd.h and adapt the signature of the functions in
> xineOsd.h. They just delegate the work to the original functions, so it
> is ok to just pass the additional parameters.
>
Thanks, this patch seems to fix the warnings.
Regards,
C.
@@ -46,7 +46,7 @@
virtual void RestoreRegion(void);
virtual eOsdError SetPalette(const cPalette &Palette, int Area);
virtual void DrawPixel(int x, int y, tColor Color);
- virtual void DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg = 0, tColor ColorBg = 0);
+ virtual void DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg = 0, tColor ColorBg = 0, bool ReplacePalette = false);
virtual 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);
virtual void DrawRectangle(int x1, int y1, int x2, int y2, tColor Color);
virtual void DrawEllipse(int x1, int y1, int x2, int y2, tColor Color, int Quadrants = 0);
@@ -246,10 +246,10 @@
cOsd::DrawPixel(x, y, Color);
}
- void cXineOsd::DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg /* = 0 */, tColor ColorBg /* = 0 */)
+ void cXineOsd::DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg /* = 0 */, tColor ColorBg /* = 0 */, bool ReplacePalette)
{
cMutexLock osdLock(&m_osdMutex);
- cOsd::DrawBitmap(x, y, Bitmap, ColorFg, ColorBg);
+ cOsd::DrawBitmap(x, y, Bitmap, ColorFg, ColorBg, ReplacePalette);
// fprintf(stderr, "drawbitmap\n");
}