[vlc-commits] mediacodec: rename configure into prepare

Alexandre Janniaux git at videolan.org
Wed Jul 11 15:29:36 CEST 2018


vlc | branch: master | Alexandre Janniaux <alexandre.janniaux at gmail.com> | Mon Jul  9 18:30:08 2018 +0200| [68fee62f28439bab38551d040232b585886c51e5] | committer: Jean-Baptiste Kempf

mediacodec: rename configure into prepare

mc_api.configure only try to get configuration option but doesn't
actually neither create nor configure the codec.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68fee62f28439bab38551d040232b585886c51e5
---

 modules/codec/omxil/mediacodec.c     | 4 ++--
 modules/codec/omxil/mediacodec.h     | 4 ++--
 modules/codec/omxil/mediacodec_jni.c | 6 +++---
 modules/codec/omxil/mediacodec_ndk.c | 6 +++---
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index 5fd09e987d..284bd5854b 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -643,14 +643,14 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
         free(p_sys);
         return VLC_EGENERIC;
     }
-    if (p_sys->api.configure(&p_sys->api, i_profile) != 0)
+    if (p_sys->api.prepare(&p_sys->api, i_profile) != 0)
     {
         /* If the device can't handle video/wvc1,
          * it can probably handle video/x-ms-wmv */
         if (!strcmp(mime, "video/wvc1") && p_dec->fmt_in.i_codec == VLC_CODEC_VC1)
         {
             p_sys->api.psz_mime = "video/x-ms-wmv";
-            if (p_sys->api.configure(&p_sys->api, i_profile) != 0)
+            if (p_sys->api.prepare(&p_sys->api, i_profile) != 0)
             {
                 p_sys->api.clean(&p_sys->api);
                 free(p_sys);
diff --git a/modules/codec/omxil/mediacodec.h b/modules/codec/omxil/mediacodec.h
index dab785d935..fe8804cf8e 100644
--- a/modules/codec/omxil/mediacodec.h
+++ b/modules/codec/omxil/mediacodec.h
@@ -116,7 +116,7 @@ struct mc_api
     enum es_format_category_e i_cat;
     vlc_fourcc_t    i_codec;
 
-    /* Set after configure */
+    /* Set after prepare */
     int  i_quirks;
     char *psz_name;
     bool b_support_rotation;
@@ -125,7 +125,7 @@ struct mc_api
     bool b_direct_rendering;
 
     void (*clean)(mc_api *);
-    int (*configure)(mc_api *, int i_profile);
+    int (*prepare)(mc_api *, int i_profile);
     int (*start)(mc_api *, union mc_api_args *p_args);
     int (*stop)(mc_api *);
     int (*flush)(mc_api *);
diff --git a/modules/codec/omxil/mediacodec_jni.c b/modules/codec/omxil/mediacodec_jni.c
index fc753b715c..0868086fbb 100644
--- a/modules/codec/omxil/mediacodec_jni.c
+++ b/modules/codec/omxil/mediacodec_jni.c
@@ -983,9 +983,9 @@ static void Clean(mc_api *api)
 }
 
 /*****************************************************************************
- * Configure
+ * Prepare
  *****************************************************************************/
-static int Configure(mc_api *api, int i_profile)
+static int Prepare(mc_api *api, int i_profile)
 {
     free(api->psz_name);
     bool b_adaptive;
@@ -1021,7 +1021,7 @@ int MediaCodecJni_Init(mc_api *api)
         return MC_API_ERROR;
 
     api->clean = Clean;
-    api->configure = Configure;
+    api->prepare = Prepare;
     api->start = Start;
     api->stop = Stop;
     api->flush = Flush;
diff --git a/modules/codec/omxil/mediacodec_ndk.c b/modules/codec/omxil/mediacodec_ndk.c
index e3ea084433..bccd380681 100644
--- a/modules/codec/omxil/mediacodec_ndk.c
+++ b/modules/codec/omxil/mediacodec_ndk.c
@@ -601,9 +601,9 @@ static void Clean(mc_api *api)
 }
 
 /*****************************************************************************
- * Configure
+ * Prepare
  *****************************************************************************/
-static int Configure(mc_api * api, int i_profile)
+static int Prepare(mc_api * api, int i_profile)
 {
     free(api->psz_name);
     bool b_adaptive;
@@ -633,7 +633,7 @@ int MediaCodecNdk_Init(mc_api *api)
         return MC_API_ERROR;
 
     api->clean = Clean;
-    api->configure = Configure;
+    api->prepare = Prepare;
     api->start = Start;
     api->stop = Stop;
     api->flush = Flush;



More information about the vlc-commits mailing list