Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
f95f8bd6
Commit
f95f8bd6
authored
Aug 15, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modules/meta_engine/luameta.c: Add resolve_xml_special_chars and decode_uri to the lua env.
parent
51880eb1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
modules/meta_engine/luameta.c
modules/meta_engine/luameta.c
+32
-0
share/luameta/README.txt
share/luameta/README.txt
+3
-0
No files found.
modules/meta_engine/luameta.c
View file @
f95f8bd6
...
@@ -31,6 +31,8 @@
...
@@ -31,6 +31,8 @@
#include <vlc_input.h>
#include <vlc_input.h>
#include <vlc_playlist.h>
#include <vlc_playlist.h>
#include <vlc_meta.h>
#include <vlc_meta.h>
#include <vlc_url.h>
#include <vlc_strings.h>
#include <vlc_stream.h>
#include <vlc_stream.h>
#include <vlc_charset.h>
#include <vlc_charset.h>
...
@@ -139,6 +141,34 @@ static int vlclua_stream_delete( lua_State *p_state )
...
@@ -139,6 +141,34 @@ static int vlclua_stream_delete( lua_State *p_state )
return
1
;
return
1
;
}
}
static
int
vlclua_decode_uri
(
lua_State
*
p_state
)
{
int
i
=
lua_gettop
(
p_state
);
if
(
!
i
)
return
0
;
const
char
*
psz_cstring
=
lua_tostring
(
p_state
,
1
);
if
(
!
psz_cstring
)
return
0
;
char
*
psz_string
=
strdup
(
psz_cstring
);
lua_pop
(
p_state
,
i
);
decode_URI
(
psz_string
);
lua_pushstring
(
p_state
,
psz_string
);
free
(
psz_string
);
return
1
;
}
static
int
vlclua_resolve_xml_special_chars
(
lua_State
*
p_state
)
{
int
i
=
lua_gettop
(
p_state
);
if
(
!
i
)
return
0
;
const
char
*
psz_cstring
=
lua_tostring
(
p_state
,
1
);
if
(
!
psz_cstring
)
return
0
;
char
*
psz_string
=
strdup
(
psz_cstring
);
lua_pop
(
p_state
,
i
);
resolve_xml_special_chars
(
psz_string
);
lua_pushstring
(
p_state
,
psz_string
);
free
(
psz_string
);
return
1
;
}
static
int
vlclua_msg_dbg
(
lua_State
*
p_state
)
static
int
vlclua_msg_dbg
(
lua_State
*
p_state
)
{
{
vlc_object_t
*
p_this
=
vlclua_get_this
(
p_state
);
vlc_object_t
*
p_this
=
vlclua_get_this
(
p_state
);
...
@@ -187,6 +217,8 @@ static luaL_Reg p_reg[] =
...
@@ -187,6 +217,8 @@ static luaL_Reg p_reg[] =
{
"stream_read"
,
vlclua_stream_read
},
{
"stream_read"
,
vlclua_stream_read
},
{
"stream_readline"
,
vlclua_stream_readline
},
{
"stream_readline"
,
vlclua_stream_readline
},
{
"stream_delete"
,
vlclua_stream_delete
},
{
"stream_delete"
,
vlclua_stream_delete
},
{
"decode_uri"
,
vlclua_decode_uri
},
{
"resolve_xml_special_chars"
,
vlclua_resolve_xml_special_chars
},
{
"msg_dbg"
,
vlclua_msg_dbg
},
{
"msg_dbg"
,
vlclua_msg_dbg
},
{
"msg_warn"
,
vlclua_msg_warn
},
{
"msg_warn"
,
vlclua_msg_warn
},
{
"msg_err"
,
vlclua_msg_err
},
{
"msg_err"
,
vlclua_msg_err
},
...
...
share/luameta/README.txt
View file @
f95f8bd6
...
@@ -39,6 +39,9 @@ VLC defines a global vlc object with the following members:
...
@@ -39,6 +39,9 @@ VLC defines a global vlc object with the following members:
* vlc.stream_delete
* vlc.stream_delete
* vlc.stream_readline
* vlc.stream_readline
* vlc.stream_read
* vlc.stream_read
* vlc.decode_uri( <string> ): decode %xy characters in a string.
* vlc.resolve_xml_special_chars( <string> ): decode &abc; characters in a
string.
* vlc.msg_dbg( <string> ): print a debug message.
* vlc.msg_dbg( <string> ): print a debug message.
* vlc.msg_warn( <string> ): print a warning message.
* vlc.msg_warn( <string> ): print a warning message.
* vlc.msg_err( <string> ): print an error message.
* vlc.msg_err( <string> ): print an error message.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment