Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
cdcd09f9
Commit
cdcd09f9
authored
Jan 19, 2011
by
Jean-Philippe André
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extensions: support embbeded icon data
In Lua files, embed an image file (PNG, ...) in a string.
parent
b4269ba7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
include/vlc_extensions.h
include/vlc_extensions.h
+2
-0
modules/misc/lua/extension.c
modules/misc/lua/extension.c
+14
-0
No files found.
include/vlc_extensions.h
View file @
cdcd09f9
...
...
@@ -43,6 +43,8 @@ typedef struct extension_t {
char
*
psz_url
;
/**< A URL to the official page (ro) */
char
*
psz_description
;
/**< Full description (ro) */
char
*
psz_shortdescription
;
/**< Short description (eg. 1 line) (ro) */
char
*
p_icondata
;
/**< Embedded data for the icon (ro) */
int
i_icondata_size
;
/**< Size of that data */
extension_sys_t
*
p_sys
;
/**< Reserved for the manager module */
}
extension_t
;
...
...
modules/misc/lua/extension.c
View file @
cdcd09f9
...
...
@@ -357,6 +357,20 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_script,
lua_getfield
(
L
,
-
1
,
"version"
);
p_ext
->
psz_version
=
luaL_strdupornull
(
L
,
-
1
);
lua_pop
(
L
,
1
);
/* Get icon data */
lua_getfield
(
L
,
-
1
,
"icon"
);
if
(
!
lua_isnil
(
L
,
-
1
)
&&
lua_isstring
(
L
,
-
1
)
)
{
int
len
=
lua_strlen
(
L
,
-
1
);
p_ext
->
p_icondata
=
malloc
(
len
);
if
(
p_ext
->
p_icondata
)
{
p_ext
->
i_icondata_size
=
len
;
memcpy
(
p_ext
->
p_icondata
,
lua_tostring
(
L
,
-
1
),
len
);
}
}
lua_pop
(
L
,
1
);
}
else
{
...
...
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