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
48d06067
Commit
48d06067
authored
Aug 16, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use var_GetGlobalMutex
parent
4855a761
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
modules/video_output/sdl.c
modules/video_output/sdl.c
+14
-15
No files found.
modules/video_output/sdl.c
View file @
48d06067
...
@@ -115,8 +115,6 @@ vlc_module_begin();
...
@@ -115,8 +115,6 @@ vlc_module_begin();
add_shortcut
(
"sdl"
);
add_shortcut
(
"sdl"
);
add_string
(
"sdl-chroma"
,
NULL
,
NULL
,
CHROMA_TEXT
,
CHROMA_LONGTEXT
,
VLC_TRUE
);
add_string
(
"sdl-chroma"
,
NULL
,
NULL
,
CHROMA_TEXT
,
CHROMA_LONGTEXT
,
VLC_TRUE
);
set_callbacks
(
Open
,
Close
);
set_callbacks
(
Open
,
Close
);
/* XXX: check for conflicts with the SDL audio output */
var_Create
(
p_module
->
p_libvlc_global
,
"sdl"
,
VLC_VAR_MUTEX
);
#if defined( __i386__ ) || defined( __x86_64__ )
#if defined( __i386__ ) || defined( __x86_64__ )
/* On i386, SDL is linked against svgalib */
/* On i386, SDL is linked against svgalib */
linked_with_a_crap_library_which_uses_atexit
();
linked_with_a_crap_library_which_uses_atexit
();
...
@@ -133,29 +131,30 @@ vlc_module_end();
...
@@ -133,29 +131,30 @@ vlc_module_end();
static
int
Open
(
vlc_object_t
*
p_this
)
static
int
Open
(
vlc_object_t
*
p_this
)
{
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vlc_value_t
lockval
;
/* XXX: check for conflicts with the SDL audio output */
vlc_mutex_t
*
lock
=
var_GetGlobalMutex
(
"sdl"
);
#ifdef HAVE_SETENV
#ifdef HAVE_SETENV
char
*
psz_method
;
char
*
psz_method
;
#endif
#endif
var_Get
(
p_this
->
p_libvlc_global
,
"sdl"
,
&
lockval
);
p_vout
->
p_sys
=
malloc
(
sizeof
(
vout_sys_t
)
);
vlc_mutex_lock
(
lockval
.
p_address
);
if
(
p_vout
->
p_sys
==
NULL
)
{
vlc_mutex_unlock
(
lock
);
return
VLC_ENOMEM
;
}
vlc_mutex_lock
(
lock
);
if
(
SDL_WasInit
(
SDL_INIT_VIDEO
)
!=
0
)
if
(
SDL_WasInit
(
SDL_INIT_VIDEO
)
!=
0
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
lock
);
free
(
p_vout
->
p_sys
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
/* Allocate structure */
/* Allocate structure */
p_vout
->
p_sys
=
malloc
(
sizeof
(
vout_sys_t
)
);
if
(
p_vout
->
p_sys
==
NULL
)
{
msg_Err
(
p_vout
,
"out of memory"
);
vlc_mutex_unlock
(
lockval
.
p_address
);
return
VLC_ENOMEM
;
}
p_vout
->
pf_init
=
Init
;
p_vout
->
pf_init
=
Init
;
p_vout
->
pf_end
=
End
;
p_vout
->
pf_end
=
End
;
...
@@ -194,11 +193,11 @@ static int Open ( vlc_object_t *p_this )
...
@@ -194,11 +193,11 @@ static int Open ( vlc_object_t *p_this )
{
{
msg_Err
(
p_vout
,
"cannot initialize SDL (%s)"
,
SDL_GetError
()
);
msg_Err
(
p_vout
,
"cannot initialize SDL (%s)"
,
SDL_GetError
()
);
free
(
p_vout
->
p_sys
);
free
(
p_vout
->
p_sys
);
vlc_mutex_unlock
(
lock
val
.
p_address
);
vlc_mutex_unlock
(
lock
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
vlc_mutex_unlock
(
lock
val
.
p_address
);
vlc_mutex_unlock
(
lock
);
p_vout
->
p_sys
->
b_cursor
=
1
;
p_vout
->
p_sys
->
b_cursor
=
1
;
p_vout
->
p_sys
->
b_cursor_autohidden
=
0
;
p_vout
->
p_sys
->
b_cursor_autohidden
=
0
;
...
...
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