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
81c7b062
Commit
81c7b062
authored
Jun 20, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewritten embedded window internal ABI
parent
138da191
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
19 deletions
+100
-19
include/vlc_vout.h
include/vlc_vout.h
+1
-2
include/vlc_window.h
include/vlc_window.h
+44
-0
modules/control/hotkeys.c
modules/control/hotkeys.c
+2
-2
src/video_output/video_output.c
src/video_output/video_output.c
+2
-2
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+51
-13
No files found.
include/vlc_vout.h
View file @
81c7b062
...
@@ -399,8 +399,7 @@ struct vout_thread_t
...
@@ -399,8 +399,7 @@ struct vout_thread_t
unsigned
int
i_par_num
;
/**< monitor pixel aspect-ratio */
unsigned
int
i_par_num
;
/**< monitor pixel aspect-ratio */
unsigned
int
i_par_den
;
/**< monitor pixel aspect-ratio */
unsigned
int
i_par_den
;
/**< monitor pixel aspect-ratio */
intf_thread_t
*
p_parent_intf
;
/**< parent interface for embedded
struct
vout_window_t
*
p_window
;
/**< window for embedded vout (if any) */
vout (if any) */
/**@}*/
/**@}*/
/** \name Plugin used and shortcuts to access its capabilities */
/** \name Plugin used and shortcuts to access its capabilities */
...
...
include/vlc_window.h
0 → 100644
View file @
81c7b062
/*****************************************************************************
* vlc_window.h: Embedded video output window
*****************************************************************************
* Copyright (C) 2008 Rémi Denis-Courmont
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef LIBVLCCORE_WINDOW_H
# define LIBVLCCORE_WINDOW_H 1
# include <stdarg.h>
typedef
struct
vout_window_t
vout_window_t
;
struct
vout_window_t
{
VLC_COMMON_MEMBERS
module_t
*
module
;
vout_thread_t
*
vout
;
void
*
handle
;
/* OS-specific Window handle */
unsigned
width
;
/* pixels width */
unsigned
height
;
/* pixels height */
int
pos_x
;
/* horizontal position hint */
int
pos_y
;
/* vertical position hint */
int
(
*
control
)
(
struct
vout_window_t
*
,
int
,
va_list
);
};
#endif
/* !LIBVLCCORE_WINDOW_H */
modules/control/hotkeys.c
View file @
81c7b062
...
@@ -982,7 +982,7 @@ static void DisplayPosition( intf_thread_t *p_intf, vout_thread_t *p_vout,
...
@@ -982,7 +982,7 @@ static void DisplayPosition( intf_thread_t *p_intf, vout_thread_t *p_vout,
vout_OSDMessage
(
p_input
,
POSITION_TEXT_CHAN
,
psz_time
);
vout_OSDMessage
(
p_input
,
POSITION_TEXT_CHAN
,
psz_time
);
}
}
if
(
!
p_vout
->
p_
parent_intf
||
p_vout
->
b_fullscreen
)
if
(
!
p_vout
->
p_
window
||
p_vout
->
b_fullscreen
)
{
{
var_Get
(
p_input
,
"position"
,
&
pos
);
var_Get
(
p_input
,
"position"
,
&
pos
);
vout_OSDSlider
(
VLC_OBJECT
(
p_input
),
POSITION_WIDGET_CHAN
,
vout_OSDSlider
(
VLC_OBJECT
(
p_input
),
POSITION_WIDGET_CHAN
,
...
@@ -999,7 +999,7 @@ static void DisplayVolume( intf_thread_t *p_intf, vout_thread_t *p_vout,
...
@@ -999,7 +999,7 @@ static void DisplayVolume( intf_thread_t *p_intf, vout_thread_t *p_vout,
}
}
ClearChannels
(
p_intf
,
p_vout
);
ClearChannels
(
p_intf
,
p_vout
);
if
(
!
p_vout
->
p_
parent_intf
||
p_vout
->
b_fullscreen
)
if
(
!
p_vout
->
p_
window
||
p_vout
->
b_fullscreen
)
{
{
vout_OSDSlider
(
VLC_OBJECT
(
p_vout
),
VOLUME_WIDGET_CHAN
,
vout_OSDSlider
(
VLC_OBJECT
(
p_vout
),
VOLUME_WIDGET_CHAN
,
i_vol
*
100
/
AOUT_VOLUME_MAX
,
OSD_VERT_SLIDER
);
i_vol
*
100
/
AOUT_VOLUME_MAX
,
OSD_VERT_SLIDER
);
...
...
src/video_output/video_output.c
View file @
81c7b062
...
@@ -304,8 +304,8 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
...
@@ -304,8 +304,8 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
p_vout
->
render_time
=
10
;
p_vout
->
render_time
=
10
;
p_vout
->
c_fps_samples
=
0
;
p_vout
->
c_fps_samples
=
0
;
p_vout
->
b_filter_change
=
0
;
p_vout
->
b_filter_change
=
0
;
p_vout
->
pf_control
=
0
;
p_vout
->
pf_control
=
NULL
;
p_vout
->
p_
parent_intf
=
0
;
p_vout
->
p_
window
=
NULL
;
p_vout
->
i_par_num
=
p_vout
->
i_par_den
=
1
;
p_vout
->
i_par_num
=
p_vout
->
i_par_den
=
1
;
/* Initialize locks */
/* Initialize locks */
...
...
src/video_output/vout_intf.c
View file @
81c7b062
...
@@ -34,12 +34,14 @@
...
@@ -34,12 +34,14 @@
#include <stdlib.h>
/* free() */
#include <stdlib.h>
/* free() */
#include <sys/types.h>
/* opendir() */
#include <sys/types.h>
/* opendir() */
#include <dirent.h>
/* opendir() */
#include <dirent.h>
/* opendir() */
#include <assert.h>
#include <vlc_interface.h>
#include <vlc_interface.h>
#include <vlc_block.h>
#include <vlc_block.h>
#include <vlc_playlist.h>
#include <vlc_playlist.h>
#include <vlc_vout.h>
#include <vlc_vout.h>
#include <vlc_window.h>
#include <vlc_image.h>
#include <vlc_image.h>
#include <vlc_osd.h>
#include <vlc_osd.h>
#include <vlc_charset.h>
#include <vlc_charset.h>
...
@@ -100,18 +102,59 @@ void *vout_RequestWindow( vout_thread_t *p_vout,
...
@@ -100,18 +102,59 @@ void *vout_RequestWindow( vout_thread_t *p_vout,
int
drawable
=
var_CreateGetInteger
(
p_vout
,
"drawable"
);
int
drawable
=
var_CreateGetInteger
(
p_vout
,
"drawable"
);
if
(
drawable
)
return
(
void
*
)(
intptr_t
)
drawable
;
if
(
drawable
)
return
(
void
*
)(
intptr_t
)
drawable
;
vout_window_t
*
wnd
=
vlc_custom_create
(
VLC_OBJECT
(
p_vout
),
sizeof
(
*
wnd
),
VLC_OBJECT_GENERIC
,
"window"
);
if
(
wnd
==
NULL
)
return
NULL
;
return
NULL
;
wnd
->
vout
=
p_vout
;
wnd
->
width
=
*
pi_width_hint
;
wnd
->
height
=
*
pi_height_hint
;
wnd
->
pos_x
=
*
pi_x_hint
;
wnd
->
pos_y
=
*
pi_y_hint
;
vlc_object_attach
(
wnd
,
p_vout
);
wnd
->
module
=
module_Need
(
wnd
,
"vout window"
,
0
,
0
);
if
(
wnd
->
module
==
NULL
)
{
msg_Dbg
(
wnd
,
"no window provider available"
);
vlc_object_release
(
wnd
);
return
NULL
;
}
p_vout
->
p_window
=
wnd
;
*
pi_width_hint
=
wnd
->
width
;
*
pi_height_hint
=
wnd
->
height
;
*
pi_x_hint
=
wnd
->
pos_x
;
*
pi_y_hint
=
wnd
->
pos_y
;
return
wnd
->
handle
;
}
}
void
vout_ReleaseWindow
(
vout_thread_t
*
p_vout
,
void
*
p_window
)
void
vout_ReleaseWindow
(
vout_thread_t
*
p_vout
,
void
*
dummy
)
{
{
(
void
)
p_vout
;
(
void
)
p_window
;
vout_window_t
*
wnd
=
p_vout
->
p_window
;
if
(
wnd
==
NULL
)
return
;
p_vout
->
p_window
=
NULL
;
assert
(
wnd
->
module
);
module_Unneed
(
wnd
,
wnd
->
module
);
vlc_object_detach
(
wnd
);
vlc_object_release
(
wnd
);
(
void
)
dummy
;
}
}
int
vout_ControlWindow
(
vout_thread_t
*
p_vout
,
void
*
p_window
,
int
vout_ControlWindow
(
vout_thread_t
*
p_vout
,
void
*
dummy
,
int
i_query
,
va_list
args
)
int
i_query
,
va_list
args
)
{
{
(
void
)
p_vout
;
(
void
)
p_window
;
(
void
)
i_query
;
(
void
)
args
;
vout_window_t
*
wnd
=
p_vout
->
p_window
;
if
(
wnd
==
NULL
)
return
VLC_EGENERIC
;
assert
(
wnd
->
control
);
return
wnd
->
control
(
wnd
,
i_query
,
args
);
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -782,23 +825,18 @@ int vout_vaControlDefault( vout_thread_t *p_vout, int i_query, va_list args )
...
@@ -782,23 +825,18 @@ int vout_vaControlDefault( vout_thread_t *p_vout, int i_query, va_list args )
{
{
case
VOUT_REPARENT
:
case
VOUT_REPARENT
:
case
VOUT_CLOSE
:
case
VOUT_CLOSE
:
if
(
p_vout
->
p_parent_intf
)
if
(
p_vout
->
p_window
)
{
vout_ReleaseWindow
(
p_vout
->
p_window
,
NULL
);
vlc_object_release
(
p_vout
->
p_parent_intf
);
p_vout
->
p_parent_intf
=
NULL
;
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
break
;
case
VOUT_SNAPSHOT
:
case
VOUT_SNAPSHOT
:
p_vout
->
b_snapshot
=
true
;
p_vout
->
b_snapshot
=
true
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
break
;
default:
default:
msg_Dbg
(
p_vout
,
"control query not supported"
);
msg_Dbg
(
p_vout
,
"control query not supported"
);
return
VLC_EGENERIC
;
}
}
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