Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
1f9d1546
Commit
1f9d1546
authored
Oct 05, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout: use the new var_GetAddress.
parent
4632744f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
17 deletions
+5
-17
modules/video_output/drawable.c
modules/video_output/drawable.c
+2
-9
modules/video_output/xcb/window.c
modules/video_output/xcb/window.c
+3
-8
No files found.
modules/video_output/drawable.c
View file @
1f9d1546
...
...
@@ -50,13 +50,6 @@ vlc_module_end ()
static
int
Control
(
vout_window_t
*
,
int
,
va_list
);
/* TODO: move to vlc_variables.h */
static
inline
void
*
var_GetAddress
(
vlc_object_t
*
o
,
const
char
*
name
)
{
vlc_value_t
val
;
return
var_Get
(
o
,
name
,
&
val
)
?
NULL
:
val
.
p_address
;
}
static
vlc_mutex_t
serializer
=
VLC_STATIC_MUTEX
;
/**
...
...
@@ -79,7 +72,7 @@ static int Open (vlc_object_t *obj)
* more than one video track in the stream. */
vlc_mutex_lock
(
&
serializer
);
/* TODO: per-type list of busy drawables */
used
=
var_GetAddress
(
VLC_OBJECT
(
obj
->
p_libvlc
)
,
"drawables-in-use"
);
used
=
var_GetAddress
(
obj
->
p_libvlc
,
"drawables-in-use"
);
if
(
used
!=
NULL
)
{
while
(
used
[
n
]
!=
NULL
)
...
...
@@ -125,7 +118,7 @@ static void Close (vlc_object_t *obj)
/* Remove this drawable from the list of busy ones */
vlc_mutex_lock
(
&
serializer
);
used
=
var_GetAddress
(
VLC_OBJECT
(
obj
->
p_libvlc
)
,
"hwnd-in-use"
);
used
=
var_GetAddress
(
obj
->
p_libvlc
,
"hwnd-in-use"
);
assert
(
used
);
while
(
used
[
n
]
!=
val
)
{
...
...
modules/video_output/xcb/window.c
View file @
1f9d1546
...
...
@@ -497,7 +497,6 @@ static vlc_mutex_t serializer = VLC_STATIC_MUTEX;
/** Acquire a drawable */
static
int
AcquireDrawable
(
vlc_object_t
*
obj
,
xcb_window_t
window
)
{
vlc_value_t
val
;
xcb_window_t
*
used
;
size_t
n
=
0
;
...
...
@@ -507,8 +506,7 @@ static int AcquireDrawable (vlc_object_t *obj, xcb_window_t window)
/* Keep a list of busy drawables, so we don't overlap videos if there are
* more than one video track in the stream. */
vlc_mutex_lock
(
&
serializer
);
var_Get
(
VLC_OBJECT
(
obj
->
p_libvlc
),
"xid-in-use"
,
&
val
);
used
=
val
.
p_address
;
used
=
var_GetAddress
(
obj
->
p_libvlc
,
"xid-in-use"
);
if
(
used
!=
NULL
)
{
while
(
used
[
n
])
...
...
@@ -524,8 +522,7 @@ static int AcquireDrawable (vlc_object_t *obj, xcb_window_t window)
{
used
[
n
]
=
window
;
used
[
n
+
1
]
=
0
;
val
.
p_address
=
used
;
var_Set
(
obj
->
p_libvlc
,
"xid-in-use"
,
val
);
var_SetAddress
(
obj
->
p_libvlc
,
"xid-in-use"
,
used
);
}
else
{
...
...
@@ -541,13 +538,11 @@ skip:
/** Remove this drawable from the list of busy ones */
static
void
ReleaseDrawable
(
vlc_object_t
*
obj
,
xcb_window_t
window
)
{
vlc_value_t
val
;
xcb_window_t
*
used
;
size_t
n
=
0
;
vlc_mutex_lock
(
&
serializer
);
var_Get
(
VLC_OBJECT
(
obj
->
p_libvlc
),
"xid-in-use"
,
&
val
);
used
=
val
.
p_address
;
used
=
var_GetAddress
(
obj
->
p_libvlc
,
"xid-in-use"
);
assert
(
used
);
while
(
used
[
n
]
!=
window
)
{
...
...
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