From 501d46793f19062c5fb20c8b8d8091b27a7cd19c Mon Sep 17 00:00:00 2001 From: Johns Date: Tue, 14 Jan 2014 14:59:01 +0100 Subject: [PATCH] Fix alternative OSD support with VDPAU bitmap surfaces. --- ChangeLog | 1 + Makefile | 1 + video.c | 22 ++++++++++++++++++---- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d595744..5681c67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/Makefile b/Makefile index 03a86be..3295b36 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/video.c b/video.c index ef6facd..4656397 100644 --- a/video.c +++ b/video.c @@ -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 } ///