Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
9f36a1de
Commit
9f36a1de
authored
May 13, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove core support for global drawable
parent
922aad51
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
42 deletions
+3
-42
modules/video_output/drawable.c
modules/video_output/drawable.c
+3
-34
src/libvlc.c
src/libvlc.c
+0
-8
No files found.
modules/video_output/drawable.c
View file @
9f36a1de
...
...
@@ -69,44 +69,17 @@ static int Control (vout_window_t *, int, va_list);
*/
static
int
Open
(
vlc_object_t
*
obj
,
const
char
*
varname
,
bool
ptr
)
{
static
vlc_mutex_t
serializer
=
VLC_STATIC_MUTEX
;
vout_window_t
*
wnd
=
(
vout_window_t
*
)
obj
;
vlc_value_t
val
,
globval
;
vlc_value_t
val
;
if
(
var_Create
(
obj
->
p_libvlc
,
"drawable-busy"
,
VLC_VAR_BOOL
)
||
var_Create
(
obj
,
varname
,
VLC_VAR_DOINHERIT
if
(
var_Create
(
obj
,
varname
,
VLC_VAR_DOINHERIT
|
(
ptr
?
VLC_VAR_ADDRESS
:
VLC_VAR_INTEGER
)))
return
VLC_ENOMEM
;
var_Get
(
obj
,
varname
,
&
val
);
vlc_mutex_lock
(
&
serializer
);
/* Note: We cannot simply clear the drawable variable.
* It would break libvlc_video_get_parent(). */
var_Get
(
obj
->
p_libvlc
,
varname
,
&
globval
);
if
(
ptr
?
(
val
.
p_address
==
globval
.
p_address
)
:
(
val
.
i_int
==
globval
.
i_int
))
{
if
(
var_GetBool
(
obj
->
p_libvlc
,
"drawable-busy"
))
{
/* LibVLC-wide drawable already in use */
if
(
ptr
)
val
.
p_address
=
NULL
;
else
val
.
i_int
=
0
;
}
else
var_SetBool
(
obj
->
p_libvlc
,
"drawable-busy"
,
true
);
}
/* If we got a drawable _not_ from the root object (from the input?),
* We assume it is not busy. This is a bug. */
vlc_mutex_unlock
(
&
serializer
);
var_Destroy
(
obj
,
varname
);
if
(
ptr
?
(
val
.
p_address
==
NULL
)
:
(
val
.
i_int
==
0
))
{
var_Destroy
(
obj
->
p_libvlc
,
"drawable-busy"
);
return
VLC_EGENERIC
;
}
if
(
ptr
)
wnd
->
handle
.
hwnd
=
val
.
p_address
;
...
...
@@ -136,11 +109,7 @@ static int OpenHWND (vlc_object_t *obj)
*/
static
void
Close
(
vlc_object_t
*
obj
)
{
/* This is atomic with regards to var_GetBool() in Open(): */
var_SetBool
(
obj
->
p_libvlc
,
"drawable-busy"
,
false
);
/* Variables are reference-counted... */
var_Destroy
(
obj
->
p_libvlc
,
"drawable-busy"
);
(
void
)
obj
;
}
...
...
src/libvlc.c
View file @
9f36a1de
...
...
@@ -973,14 +973,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
}
#endif
/*
* FIXME: kludge to use a p_libvlc-local variable for the Mozilla plugin
*/
var_Create
(
p_libvlc
,
"drawable-xid"
,
VLC_VAR_DOINHERIT
|
VLC_VAR_INTEGER
);
var_Create
(
p_libvlc
,
"drawable-hwnd"
,
VLC_VAR_ADDRESS
);
var_Create
(
p_libvlc
,
"drawable-agl"
,
VLC_VAR_INTEGER
);
var_Create
(
p_libvlc
,
"drawable-gl"
,
VLC_VAR_INTEGER
);
var_Create
(
p_libvlc
,
"drawable-view-top"
,
VLC_VAR_INTEGER
);
var_Create
(
p_libvlc
,
"drawable-view-left"
,
VLC_VAR_INTEGER
);
var_Create
(
p_libvlc
,
"drawable-view-bottom"
,
VLC_VAR_INTEGER
);
...
...
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