[vlc-commits] commit: support for stream size in imem access module (Kamil Klimek )
git at videolan.org
git at videolan.org
Sun Jul 11 17:33:13 CEST 2010
vlc | branch: master | Kamil Klimek <naresh at tlen.pl> | Mon Jul 5 10:31:44 2010 +0200| [eee7959f60de79984e1c691253e07e3e86c1333a] | committer: Rémi Denis-Courmont
support for stream size in imem access module
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eee7959f60de79984e1c691253e07e3e86c1333a
---
modules/access/imem.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/modules/access/imem.c b/modules/access/imem.c
index 9626831..b6cd589 100644
--- a/modules/access/imem.c
+++ b/modules/access/imem.c
@@ -115,6 +115,10 @@ static const char *cat_texts[] = {
#define RELEASE_LONGTEXT N_(\
"Address of the release callback function")
+#define SIZE_TEXT N_("Size")
+#define SIZE_LONGTEXT N_(\
+ "Size of stream in bytes")
+
vlc_module_begin()
set_shortname(N_("Memory input"))
set_description(N_("Memory input"))
@@ -170,6 +174,10 @@ vlc_module_begin()
change_private()
change_safe()
+ add_integer ("imem-size", 0, NULL, SIZE_TEXT, SIZE_LONGTEXT, true)
+ change_private()
+ change_safe()
+
add_shortcut("imem")
set_capability("access_demux", 0)
set_callbacks(OpenDemux, CloseDemux)
@@ -311,6 +319,7 @@ static int OpenAccess(vlc_object_t *object)
access->pf_block = Block;
access->pf_seek = NULL;
access->p_sys = (access_sys_t*)sys;
+ access->info.i_size = var_InheritInteger(object, "imem-size");
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list