[vlc-devel] [PATCH v2 1/2] mediacodec: rename configure into prepare
Alexandre Janniaux
alexandre.janniaux at gmail.com
Mon Jul 9 18:30:08 CEST 2018
mc_api.configure only try to get configuration option but doesn't
actually neither create nor configure the codec.
---
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 0090182bcf..3d4a50e37c 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -635,14 +635,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 628a3a022d..431f93a916 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 2ef6f60637..b8bfc5a08b 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 3d782252e5..bc876acb07 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;
--
2.18.0
More information about the vlc-devel
mailing list