Mesa (pipe-video): vdpau: add compositor to mixer

Christian König deathsimple at kemper.freedesktop.org
Fri Apr 8 16:40:11 PDT 2011


Module: Mesa
Branch: pipe-video
Commit: 574ffb440dbd878d51fc9b9794a6396cbe6f75bb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=574ffb440dbd878d51fc9b9794a6396cbe6f75bb

Author: Christian König <deathsimple at vodafone.de>
Date:   Fri Apr  8 20:12:30 2011 +0200

vdpau: add compositor to mixer

---

 src/gallium/state_trackers/vdpau/mixer.c         |    7 ++++++-
 src/gallium/state_trackers/vdpau/vdpau_private.h |    1 +
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c
index 808ff9e..86ac099 100644
--- a/src/gallium/state_trackers/vdpau/mixer.c
+++ b/src/gallium/state_trackers/vdpau/mixer.c
@@ -39,8 +39,9 @@ vlVdpVideoMixerCreate(VdpDevice device,
                       void const *const *parameter_values,
                       VdpVideoMixer *mixer)
 {
-   VdpStatus ret;
    vlVdpVideoMixer *vmixer = NULL;
+   struct pipe_video_context *context;
+   VdpStatus ret;
 
    debug_printf("[VDPAU] Creating VideoMixer\n");
 
@@ -48,11 +49,15 @@ vlVdpVideoMixerCreate(VdpDevice device,
    if (!dev)
       return VDP_STATUS_INVALID_HANDLE;
 
+   context = dev->context->vpipe;
+
    vmixer = CALLOC(1, sizeof(vlVdpVideoMixer));
    if (!vmixer)
       return VDP_STATUS_RESOURCES;
 
    vmixer->device = dev;
+   vmixer->compositor = context->create_compositor(context);
+
    /*
     * TODO: Handle features and parameters
     * */
diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h b/src/gallium/state_trackers/vdpau/vdpau_private.h
index f1f94ea..25f289a 100644
--- a/src/gallium/state_trackers/vdpau/vdpau_private.h
+++ b/src/gallium/state_trackers/vdpau/vdpau_private.h
@@ -189,6 +189,7 @@ typedef struct
 typedef struct
 {
    vlVdpDevice *device;
+   struct pipe_video_compositor *compositor;
 } vlVdpVideoMixer;
 
 typedef struct



More information about the mesa-commit mailing list