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
e9a3dca6
Commit
e9a3dca6
authored
Oct 12, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout: add window owner structure and resize event
parent
e0b80918
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
7 deletions
+28
-7
include/vlc_vout_window.h
include/vlc_vout_window.h
+15
-1
src/video_output/display.c
src/video_output/display.c
+3
-2
src/video_output/video_output.c
src/video_output/video_output.c
+2
-1
src/video_output/window.c
src/video_output/window.c
+8
-3
No files found.
include/vlc_vout_window.h
View file @
e9a3dca6
...
...
@@ -80,6 +80,11 @@ typedef struct {
}
vout_window_cfg_t
;
typedef
struct
vout_window_owner
{
void
*
sys
;
void
(
*
resized
)(
vout_window_t
*
,
unsigned
width
,
unsigned
height
);
}
vout_window_owner_t
;
/**
* FIXME do we need an event system in the window too ?
* or the window user will take care of it ?
...
...
@@ -118,6 +123,8 @@ struct vout_window_t {
* A module is free to use it as it wishes.
*/
vout_window_sys_t
*
sys
;
vout_window_owner_t
owner
;
};
/**
...
...
@@ -128,7 +135,7 @@ struct vout_window_t {
/ vout_display_NewWindow() and vout_display_DeleteWindow() instead.
* This enables recycling windows.
*/
VLC_API
vout_window_t
*
vout_window_New
(
vlc_object_t
*
,
const
char
*
module
,
const
vout_window_cfg_t
*
);
VLC_API
vout_window_t
*
vout_window_New
(
vlc_object_t
*
,
const
char
*
module
,
const
vout_window_cfg_t
*
,
const
vout_window_owner_t
*
);
/**
* Deletes a window created by vout_window_New().
...
...
@@ -186,4 +193,11 @@ static inline int vout_window_SetFullScreen(vout_window_t *window, bool full)
return
vout_window_Control
(
window
,
VOUT_WINDOW_SET_FULLSCREEN
,
full
);
}
static
inline
void
vout_window_ReportSize
(
vout_window_t
*
window
,
unsigned
width
,
unsigned
height
)
{
if
(
window
->
owner
.
resized
!=
NULL
)
window
->
owner
.
resized
(
window
,
width
,
height
);
}
#endif
/* VLC_VOUT_WINDOW_H */
src/video_output/display.c
View file @
e9a3dca6
...
...
@@ -746,7 +746,8 @@ static vout_window_t *VoutDisplayNewWindow(vout_display_t *vd, const vout_window
if
(
!
var_InheritBool
(
osys
->
vout
,
"embedded-video"
))
cfg_override
.
is_standalone
=
true
;
return
vout_window_New
(
VLC_OBJECT
(
osys
->
vout
),
"$window"
,
&
cfg_override
);
return
vout_window_New
(
VLC_OBJECT
(
osys
->
vout
),
"$window"
,
&
cfg_override
,
NULL
);
}
#endif
return
vout_NewDisplayWindow
(
osys
->
vout
,
cfg
);
...
...
@@ -1445,7 +1446,7 @@ static vout_window_t *SplitterNewWindow(vout_display_t *vd, const vout_window_cf
vout_window_cfg_t
cfg
=
*
cfg_ptr
;
cfg
.
is_standalone
=
true
;
return
vout_window_New
(
VLC_OBJECT
(
osys
->
vout
),
"$window"
,
&
cfg
);
return
vout_window_New
(
VLC_OBJECT
(
osys
->
vout
),
"$window"
,
&
cfg
,
NULL
);
}
static
void
SplitterDelWindow
(
vout_display_t
*
vd
,
vout_window_t
*
window
)
...
...
src/video_output/video_output.c
View file @
e9a3dca6
...
...
@@ -173,7 +173,8 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
.
height
=
cfg
->
fmt
->
i_visible_height
,
};
vout
->
p
->
window
=
vout_window_New
(
VLC_OBJECT
(
vout
),
"$window"
,
&
wcfg
);
vout
->
p
->
window
=
vout_window_New
(
VLC_OBJECT
(
vout
),
"$window"
,
&
wcfg
,
NULL
);
}
else
vout
->
p
->
window
=
NULL
;
...
...
src/video_output/window.c
View file @
e9a3dca6
...
...
@@ -51,9 +51,9 @@ static int vout_window_start(void *func, va_list ap)
return
activate
(
wnd
,
cfg
);
}
vout_window_t
*
vout_window_New
(
vlc_object_t
*
obj
,
const
char
*
module
,
const
vout_window_
cfg_t
*
cfg
)
vout_window_t
*
vout_window_New
(
vlc_object_t
*
obj
,
const
char
*
module
,
const
vout_window_cfg_t
*
cfg
,
const
vout_window_
owner_t
*
owner
)
{
window_t
*
w
=
vlc_custom_create
(
obj
,
sizeof
(
*
w
),
"window"
);
vout_window_t
*
window
=
&
w
->
wnd
;
...
...
@@ -62,6 +62,11 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
window
->
control
=
NULL
;
window
->
sys
=
NULL
;
if
(
owner
!=
NULL
)
window
->
owner
=
*
owner
;
else
window
->
owner
.
resized
=
NULL
;
w
->
module
=
vlc_module_load
(
window
,
"vout window"
,
module
,
module
&&
*
module
,
vout_window_start
,
window
,
cfg
);
...
...
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