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
ed50ccdc
Commit
ed50ccdc
authored
Sep 28, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a potential race condition between "event thread" and manage() (msw).
parent
9e26639a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
modules/video_output/msw/common.c
modules/video_output/msw/common.c
+3
-0
modules/video_output/msw/events.c
modules/video_output/msw/events.c
+19
-5
modules/video_output/msw/vout.h
modules/video_output/msw/vout.h
+4
-0
No files found.
modules/video_output/msw/common.c
View file @
ed50ccdc
...
...
@@ -187,6 +187,9 @@ void CommonManage( vout_thread_t *p_vout )
vlc_mutex_unlock
(
&
p_vout
->
p_sys
->
lock
);
}
/* */
p_vout
->
p_sys
->
i_changes
|=
EventThreadRetreiveChanges
(
p_vout
->
p_sys
->
p_event
);
/* autoscale toggle */
if
(
p_vout
->
i_changes
&
VOUT_SCALE_CHANGE
)
{
...
...
modules/video_output/msw/events.c
View file @
ed50ccdc
...
...
@@ -240,7 +240,9 @@ static void *EventThread( void *p_this )
break
;
case
WM_LBUTTONDBLCLK
:
p_event
->
p_vout
->
p_sys
->
i_changes
|=
VOUT_FULLSCREEN_CHANGE
;
vlc_mutex_lock
(
&
p_event
->
lock
);
p_event
->
i_changes
|=
VOUT_FULLSCREEN_CHANGE
;
vlc_mutex_unlock
(
&
p_event
->
lock
);
break
;
case
WM_MBUTTONDOWN
:
...
...
@@ -779,7 +781,11 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
#ifdef UNDER_CE
if
(
p_vout
->
p_sys
->
hparent
&&
hwnd
!=
p_vout
->
p_sys
->
hfswnd
&&
p_vout
->
b_fullscreen
)
p_vout
->
p_sys
->
i_changes
|=
VOUT_FULLSCREEN_CHANGE
;
{
vlc_mutex_lock
(
&
p_event
->
lock
);
p_event
->
i_changes
|=
VOUT_FULLSCREEN_CHANGE
;
vlc_mutex_unlock
(
&
p_event
->
lock
);
}
if
(
hwnd
==
p_vout
->
p_sys
->
hfswnd
)
{
...
...
@@ -908,6 +914,15 @@ void EventThreadUpdateTitle( event_thread_t *p_event, const char *psz_fallback )
PostMessage
(
p_event
->
p_vout
->
p_sys
->
hwnd
,
WM_VLC_CHANGE_TEXT
,
0
,
0
);
}
unsigned
EventThreadRetreiveChanges
(
event_thread_t
*
p_event
)
{
vlc_mutex_lock
(
&
p_event
->
lock
);
unsigned
i_changes
=
p_event
->
i_changes
;
p_event
->
i_changes
=
0
;
vlc_mutex_unlock
(
&
p_event
->
lock
);
return
i_changes
;
}
event_thread_t
*
EventThreadCreate
(
vout_thread_t
*
p_vout
)
{
...
...
@@ -946,6 +961,8 @@ void EventThreadDestroy( event_thread_t *p_event )
int
EventThreadStart
(
event_thread_t
*
p_event
)
{
p_event
->
i_changes
=
0
;
p_event
->
b_ready
=
false
;
p_event
->
b_done
=
false
;
p_event
->
b_error
=
false
;
...
...
@@ -989,8 +1006,5 @@ void EventThreadStop( event_thread_t *p_event )
vlc_join
(
p_event
->
thread
,
NULL
);
p_event
->
b_ready
=
false
;
/* clear the changes formerly signaled */
p_event
->
p_vout
->
p_sys
->
i_changes
=
0
;
}
modules/video_output/msw/vout.h
View file @
ed50ccdc
...
...
@@ -45,6 +45,9 @@ typedef struct
/* Title */
char
*
psz_title
;
/* */
unsigned
i_changes
;
}
event_thread_t
;
#ifdef MODULE_NAME_IS_wingapi
...
...
@@ -267,6 +270,7 @@ void EventThreadStop( event_thread_t * );
void
EventThreadMouseAutoHide
(
event_thread_t
*
);
void
EventThreadUpdateTitle
(
event_thread_t
*
,
const
char
*
psz_fallback
);
unsigned
EventThreadRetreiveChanges
(
event_thread_t
*
);
/*****************************************************************************
* Prototypes from common.c
...
...
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