[vlc-devel] [PATCH 2/4] core: dec-dev: add vlc_decoder_device_GetName()
Thomas Guillem
thomas at gllm.fr
Thu Jan 16 17:41:35 CET 2020
Returns the name of the decoder device module. It will be used by the vout in
next commits.
---
src/input/decoder_helpers.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
index e7926901a85..824bf17a664 100644
--- a/src/input/decoder_helpers.c
+++ b/src/input/decoder_helpers.c
@@ -169,6 +169,7 @@ void decoder_AbortPictures(decoder_t *dec, bool abort)
struct vlc_decoder_device_priv
{
struct vlc_decoder_device device;
+ const char *name;
vlc_atomic_rc_t rc;
};
@@ -202,6 +203,10 @@ vlc_decoder_device_Create(vlc_object_t *o, const char *name,
vlc_object_delete(&priv->device);
return NULL;
}
+
+ priv->name = module_get_name(module, false);
+ assert(priv->name);
+
assert(priv->device.ops != NULL);
vlc_atomic_rc_init(&priv->rc);
return &priv->device;
@@ -230,6 +235,14 @@ vlc_decoder_device_Release(vlc_decoder_device *device)
}
}
+const char *
+vlc_decoder_device_GetName(vlc_decoder_device *device)
+{
+ struct vlc_decoder_device_priv *priv =
+ container_of(device, struct vlc_decoder_device_priv, device);
+ return priv->name;
+}
+
/* video context */
struct vlc_video_context
--
2.20.1
More information about the vlc-devel
mailing list