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
d451fb0e
Commit
d451fb0e
authored
Jul 31, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated drawable vout_window provider to the new API.
parent
fcab73f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
34 deletions
+33
-34
modules/video_output/drawable.c
modules/video_output/drawable.c
+33
-34
No files found.
modules/video_output/drawable.c
View file @
d451fb0e
...
...
@@ -29,12 +29,10 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_vout.h>
#include <vlc_window.h>
#include <vlc_vout_window.h>
static
int
OpenXID
(
vlc_object_t
*
);
static
int
OpenHWND
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
#define XID_TEXT N_("ID of the video output X window")
#define XID_LONGTEXT N_( \
...
...
@@ -46,20 +44,15 @@ static void Close (vlc_object_t *);
*/
vlc_module_begin
()
set_shortname
(
N_
(
"Drawable"
))
set_description
(
N_
(
"Embedded
X
window video"
))
set_description
(
N_
(
"Embedded window video"
))
set_category
(
CAT_VIDEO
)
set_subcategory
(
SUBCAT_VIDEO_VOUT
)
set_capability
(
"
x
window"
,
70
)
set_callbacks
(
Open
XID
,
Close
)
set_capability
(
"
vout
window"
,
70
)
set_callbacks
(
Open
,
Close
)
add_integer
(
"drawable-xid"
,
0
,
NULL
,
XID_TEXT
,
XID_LONGTEXT
,
true
)
change_unsaveable
()
/*change_integer_range (0, 0xffffffff)*/
add_submodule
()
set_description
(
N_
(
"Embedded Windows video"
))
set_capability
(
"hwnd"
,
70
)
set_callbacks
(
OpenHWND
,
Close
)
//add_integer ("drawable-hwnd", 0, NULL, HWN_TEXT, HWND_LONGTEXT, true) /* How to ? */
// change_unsaveable ()
vlc_module_end
()
static
int
Control
(
vout_window_t
*
,
int
,
va_list
);
...
...
@@ -76,9 +69,26 @@ static vlc_mutex_t serializer = VLC_STATIC_MUTEX;
/**
* Find the drawable set by libvlc application.
*/
static
int
Open
(
vlc_object_t
*
obj
,
const
char
*
varname
,
bool
ptr
)
static
int
Open
(
vlc_object_t
*
obj
)
{
vout_window_t
*
wnd
=
(
vout_window_t
*
)
obj
;
const
char
*
varname
;
bool
ptr
;
switch
(
wnd
->
cfg
->
type
)
{
case
VOUT_WINDOW_TYPE_XWINDOW
:
varname
=
"drawable-xid"
;
ptr
=
false
;
break
;
case
VOUT_WINDOW_TYPE_HWND
:
varname
=
"drawable-hwnd"
;
ptr
=
true
;
break
;
default:
return
VLC_EGENERIC
;
}
void
**
used
,
*
val
;
size_t
n
=
0
;
...
...
@@ -135,28 +145,17 @@ skip:
/* FIXME: get window size (in platform-dependent ways) */
wnd
->
control
=
Control
;
wnd
->
p_
sys
=
val
;
wnd
->
sys
=
val
;
return
VLC_SUCCESS
;
}
static
int
OpenXID
(
vlc_object_t
*
obj
)
{
return
Open
(
obj
,
"drawable-xid"
,
false
);
}
static
int
OpenHWND
(
vlc_object_t
*
obj
)
{
return
Open
(
obj
,
"drawable-hwnd"
,
true
);
}
/**
* Release the drawable.
*/
static
void
Close
(
vlc_object_t
*
obj
)
{
vout_window_t
*
wnd
=
(
vout_window_t
*
)
obj
;
void
**
used
,
*
val
=
wnd
->
p_
sys
;
void
**
used
,
*
val
=
wnd
->
sys
;
size_t
n
=
0
;
/* Remove this drawable from the list of busy ones */
...
...
@@ -188,12 +187,12 @@ static int Control (vout_window_t *wnd, int query, va_list ap)
{
switch
(
query
)
{
case
VOUT_
SET_SIZE
:
/* not allowed */
case
VOUT_
SET_STAY
_ON_TOP
:
/* not allowed either, would be ugly */
case
VOUT_
WINDOW_SET_SIZE
:
/* not allowed */
case
VOUT_
WINDOW_SET
_ON_TOP
:
/* not allowed either, would be ugly */
return
VLC_EGENERIC
;
}
default:
msg_Warn
(
wnd
,
"unsupported control query %d"
,
query
);
return
VLC_EGENERIC
;
}
}
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