[vlc-commits] modules: remove unused parameter
Rémi Denis-Courmont
git at videolan.org
Mon Mar 4 21:05:47 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Mar 4 21:10:06 2019 +0200| [a951a8d24cb2c6257aa9fb6496f6b302ae823898] | committer: Rémi Denis-Courmont
modules: remove unused parameter
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a951a8d24cb2c6257aa9fb6496f6b302ae823898
---
include/vlc_modules.h | 5 +----
modules/audio_output/mmdevice.c | 2 +-
modules/audio_output/winstore.c | 2 +-
modules/codec/avcodec/va.c | 2 +-
src/input/decoder_helpers.c | 3 +--
src/modules/modules.c | 6 ++----
src/video_output/display.c | 4 ++--
src/video_output/opengl.c | 2 +-
8 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/include/vlc_modules.h b/include/vlc_modules.h
index b4d1b3200f..b047b1ac57 100644
--- a/include/vlc_modules.h
+++ b/include/vlc_modules.h
@@ -38,10 +38,7 @@ typedef void (*vlc_deactivate_t)(void *func, va_list args);
VLC_API module_t * vlc_module_load( vlc_object_t *obj, const char *cap, const char *name, bool strict, vlc_activate_t probe, ... ) VLC_USED;
#define vlc_module_load(o, c, n, ...) \
vlc_module_load(VLC_OBJECT(o), c, n, __VA_ARGS__)
-VLC_API void vlc_module_unload( vlc_object_t *obj, module_t *,
- vlc_deactivate_t deinit, ... );
-#define vlc_module_unload(o, m, ...) \
- vlc_module_unload(VLC_OBJECT(o), m, __VA_ARGS__)
+VLC_API void vlc_module_unload(module_t *, vlc_deactivate_t deinit, ... );
VLC_API module_t * module_need( vlc_object_t *, const char *, const char *, bool ) VLC_USED;
#define module_need(a,b,c,d) module_need(VLC_OBJECT(a),b,c,d)
diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index 656a4a243d..294561552c 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -1242,7 +1242,7 @@ static void Stop(audio_output_t *aout)
assert(sys->stream != NULL);
EnterMTA();
- vlc_module_unload(sys->stream, sys->module, aout_stream_Stop, sys->stream);
+ vlc_module_unload(sys->module, aout_stream_Stop, sys->stream);
LeaveMTA();
vlc_object_release(sys->stream);
diff --git a/modules/audio_output/winstore.c b/modules/audio_output/winstore.c
index ea1688e90e..22f5c4614e 100644
--- a/modules/audio_output/winstore.c
+++ b/modules/audio_output/winstore.c
@@ -262,7 +262,7 @@ static void Stop(audio_output_t *aout)
assert (sys->stream != NULL);
EnterMTA();
- vlc_module_unload(sys->stream, sys->module, aout_stream_Stop, sys->stream);
+ vlc_module_unload(sys->module, aout_stream_Stop, sys->stream);
LeaveMTA();
vlc_object_release(sys->stream);
diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c
index daad7c2dd6..d0b0b880d2 100644
--- a/modules/codec/avcodec/va.c
+++ b/modules/codec/avcodec/va.c
@@ -142,6 +142,6 @@ void vlc_va_Delete(vlc_va_t *va, void **hwctx)
{
struct vlc_va_priv *priv = container_of(va, struct vlc_va_priv, va);
- vlc_module_unload(va, priv->module, vlc_va_Stop, va, hwctx);
+ vlc_module_unload(priv->module, vlc_va_Stop, va, hwctx);
vlc_object_release(va);
}
diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
index 0153d33585..d7380fff0c 100644
--- a/src/input/decoder_helpers.c
+++ b/src/input/decoder_helpers.c
@@ -161,8 +161,7 @@ vlc_decoder_device_Release(vlc_decoder_device *device)
container_of(device, struct vlc_decoder_device_priv, device);
if (vlc_atomic_rc_dec(&priv->rc))
{
- vlc_module_unload(device, priv->module, decoder_device_Close,
- device);
+ vlc_module_unload(priv->module, decoder_device_Close, device);
vlc_object_release(device);
}
}
diff --git a/src/modules/modules.c b/src/modules/modules.c
index e7c2a04d68..886cbf65c9 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -284,14 +284,12 @@ done:
return module;
}
-#undef vlc_module_unload
/**
* Deinstantiates a module.
* \param module the module pointer as returned by vlc_module_load()
* \param deinit deactivation callback
*/
-void vlc_module_unload(vlc_object_t *obj, module_t *module,
- vlc_deactivate_t deinit, ...)
+void vlc_module_unload(module_t *module, vlc_deactivate_t deinit, ...)
{
if (module->pf_deactivate != NULL)
{
@@ -346,7 +344,7 @@ void module_unneed(vlc_object_t *obj, module_t *module)
{
msg_Dbg(obj, "removing module \"%s\"", module_get_object(module));
var_Destroy(obj, "module-name");
- vlc_module_unload(obj, module, generic_stop, obj);
+ vlc_module_unload(module, generic_stop, obj);
vlc_objres_clear(obj);
}
diff --git a/src/video_output/display.c b/src/video_output/display.c
index f2e6b26260..e94ef050f9 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -797,7 +797,7 @@ vout_display_t *vout_display_New(vlc_object_t *parent,
if (VoutDisplayCreateRender(vd)) {
if (vd->module != NULL) {
- vlc_module_unload(vd, vd->module, vout_display_stop, vd);
+ vlc_module_unload(vd->module, vout_display_stop, vd);
vlc_objres_clear(VLC_OBJECT(vd));
}
video_format_Clean(&vd->fmt);
@@ -823,7 +823,7 @@ void vout_display_Delete(vout_display_t *vd)
picture_pool_Release(osys->pool);
if (vd->module != NULL) {
- vlc_module_unload(vd, vd->module, vout_display_stop, vd);
+ vlc_module_unload(vd->module, vout_display_stop, vd);
vlc_objres_clear(VLC_OBJECT(vd));
}
diff --git a/src/video_output/opengl.c b/src/video_output/opengl.c
index 5207e2500a..9f43a00d4e 100644
--- a/src/video_output/opengl.c
+++ b/src/video_output/opengl.c
@@ -112,7 +112,7 @@ void vlc_gl_Release(vlc_gl_t *gl)
if (!vlc_atomic_rc_dec(&glpriv->rc))
return;
- vlc_module_unload(gl, gl->module, vlc_gl_stop, gl);
+ vlc_module_unload(gl->module, vlc_gl_stop, gl);
vlc_objres_clear(VLC_OBJECT(gl));
vlc_object_release(gl);
}
More information about the vlc-commits
mailing list