[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:34:21 CEST 2010
vlc/vlc-1.1 | branch: master | Kamil Klimek <naresh at tlen.pl> | Mon Jul 5 10:31:44 2010 +0200| [a986f80932affef9c9bf7a8eaa50dca1ba686806] | committer: Rémi Denis-Courmont
support for stream size in imem access module
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
(cherry picked from commit eee7959f60de79984e1c691253e07e3e86c1333a)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=a986f80932affef9c9bf7a8eaa50dca1ba686806
---
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 035f704..25cd4fb 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)
@@ -315,6 +323,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