summaryrefslogtreecommitdiff
path: root/video.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-08-13 16:57:36 +0200
committerJohns <johns98@gmx.net>2012-08-13 16:57:36 +0200
commitc07ec82e6dc94020592930f5e6a206ddc1357802 (patch)
tree69224dbdf734f61a4b6b01f53c11c9b6ab9ce700 /video.c
parentecb48a5d637ff1c41001729cbf016e5498601bac (diff)
downloadvdr-plugin-softhddevice-c07ec82e6dc94020592930f5e6a206ddc1357802.tar.gz
vdr-plugin-softhddevice-c07ec82e6dc94020592930f5e6a206ddc1357802.tar.bz2
Fix bug: Can't use software decoder with VDPAU.
Diffstat (limited to 'video.c')
-rw-r--r--video.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/video.c b/video.c
index 5eb4c96..35ea19d 100644
--- a/video.c
+++ b/video.c
@@ -5345,7 +5345,7 @@ static void VdpauCreateSurfaces(VdpauDecoder * decoder, int width, int height)
#ifdef DEBUG
if (!decoder->SurfacesNeeded) {
- Error(_("video/vaapi: surface needed not set\n"));
+ Error(_("video/vdpau: surface needed not set\n"));
decoder->SurfacesNeeded = 3 + VIDEO_SURFACES_MAX;
}
#endif
@@ -7381,14 +7381,8 @@ static void VdpauRenderFrame(VdpauDecoder * decoder,
decoder->InputWidth = video_ctx->width;
decoder->InputHeight = video_ctx->height;
- //
- // detect interlaced input
- //
- Debug(3, "video/vdpau: interlaced %d top-field-first %d\n",
- frame->interlaced_frame, frame->top_field_first);
- // FIXME: I hope this didn't change in the middle of the stream
-
VdpauCleanup(decoder);
+ decoder->SurfacesNeeded = VIDEO_SURFACES_MAX + 2;
VdpauSetupOutput(decoder);
}
//
@@ -7402,6 +7396,7 @@ static void VdpauRenderFrame(VdpauDecoder * decoder,
default:
Fatal(_("video/vdpau: pixel format %d not supported\n"),
video_ctx->pix_fmt);
+ // FIXME: no fatals!
}
// convert ffmpeg order to vdpau
@@ -7421,6 +7416,8 @@ static void VdpauRenderFrame(VdpauDecoder * decoder,
VdpauGetErrorString(status));
}
+ Debug(4, "video/vdpau: sw render hw surface %#08x\n", surface);
+
VdpauQueueSurface(decoder, surface, 1);
}
@@ -9943,6 +9940,19 @@ void VideoSetDevice(const char *device)
}
///
+/// Get video driver name.
+///
+/// @returns name of current video driver.
+///
+const char *VideoGetDriverName(void)
+{
+ if (VideoUsedModule) {
+ return VideoUsedModule->Name;
+ }
+ return "";
+}
+
+///
/// Set video geometry.
///
/// @param geometry [=][<width>{xX}<height>][{+-}<xoffset>{+-}<yoffset>]