Return the status when running the pipeline
authorXiang, Haihao <haihao.xiang@intel.com>
Fri, 8 Mar 2013 02:59:48 +0000 (10:59 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Fri, 15 Mar 2013 07:45:28 +0000 (15:45 +0800)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
src/gen6_mfd.c
src/gen75_mfd.c
src/gen75_picture_process.c
src/gen7_mfd.c
src/i965_drv_video.c
src/i965_drv_video.h
src/i965_encoder.c
src/i965_media.c
src/i965_post_processing.c

index 130fec1..7513dda 100755 (executable)
@@ -1978,7 +1978,7 @@ gen6_mfd_vc1_decode_picture(VADriverContextP ctx,
     intel_batchbuffer_flush(batch);
 }
 
-static void 
+static VAStatus
 gen6_mfd_decode_picture(VADriverContextP ctx, 
                         VAProfile profile, 
                         union codec_state *codec_state,
@@ -2012,6 +2012,8 @@ gen6_mfd_decode_picture(VADriverContextP ctx,
         assert(0);
         break;
     }
+
+    return VA_STATUS_SUCCESS;
 }
 
 static void
index 6a20ebf..37ca17f 100644 (file)
@@ -3320,7 +3320,7 @@ gen75_mfd_jpeg_decode_picture(VADriverContextP ctx,
     intel_batchbuffer_flush(batch);
 }
 
-static void 
+static VAStatus
 gen75_mfd_decode_picture(VADriverContextP ctx, 
                         VAProfile profile, 
                         union codec_state *codec_state,
@@ -3360,6 +3360,8 @@ gen75_mfd_decode_picture(VADriverContextP ctx,
         assert(0);
         break;
     }
+
+    return VA_STATUS_SUCCESS;
 }
 
 static void
index 9b7284c..6e10de0 100644 (file)
@@ -108,7 +108,7 @@ gen75_vpp_gpe(VADriverContextP ctx,
      return va_status;     
 }
 
-void 
+VAStatus 
 gen75_proc_picture(VADriverContextP ctx,
                    VAProfile profile,
                    union codec_state *codec_state,
@@ -175,6 +175,8 @@ gen75_proc_picture(VADriverContextP ctx,
          }
          gen75_vpp_vebox(ctx, proc_ctx);
     }     
+
+    return VA_STATUS_SUCCESS;
 }
 
 static void 
index 0d583b5..477ca32 100755 (executable)
@@ -2749,7 +2749,7 @@ gen7_mfd_jpeg_decode_picture(VADriverContextP ctx,
     intel_batchbuffer_flush(batch);
 }
 
-static void 
+static VAStatus
 gen7_mfd_decode_picture(VADriverContextP ctx, 
                         VAProfile profile, 
                         union codec_state *codec_state,
@@ -2789,6 +2789,8 @@ gen7_mfd_decode_picture(VADriverContextP ctx,
         assert(0);
         break;
     }
+
+    return VA_STATUS_SUCCESS;
 }
 
 static void
index fc659a2..7de8478 100755 (executable)
@@ -2007,9 +2007,7 @@ i965_EndPicture(VADriverContextP ctx, VAContextID context)
     }
 
     assert(obj_context->hw_context->run);
-    obj_context->hw_context->run(ctx, obj_config->profile, &obj_context->codec_state, obj_context->hw_context);
-
-    return VA_STATUS_SUCCESS;
+    return obj_context->hw_context->run(ctx, obj_config->profile, &obj_context->codec_state, obj_context->hw_context);
 }
 
 VAStatus 
index 3798e9e..37f8697 100644 (file)
@@ -154,10 +154,10 @@ union codec_state
 
 struct hw_context
 {
-    void (*run)(VADriverContextP ctx, 
-                VAProfile profile, 
-                union codec_state *codec_state,
-                struct hw_context *hw_context);
+    VAStatus (*run)(VADriverContextP ctx, 
+                    VAProfile profile, 
+                    union codec_state *codec_state,
+                    struct hw_context *hw_context);
     void (*destroy)(void *);
     struct intel_batchbuffer *batch;
 };
index d6ffaa3..72ea548 100644 (file)
@@ -121,7 +121,7 @@ intel_encoder_check_yuv_surface(VADriverContextP ctx,
     encoder_context->is_tmp_id = 1;
 }
 
-static void 
+static VAStatus
 intel_encoder_end_picture(VADriverContextP ctx, 
                           VAProfile profile, 
                           union codec_state *codec_state,
@@ -139,6 +139,7 @@ intel_encoder_end_picture(VADriverContextP ctx,
 
     if (vaStatus == VA_STATUS_SUCCESS)
         encoder_context->mfc_pipeline(ctx, profile, encode_state, encoder_context);
+    return VA_STATUS_SUCCESS;
 }
 
 static void
index d1764c0..d0d0a24 100644 (file)
@@ -268,7 +268,7 @@ i965_media_decode_init(VADriverContextP ctx,
     }
 }
 
-static void 
+static VAStatus
 i965_media_decode_picture(VADriverContextP ctx, 
                           VAProfile profile, 
                           union codec_state *codec_state,
@@ -282,6 +282,8 @@ i965_media_decode_picture(VADriverContextP ctx,
     media_context->media_states_setup(ctx, decode_state, media_context);
     i965_media_pipeline_setup(ctx, decode_state, media_context);
     intel_batchbuffer_flush(hw_context->batch);
+
+    return VA_STATUS_SUCCESS;
 }
 
 static void
index 20f5562..0d5e4f5 100755 (executable)
@@ -5167,7 +5167,7 @@ static const int proc_frame_to_pp_frame[3] = {
     I965_SURFACE_FLAG_BOTTOME_FIELD_FIRST
 };
 
-void 
+VAStatus 
 i965_proc_picture(VADriverContextP ctx, 
                   VAProfile profile, 
                   union codec_state *codec_state,
@@ -5364,6 +5364,8 @@ i965_proc_picture(VADriverContextP ctx,
                              num_tmp_surfaces);
 
     intel_batchbuffer_flush(hw_context->batch);
+
+    return VA_STATUS_SUCCESS;
 }
 
 static void