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
1f59b54a
Commit
1f59b54a
authored
Oct 31, 2005
by
Marian Durkovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backport [13049] and [13059]
parent
b7e5d7c5
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
31 deletions
+23
-31
include/video_output.h
include/video_output.h
+1
-1
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/src/vlcproc.cpp
+2
-7
modules/gui/wxwidgets/video.cpp
modules/gui/wxwidgets/video.cpp
+2
-4
modules/video_output/directx/directx.c
modules/video_output/directx/directx.c
+1
-0
modules/video_output/directx/events.c
modules/video_output/directx/events.c
+2
-4
modules/video_output/directx/glwin32.c
modules/video_output/directx/glwin32.c
+1
-0
modules/video_output/wingdi.c
modules/video_output/wingdi.c
+2
-4
modules/video_output/x11/xcommon.c
modules/video_output/x11/xcommon.c
+2
-5
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+10
-6
No files found.
include/video_output.h
View file @
1f59b54a
...
...
@@ -254,7 +254,7 @@ static inline int vout_Control( vout_thread_t *p_vout, int i_query, ... )
enum
output_query_e
{
VOUT_SET_ZOOM
,
/* arg1= double res= */
VOUT_SET_ZOOM
,
VOUT_SET_STAY_ON_TOP
,
/* arg1= vlc_bool_t res= */
VOUT_REPARENT
,
VOUT_SNAPSHOT
,
...
...
modules/gui/skins2/src/vlcproc.cpp
View file @
1f59b54a
...
...
@@ -484,18 +484,13 @@ int VlcProc::controlWindow( intf_thread_t *pIntf, void *pWindow,
{
case
VOUT_SET_ZOOM
:
{
double
fArg
=
va_arg
(
args
,
double
);
if
(
pThis
->
m_pVout
)
{
// Compute requested vout dimensions
int
width
=
(
int
)(
pThis
->
m_pVout
->
i_window_width
*
fArg
);
int
height
=
(
int
)(
pThis
->
m_pVout
->
i_window_height
*
fArg
);
// Post a resize vout command
CmdResizeVout
*
pCmd
=
new
CmdResizeVout
(
pThis
->
getIntf
(),
pWindow
,
width
,
height
);
pThis
->
m_pVout
->
i_window_width
,
pThis
->
m_pVout
->
i_window_height
);
AsyncQueue
*
pQueue
=
AsyncQueue
::
instance
(
pThis
->
getIntf
()
);
pQueue
->
remove
(
"resize vout"
);
pQueue
->
push
(
CmdGenericPtr
(
pCmd
)
);
...
...
modules/gui/wxwidgets/video.cpp
View file @
1f59b54a
...
...
@@ -364,11 +364,9 @@ int VideoWindow::ControlWindow( void *p_window, int i_query, va_list args )
{
if
(
!
b_auto_size
)
break
;
double
f_arg
=
va_arg
(
args
,
double
);
/* Update dimensions */
wxSizeEvent
event
(
wxSize
(
(
int
)(
p_vout
->
i_window_width
*
f_arg
)
,
(
int
)(
p_vout
->
i_window_height
*
f_arg
)
),
wxSizeEvent
event
(
wxSize
(
p_vout
->
i_window_width
,
p_vout
->
i_window_height
),
UpdateSize_Event
);
...
...
modules/video_output/directx/directx.c
View file @
1f59b54a
...
...
@@ -555,6 +555,7 @@ static int Manage( vout_thread_t *p_vout )
p_vout
->
fmt_out
.
i_sar_den
=
p_vout
->
fmt_in
.
i_sar_den
;
p_vout
->
output
.
i_aspect
=
p_vout
->
fmt_in
.
i_aspect
;
E_
(
DirectXUpdateRects
)(
p_vout
,
VLC_TRUE
);
vout_Control
(
p_vout
,
VOUT_SET_ZOOM
);
}
/* We used to call the Win32 PeekMessage function here to read the window
...
...
modules/video_output/directx/events.c
View file @
1f59b54a
...
...
@@ -900,12 +900,10 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
return
vout_ControlWindow
(
p_vout
,
(
void
*
)
p_vout
->
p_sys
->
hparent
,
i_query
,
args
);
f_arg
=
va_arg
(
args
,
double
);
/* Update dimensions */
rect_window
.
top
=
rect_window
.
left
=
0
;
rect_window
.
right
=
p_vout
->
i_window_width
*
f_arg
;
rect_window
.
bottom
=
p_vout
->
i_window_height
*
f_arg
;
rect_window
.
right
=
p_vout
->
i_window_width
;
rect_window
.
bottom
=
p_vout
->
i_window_height
;
AdjustWindowRect
(
&
rect_window
,
p_vout
->
p_sys
->
i_window_style
,
0
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
...
...
modules/video_output/directx/glwin32.c
View file @
1f59b54a
...
...
@@ -318,6 +318,7 @@ static int Manage( vout_thread_t *p_vout )
p_vout
->
fmt_out
.
i_sar_den
=
p_vout
->
fmt_in
.
i_sar_den
;
p_vout
->
output
.
i_aspect
=
p_vout
->
fmt_in
.
i_aspect
;
E_
(
DirectXUpdateRects
)(
p_vout
,
VLC_TRUE
);
vout_Control
(
p_vout
,
VOUT_SET_ZOOM
);
}
/* We used to call the Win32 PeekMessage function here to read the window
...
...
modules/video_output/wingdi.c
View file @
1f59b54a
...
...
@@ -1294,12 +1294,10 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
return
vout_ControlWindow
(
p_vout
,
(
void
*
)
p_vout
->
p_sys
->
hparent
,
i_query
,
args
);
f_arg
=
va_arg
(
args
,
double
);
/* Update dimensions */
rect_window
.
top
=
rect_window
.
left
=
0
;
rect_window
.
right
=
p_vout
->
i_window_width
*
f_arg
;
rect_window
.
bottom
=
p_vout
->
i_window_height
*
f_arg
;
rect_window
.
right
=
p_vout
->
i_window_width
;
rect_window
.
bottom
=
p_vout
->
i_window_height
;
AdjustWindowRect
(
&
rect_window
,
p_vout
->
p_sys
->
i_window_style
,
0
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
...
...
modules/video_output/x11/xcommon.c
View file @
1f59b54a
...
...
@@ -2298,16 +2298,13 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
return
vout_ControlWindow
(
p_vout
,
(
void
*
)
p_vout
->
p_sys
->
p_win
->
owner_window
,
i_query
,
args
);
f_arg
=
va_arg
(
args
,
double
);
vlc_mutex_lock
(
&
p_vout
->
p_sys
->
lock
);
/* Update dimensions */
/* FIXME: export InitWindowSize() from vout core */
XResizeWindow
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
p_win
->
base_window
,
p_vout
->
i_window_width
*
f_arg
,
p_vout
->
i_window_height
*
f_arg
);
p_vout
->
i_window_width
,
p_vout
->
i_window_height
);
vlc_mutex_unlock
(
&
p_vout
->
p_sys
->
lock
);
return
VLC_SUCCESS
;
...
...
src/video_output/vout_intf.c
View file @
1f59b54a
...
...
@@ -308,8 +308,6 @@ void vout_IntfInit( vout_thread_t *p_vout )
/* Initialize the dimensions of the video window */
InitWindowSize
(
p_vout
,
&
p_vout
->
i_window_width
,
&
p_vout
->
i_window_height
);
msg_Dbg
(
p_vout
,
"window size: %dx%d"
,
p_vout
->
i_window_width
,
p_vout
->
i_window_height
);
/* Add a variable to indicate if the window should be on top of others */
var_Create
(
p_vout
,
"video-on-top"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
...
...
@@ -560,7 +558,7 @@ static void InitWindowSize( vout_thread_t *p_vout, unsigned *pi_width,
{
*
pi_width
=
(
int
)(
i_width
*
ll_zoom
/
FP_FACTOR
);
*
pi_height
=
(
int
)(
i_height
*
ll_zoom
/
FP_FACTOR
);
return
;
goto
initwsize_end
;
}
else
if
(
i_width
>
0
)
{
...
...
@@ -568,7 +566,7 @@ static void InitWindowSize( vout_thread_t *p_vout, unsigned *pi_width,
*
pi_height
=
(
int
)(
p_vout
->
fmt_in
.
i_visible_height
*
ll_zoom
*
p_vout
->
fmt_in
.
i_sar_den
*
i_width
/
p_vout
->
fmt_in
.
i_sar_num
/
FP_FACTOR
/
p_vout
->
fmt_in
.
i_visible_width
);
return
;
goto
initwsize_end
;
}
else
if
(
i_height
>
0
)
{
...
...
@@ -576,7 +574,7 @@ static void InitWindowSize( vout_thread_t *p_vout, unsigned *pi_width,
*
pi_width
=
(
int
)(
p_vout
->
fmt_in
.
i_visible_width
*
ll_zoom
*
p_vout
->
fmt_in
.
i_sar_num
*
i_height
/
p_vout
->
fmt_in
.
i_sar_den
/
FP_FACTOR
/
p_vout
->
fmt_in
.
i_visible_height
);
return
;
goto
initwsize_end
;
}
if
(
p_vout
->
fmt_in
.
i_sar_num
>=
p_vout
->
fmt_in
.
i_sar_den
)
...
...
@@ -594,6 +592,10 @@ static void InitWindowSize( vout_thread_t *p_vout, unsigned *pi_width,
p_vout
->
fmt_in
.
i_sar_den
/
p_vout
->
fmt_in
.
i_sar_num
/
FP_FACTOR
);
}
initwsize_end:
msg_Dbg
(
p_vout
,
"window size: %dx%d"
,
p_vout
->
i_window_width
,
p_vout
->
i_window_height
);
#undef FP_FACTOR
}
...
...
@@ -604,7 +606,9 @@ static int ZoomCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vout_Control
(
p_vout
,
VOUT_SET_ZOOM
,
newval
.
f_float
);
InitWindowSize
(
p_vout
,
&
p_vout
->
i_window_width
,
&
p_vout
->
i_window_height
);
vout_Control
(
p_vout
,
VOUT_SET_ZOOM
);
return
VLC_SUCCESS
;
}
...
...
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