Fix alternative OSD support with VDPAU bitmap surfaces.

This commit is contained in:
Johns 2014-01-14 14:59:01 +01:00
parent 978fc59aba
commit 501d46793f
3 changed files with 20 additions and 4 deletions

View File

@ -1,6 +1,7 @@
User johns
Date:
Fix alternative OSD support with VDPAU bitmap surfaces.
Add support for umlauts in input fields.
Fix compile error with VDR 2.1.3.
Fix bug: memory leak.

View File

@ -37,6 +37,7 @@ CONFIG += -DUSE_PIP # PIP support
#CONFIG += -DUSE_MPEG_COMPLETE # support only complete mpeg packets
#CONFIG += -DH264_EOS_TRICKSPEED # insert seq end packets for trickspeed
#CONDIF += -DDUMP_TRICKSPEED # dump trickspeed packets
CONFIG += -DUSE_BITMAP # VDPAU, use bitmap surface for OSD
CONFIG += -DUSE_VDR_SPU # use VDR SPU decoder.
#CONFIG += -DUSE_SOFTLIMIT # (tobe removed) limit the buffer fill

22
video.c
View File

@ -46,7 +46,7 @@
#define USE_DOUBLEBUFFER ///< use GLX double buffers
//#define USE_VAAPI ///< enable vaapi support
//#define USE_VDPAU ///< enable vdpau support
#define noUSE_BITMAP ///< use vdpau bitmap surface
//#define USE_BITMAP ///< use vdpau bitmap surface
//#define AV_INFO ///< log a/v sync informations
#ifndef AV_INFO_TIME
#define AV_INFO_TIME (50 * 60) ///< a/v info every minute
@ -8024,7 +8024,7 @@ static void VdpauMixOsd(void)
status =
VdpauOutputSurfaceRenderBitmapSurface(VdpauSurfacesRb
[VdpauSurfaceIndex], &output_double_rect,
VdpauOsdOutputSurface[!VdpauOsdSurfaceIndex], &source_rect, NULL,
VdpauOsdBitmapSurface[!VdpauOsdSurfaceIndex], &source_rect, NULL,
VideoTransparentOsd ? &blend_state : NULL,
VDP_OUTPUT_SURFACE_RENDER_ROTATE_0);
if (status != VDP_STATUS_OK) {
@ -8253,15 +8253,29 @@ static void VdpauBlackSurface(VdpauDecoder * decoder)
output_rect.y1 = decoder->VideoHeight;
}
// FIXME: double buffered osd disabled
// VdpauOsdSurfaceIndex always 0 and only 0 valid
#ifdef USE_BITMAP
status =
VdpauOutputSurfaceRenderOutputSurface(VdpauSurfacesRb
VdpauOutputSurfaceRenderBitmapSurface(VdpauSurfacesRb
[VdpauSurfaceIndex], &output_rect,
VdpauOsdOutputSurface[!VdpauOsdSurfaceIndex], &source_rect, NULL, NULL,
VdpauOsdBitmapSurface[VdpauOsdSurfaceIndex], &source_rect, NULL, NULL,
VDP_OUTPUT_SURFACE_RENDER_ROTATE_0);
if (status != VDP_STATUS_OK) {
Error(_("video/vdpau: can't render output surface: %s\n"),
VdpauGetErrorString(status));
}
#else
status =
VdpauOutputSurfaceRenderOutputSurface(VdpauSurfacesRb
[VdpauSurfaceIndex], &output_rect,
VdpauOsdOutputSurface[VdpauOsdSurfaceIndex], &source_rect, NULL, NULL,
VDP_OUTPUT_SURFACE_RENDER_ROTATE_0);
if (status != VDP_STATUS_OK) {
Error(_("video/vdpau: can't render output surface: %s\n"),
VdpauGetErrorString(status));
}
#endif
}
///