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
2a855b13
Commit
2a855b13
authored
May 15, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlc using libvlc
parent
2a227b41
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
24 deletions
+16
-24
src/Makefile.am
src/Makefile.am
+2
-1
src/vlc.c
src/vlc.c
+14
-23
No files found.
src/Makefile.am
View file @
2a855b13
...
@@ -439,7 +439,8 @@ vlc_DEPENDENCIES = $(DATA_win32_rc) libvlc.la
...
@@ -439,7 +439,8 @@ vlc_DEPENDENCIES = $(DATA_win32_rc) libvlc.la
vlc_CFLAGS
=
`
$(VLC_CONFIG)
--cflags
vlc
`
vlc_CFLAGS
=
`
$(VLC_CONFIG)
--cflags
vlc
`
vlc_LDFLAGS
=
`
$(VLC_CONFIG)
--ldflags
vlc
`
vlc_LDFLAGS
=
`
$(VLC_CONFIG)
--ldflags
vlc
`
vlc_LDADD
=
$(DATA_win32_rc)
libvlccore.la
$(LTLIBINTL)
\
# vlc needs libvlccore for locale conversion
vlc_LDADD
=
$(DATA_win32_rc)
libvlc.la libvlccore.la
$(LTLIBINTL)
\
`
$(VLC_CONFIG)
-libs
vlc
`
`
$(VLC_CONFIG)
-libs
vlc
`
if
BUILD_VLC
if
BUILD_VLC
...
...
src/vlc.c
View file @
2a855b13
...
@@ -25,8 +25,6 @@
...
@@ -25,8 +25,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
*****************************************************************************/
#include "config.h"
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include "config.h"
# include "config.h"
#endif
#endif
...
@@ -63,13 +61,13 @@ static void *SigHandler (void *set);
...
@@ -63,13 +61,13 @@ static void *SigHandler (void *set);
*****************************************************************************/
*****************************************************************************/
int
main
(
int
i_argc
,
const
char
*
ppsz_argv
[]
)
int
main
(
int
i_argc
,
const
char
*
ppsz_argv
[]
)
{
{
int
i_ret
,
id
;
int
i_ret
;
setlocale
(
LC_ALL
,
""
);
setlocale
(
LC_ALL
,
""
);
#ifndef __APPLE__
#ifndef __APPLE__
/* This clutters OSX GUI error logs */
/* This clutters OSX GUI error logs */
fprintf
(
stderr
,
"VLC media player %s
\n
"
,
VLC_V
ersion
()
);
fprintf
(
stderr
,
"VLC media player %s
\n
"
,
libvlc_get_v
ersion
()
);
#endif
#endif
#ifdef HAVE_PUTENV
#ifdef HAVE_PUTENV
...
@@ -89,11 +87,6 @@ int main( int i_argc, const char *ppsz_argv[] )
...
@@ -89,11 +87,6 @@ int main( int i_argc, const char *ppsz_argv[] )
/* FIXME: rootwrap (); */
/* FIXME: rootwrap (); */
#endif
#endif
/* Create a libvlc structure */
id
=
VLC_Create
();
if
(
id
<
0
)
return
1
;
#if !defined(WIN32) && !defined(UNDER_CE)
#if !defined(WIN32) && !defined(UNDER_CE)
/* Synchronously intercepted POSIX signals.
/* Synchronously intercepted POSIX signals.
*
*
...
@@ -181,26 +174,24 @@ int main( int i_argc, const char *ppsz_argv[] )
...
@@ -181,26 +174,24 @@ int main( int i_argc, const char *ppsz_argv[] )
else
else
#endif
#endif
{
{
/* Note that FromLocale() can be used before libvlc is initialized */
for
(
int
i
=
0
;
i
<
i_argc
;
i
++
)
for
(
int
i
=
0
;
i
<
i_argc
;
i
++
)
if
((
ppsz_argv
[
i
]
=
FromLocale
(
ppsz_argv
[
i
]))
==
NULL
)
if
((
ppsz_argv
[
i
]
=
FromLocale
(
ppsz_argv
[
i
]))
==
NULL
)
return
1
;
// BOOM!
return
1
;
// BOOM!
}
}
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
/* Initialize libvlc */
/* Initialize libvlc */
i_ret
=
VLC_Init
(
id
,
i_argc
,
ppsz_argv
);
libvlc_instance_t
*
vlc
=
libvlc_new
(
i_argc
,
ppsz_argv
,
&
ex
);
if
(
i_ret
<
0
)
if
(
vlc
!=
NULL
)
{
{
VLC_Destroy
(
0
);
libvlc_run_interface
(
vlc
,
NULL
,
&
ex
);
return
i_ret
==
VLC_EEXITSUCCESS
?
0
:
-
i_ret
;
libvlc_release
(
vlc
)
;
}
}
i_ret
=
libvlc_exception_raised
(
&
ex
);
i_ret
=
VLC_AddIntf
(
0
,
NULL
,
true
,
true
);
libvlc_exception_clear
(
&
ex
);
/* Finish the threads */
VLC_CleanUp
(
0
);
/* Destroy the libvlc structure */
VLC_Destroy
(
0
);
for
(
int
i
=
0
;
i
<
i_argc
;
i
++
)
for
(
int
i
=
0
;
i
<
i_argc
;
i
++
)
LocaleFree
(
ppsz_argv
[
i
]);
LocaleFree
(
ppsz_argv
[
i
]);
...
@@ -216,7 +207,7 @@ int main( int i_argc, const char *ppsz_argv[] )
...
@@ -216,7 +207,7 @@ int main( int i_argc, const char *ppsz_argv[] )
pthread_join
(
sigth
,
NULL
);
pthread_join
(
sigth
,
NULL
);
#endif
#endif
return
-
i_ret
;
return
i_ret
;
}
}
#if !defined(WIN32) && !defined(UNDER_CE)
#if !defined(WIN32) && !defined(UNDER_CE)
...
@@ -261,7 +252,7 @@ static void *SigHandler (void *data)
...
@@ -261,7 +252,7 @@ static void *SigHandler (void *data)
fprintf
(
stderr
,
"signal %d received, terminating vlc - do it "
fprintf
(
stderr
,
"signal %d received, terminating vlc - do it "
"again quickly in case it gets stuck
\n
"
,
i_signal
);
"again quickly in case it gets stuck
\n
"
,
i_signal
);
VLC_Die
(
0
);
//
VLC_Die( 0 );
}
}
else
/* time (NULL) <= abort_time */
else
/* time (NULL) <= abort_time */
{
{
...
...
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