Mesa (pipe-video): vdpau: get at least the very basic mixer functions working
Christian König
deathsimple at kemper.freedesktop.org
Fri Apr 8 23:40:17 UTC 2011
Module: Mesa
Branch: pipe-video
Commit: f3ead63e7023f61557cb92be30cae6fe9efb280a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f3ead63e7023f61557cb92be30cae6fe9efb280a
Author: Christian König <deathsimple at vodafone.de>
Date: Fri Apr 8 22:13:46 2011 +0200
vdpau: get at least the very basic mixer functions working
---
src/gallium/state_trackers/vdpau/mixer.c | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c
index 86ac099..2fe0f1c 100644
--- a/src/gallium/state_trackers/vdpau/mixer.c
+++ b/src/gallium/state_trackers/vdpau/mixer.c
@@ -111,11 +111,28 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer,
uint32_t layer_count,
VdpLayer const *layers)
{
- if (!(background_source_rect && video_surface_past && video_surface_future &&
- video_source_rect && destination_rect && destination_video_rect && layers))
- return VDP_STATUS_INVALID_POINTER;
+ vlVdpVideoMixer *vmixer;
+ vlVdpSurface *surf;
+ vlVdpOutputSurface *dst;
+
+ vmixer = vlGetDataHTAB(mixer);
+ if (!vmixer)
+ return VDP_STATUS_INVALID_HANDLE;
+
+ surf = vlGetDataHTAB(video_surface_current);
+ if (!surf)
+ return VDP_STATUS_INVALID_HANDLE;
+
+ dst = vlGetDataHTAB(destination_surface);
+ if (!dst)
+ return VDP_STATUS_INVALID_HANDLE;
- return VDP_STATUS_NO_IMPLEMENTATION;
+ vmixer->compositor->clear_layers(vmixer->compositor);
+ vmixer->compositor->set_buffer_layer(vmixer->compositor, 0, surf->video_buffer, NULL, NULL);
+ vmixer->compositor->render_picture(vmixer->compositor, PIPE_MPEG12_PICTURE_TYPE_FRAME,
+ dst->surface, NULL, NULL);
+
+ return VDP_STATUS_OK;
}
VdpStatus
More information about the mesa-commit
mailing list