[Libva] [PATCH 1/3] Add one callback function field for hw_codec_info to initialize hw_codec_info

Zhao Yakui yakui.zhao at intel.com
Wed Sep 10 18:22:14 PDT 2014


Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
---
 src/i965_drv_video.c |    3 +++
 src/i965_drv_video.h |    1 +
 2 files changed, 4 insertions(+)

diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 3aeb77a..3acc263 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -5505,6 +5505,9 @@ i965_driver_data_init(VADriverContextP ctx)
     if (!i965->codec_info)
         return false;
 
+    if (i965->codec_info->hw_codec_hook)
+        i965->codec_info->hw_codec_hook(ctx, i965->codec_info);
+
     if (object_heap_init(&i965->config_heap,
                          sizeof(struct object_config),
                          CONFIG_ID_OFFSET))
diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h
index 97181db..350a222 100644
--- a/src/i965_drv_video.h
+++ b/src/i965_drv_video.h
@@ -337,6 +337,7 @@ struct hw_codec_info
     struct hw_context *(*proc_hw_context_init)(VADriverContextP, struct object_config *);
     bool (*render_init)(VADriverContextP);
     void (*post_processing_context_init)(VADriverContextP, void *, struct intel_batchbuffer *);
+    void (*hw_codec_hook)(VADriverContextP, struct hw_codec_info *);
 
     int max_width;
     int max_height;
-- 
1.7.10.1



More information about the Libva mailing list