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
47af2aa4
Commit
47af2aa4
authored
Jan 28, 2010
by
Jean-Philippe André
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extensions: export author, version, url and description
parent
dbca7907
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
3 deletions
+61
-3
include/vlc_extensions.h
include/vlc_extensions.h
+9
-2
modules/misc/lua/extension.c
modules/misc/lua/extension.c
+52
-1
No files found.
include/vlc_extensions.h
View file @
47af2aa4
...
@@ -32,10 +32,17 @@ typedef struct extensions_manager_sys_t extensions_manager_sys_t;
...
@@ -32,10 +32,17 @@ typedef struct extensions_manager_sys_t extensions_manager_sys_t;
typedef
struct
extensions_manager_t
extensions_manager_t
;
typedef
struct
extensions_manager_t
extensions_manager_t
;
typedef
struct
extension_sys_t
extension_sys_t
;
typedef
struct
extension_sys_t
extension_sys_t
;
/** Extension descriptor */
/** Extension descriptor
: name, title, author, ...
*/
typedef
struct
extension_t
{
typedef
struct
extension_t
{
char
*
psz_title
;
/**< Display title (ro)
*/
/* Below, (ro) means read-only for the GUI
*/
char
*
psz_name
;
/**< Real name of the extension (ro) */
char
*
psz_name
;
/**< Real name of the extension (ro) */
char
*
psz_title
;
/**< Display title (ro) */
char
*
psz_author
;
/**< Author of the extension (ro) */
char
*
psz_version
;
/**< Version (ro) */
char
*
psz_url
;
/**< A URL to the official page (ro) */
char
*
psz_description
;
/**< Full description (ro) */
extension_sys_t
*
p_sys
;
/**< Reserved for the manager module */
extension_sys_t
*
p_sys
;
/**< Reserved for the manager module */
}
extension_t
;
}
extension_t
;
...
...
modules/misc/lua/extension.c
View file @
47af2aa4
...
@@ -263,6 +263,7 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_script,
...
@@ -263,6 +263,7 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_script,
{
{
if
(
lua_istable
(
L
,
-
1
)
)
if
(
lua_istable
(
L
,
-
1
)
)
{
{
/* Get caps */
lua_getfield
(
L
,
-
1
,
"capabilities"
);
lua_getfield
(
L
,
-
1
,
"capabilities"
);
if
(
lua_istable
(
L
,
-
1
)
)
if
(
lua_istable
(
L
,
-
1
)
)
{
{
...
@@ -301,8 +302,9 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_script,
...
@@ -301,8 +302,9 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_script,
"did not return a table of capabilities."
,
"did not return a table of capabilities."
,
psz_script
);
psz_script
);
}
}
lua_pop
(
L
,
1
);
lua_pop
(
L
,
1
);
/* Get title */
lua_getfield
(
L
,
-
1
,
"title"
);
lua_getfield
(
L
,
-
1
,
"title"
);
if
(
lua_isstring
(
L
,
-
1
)
)
if
(
lua_isstring
(
L
,
-
1
)
)
{
{
...
@@ -315,6 +317,55 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_script,
...
@@ -315,6 +317,55 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_script,
psz_script
);
psz_script
);
p_ext
->
psz_title
=
strdup
(
psz_script
);
p_ext
->
psz_title
=
strdup
(
psz_script
);
}
}
lua_pop
(
L
,
1
);
/* Get author */
lua_getfield
(
L
,
-
1
,
"author"
);
if
(
lua_isstring
(
L
,
-
1
)
)
{
p_ext
->
psz_author
=
strdup
(
luaL_checkstring
(
L
,
-
1
)
);
}
else
{
p_ext
->
psz_author
=
NULL
;
}
lua_pop
(
L
,
1
);
/* Get description */
lua_getfield
(
L
,
-
1
,
"description"
);
if
(
lua_isstring
(
L
,
-
1
)
)
{
p_ext
->
psz_description
=
strdup
(
luaL_checkstring
(
L
,
-
1
)
);
}
else
{
p_ext
->
psz_description
=
NULL
;
}
lua_pop
(
L
,
1
);
/* Get URL */
lua_getfield
(
L
,
-
1
,
"url"
);
if
(
lua_isstring
(
L
,
-
1
)
)
{
p_ext
->
psz_url
=
strdup
(
luaL_checkstring
(
L
,
-
1
)
);
}
else
{
p_ext
->
psz_url
=
NULL
;
}
lua_pop
(
L
,
1
);
/* Get version */
lua_getfield
(
L
,
-
1
,
"version"
);
if
(
lua_isstring
(
L
,
-
1
)
)
{
p_ext
->
psz_version
=
strdup
(
luaL_checkstring
(
L
,
-
1
)
);
}
else
{
p_ext
->
psz_version
=
NULL
;
}
lua_pop
(
L
,
1
);
}
}
else
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