Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
4f33bf88
Commit
4f33bf88
authored
Aug 21, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of the symbols structure and use the OS linker
with --enable-shared-libvlc
parent
9fbd6f2e
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
472 additions
and
13 deletions
+472
-13
configure.ac
configure.ac
+3
-0
include/modules.h
include/modules.h
+2
-0
include/vlc_symbols.h
include/vlc_symbols.h
+418
-4
src/misc/modules.c
src/misc/modules.c
+7
-1
vlc-api.pl
vlc-api.pl
+42
-8
No files found.
configure.ac
View file @
4f33bf88
...
...
@@ -4433,6 +4433,9 @@ AC_ARG_ENABLE(shared-libvlc,
,[shared_libvlc=no])
AM_CONDITIONAL(BUILD_SHARED, [test "${shared_libvlc}" != "no"])
AS_IF([test "${shared_libvlc}" != "no"], [
AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
])
pic=no
AS_IF([test "${shared_libvlc}" != "no"], [pic=pic])
...
...
include/modules.h
View file @
4f33bf88
...
...
@@ -55,7 +55,9 @@ struct module_bank_t
VLC_COMMON_MEMBERS
int
i_usage
;
#ifndef HAVE_SHARED_LIBVLC
module_symbols_t
symbols
;
#endif
vlc_bool_t
b_main
;
vlc_bool_t
b_builtins
;
...
...
include/vlc_symbols.h
View file @
4f33bf88
This diff is collapsed.
Click to expand it.
src/misc/modules.c
View file @
4f33bf88
...
...
@@ -194,7 +194,7 @@ void __module_InitBank( vlc_object_t *p_this )
/*
* Store the symbols to be exported
*/
#if
def HAVE_DYNAMIC_PLUGINS
#if
defined (HAVE_DYNAMIC_PLUGINS) && !defined (HAVE_SHARED_LIBVLC)
STORE_SYMBOLS
(
&
p_bank
->
symbols
);
#endif
...
...
@@ -1090,7 +1090,9 @@ static module_t * AllocatePlugin( vlc_object_t * p_this, char * psz_file )
/* We need to fill these since they may be needed by CallEntry() */
p_module
->
psz_filename
=
psz_file
;
p_module
->
handle
=
handle
;
#ifndef HAVE_SHARED_LIBVLC
p_module
->
p_symbols
=
&
p_this
->
p_libvlc
->
p_module_bank
->
symbols
;
#endif
p_module
->
b_loaded
=
VLC_TRUE
;
/* Initialize the module: fill p_module, default config */
...
...
@@ -2146,7 +2148,9 @@ static void CacheMerge( vlc_object_t *p_this, module_t *p_cache,
p_cache
->
pf_activate
=
p_module
->
pf_activate
;
p_cache
->
pf_deactivate
=
p_module
->
pf_deactivate
;
#ifndef HAVE_SHARED_LIBVLC
p_cache
->
p_symbols
=
p_module
->
p_symbols
;
#endif
p_cache
->
handle
=
p_module
->
handle
;
for
(
i_submodule
=
0
;
i_submodule
<
p_module
->
i_children
;
i_submodule
++
)
...
...
@@ -2155,7 +2159,9 @@ static void CacheMerge( vlc_object_t *p_this, module_t *p_cache,
module_t
*
p_cchild
=
(
module_t
*
)
p_cache
->
pp_children
[
i_submodule
];
p_cchild
->
pf_activate
=
p_child
->
pf_activate
;
p_cchild
->
pf_deactivate
=
p_child
->
pf_deactivate
;
#ifndef HAVE_SHARED_LIBVLC
p_cchild
->
p_symbols
=
p_child
->
p_symbols
;
#endif
}
p_cache
->
b_loaded
=
VLC_TRUE
;
...
...
vlc-api.pl
View file @
4f33bf88
...
...
@@ -52,6 +52,30 @@ print { $new_sym }
"
#ifndef __VLC_SYMBOLS_H
\n
"
.
"
# define __VLC_SYMBOLS_H
\n
"
.
"
\n
"
.
"
# ifdef HAVE_SHARED_LIBVLC
\n
"
.
"
/*
\n
"
.
"
* In an ideal world, plugins would include all the headers they need.
\n
"
.
"
* But of course, many, if not all, of them don't, so we have to make sure
\n
"
.
"
* the while libvlc API is defined here in any case when included from a
\n
"
.
"
* plugin.
\n
"
.
"
*/
\n
"
.
"
# ifdef __PLUGIN__
\n
"
.
"
# ifdef __cplusplus
\n
"
.
"
extern
\"
C
\"
{
\n
"
.
"
# endif
\n
";
foreach
(
keys
%
new_APIs
)
{
print
{
$new_sym
}
$new_APIs
{
$_
}[
0
]
.
"
$_
(
"
.
$new_APIs
{
$_
}[
1
]
.
"
);
\n
";
}
print
{
$new_sym
}
"
# ifdef __cplusplus
\n
"
.
"
}
\n
"
.
"
# endif
\n
"
.
"
# endif /* __PLUGIN__ */
\n
"
.
"
# else /* HAVE_LIBVLC_SHARED */
\n
"
.
"
/*
\n
"
.
"
* This is the big VLC API structure for plugins :
\n
"
.
"
* Changing its layout breaks plugin's binary compatibility,
\n
"
.
...
...
@@ -70,15 +94,24 @@ my $changes = 0;
#
my
@API
;
my
@deprecated_API
;
my
$parse
=
0
;
open
my
$oldfd
,
"
<
$srcdir
/include/vlc_symbols.h
";
while
(
<
$oldfd
>
)
{
if
(
/^ void \*(\w*)_deprecated;$/
)
if
(
/^struct module_symbols_t/
)
{
$parse
=
1
;
}
elsif
(
$parse
==
0
)
{
if
(
defined
$new_APIs
{
$2
})
}
elsif
(
/^ void \*(\w*)_deprecated;$/
)
{
if
(
defined
$new_APIs
{
$1
})
{
print
"
[info] $
2
was RESTORED!
\n
";
print
"
[info] $
1
was RESTORED!
\n
";
print
{
$new_sym
}
"
"
.
$new_APIs
{
$1
}[
0
]
.
"
(*$1_inner) (
"
.
$new_APIs
{
$1
}[
1
]
.
"
);
\n
";
delete
$new_APIs
{
$1
};
...
...
@@ -143,19 +176,19 @@ foreach (keys %new_APIs)
#
print
{
$new_sym
}
"
};
\n
"
.
"
# if defined (__PLUGIN__)
\n
";
"
#
if defined (__PLUGIN__)
\n
";
foreach
(
@API
)
{
print
{
$new_sym
}
"
# define
$_
(p_symbols)->
${_}
_inner
\n
";
}
print
{
$new_sym
}
"
# elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
\n
"
.
"
#
elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
\n
"
.
"
/******************************************************************
\n
"
.
"
* STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
\n
"
.
"
******************************************************************/
\n
"
.
"
# define STORE_SYMBOLS( p_symbols )
\\\n
";
"
#
define STORE_SYMBOLS( p_symbols )
\\\n
";
foreach
(
@API
)
{
...
...
@@ -168,7 +201,8 @@ foreach (@deprecated_API)
print
{
$new_sym
}
"
\n
"
.
"
# endif /* __PLUGIN__ */
\n
"
.
"
# endif /* __PLUGIN__ */
\n
"
.
"
# endif /* HAVE_SHARED_LIBVLC */
\n
"
.
"
#endif /* __VLC_SYMBOLS_H */
\n
";
close
$new_sym
;
...
...
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