Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
883daa52
Commit
883daa52
authored
Oct 23, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/video_output/directx/*: support for cropping.
parent
d35b01cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
13 deletions
+21
-13
modules/video_output/directx/directx.c
modules/video_output/directx/directx.c
+7
-3
modules/video_output/directx/events.c
modules/video_output/directx/events.c
+14
-10
No files found.
modules/video_output/directx/directx.c
View file @
883daa52
...
...
@@ -356,6 +356,7 @@ static int Init( vout_thread_t *p_vout )
p_vout
->
output
.
i_width
=
p_vout
->
render
.
i_width
;
p_vout
->
output
.
i_height
=
p_vout
->
render
.
i_height
;
p_vout
->
output
.
i_aspect
=
p_vout
->
render
.
i_aspect
;
p_vout
->
fmt_out
=
p_vout
->
fmt_in
;
#define MAX_DIRECTBUFFERS 1
/* Right now we use only 1 directbuffer because we don't want the
...
...
@@ -413,6 +414,7 @@ static int Init( vout_thread_t *p_vout )
/* Change the window title bar text */
PostMessage
(
p_vout
->
p_sys
->
hwnd
,
WM_VLC_CHANGE_TEXT
,
0
,
0
);
p_vout
->
fmt_out
.
i_chroma
=
p_vout
->
output
.
i_chroma
;
return
VLC_SUCCESS
;
}
...
...
@@ -1223,14 +1225,16 @@ int E_(DirectXUpdateOverlay)( vout_thread_t *p_vout )
RECT
rect_dest
=
p_vout
->
p_sys
->
rect_dest_clipped
;
if
(
!
p_vout
->
p_sys
->
b_using_overlay
)
return
VLC_EGENERIC
;
msg_Err
(
p_vout
,
"update overlay"
);
if
(
p_vout
->
p_sys
->
b_wallpaper
)
{
int
i_x
,
i_y
,
i_width
,
i_height
;
rect_src
.
left
=
rect_src
.
top
=
0
;
rect_src
.
right
=
p_vout
->
render
.
i_width
;
rect_src
.
bottom
=
p_vout
->
render
.
i_height
;
rect_src
.
left
=
p_vout
->
fmt_out
.
i_x_offset
;
rect_src
.
top
=
p_vout
->
fmt_out
.
i_y_offset
;
rect_src
.
right
=
rect_src
.
left
+
p_vout
->
fmt_out
.
i_visible_width
;
rect_src
.
bottom
=
rect_src
.
top
+
p_vout
->
fmt_out
.
i_visible_height
;
rect_dest
=
p_vout
->
p_sys
->
rect_display
;
vout_PlacePicture
(
p_vout
,
rect_dest
.
right
,
rect_dest
.
bottom
,
...
...
modules/video_output/directx/events.c
View file @
883daa52
...
...
@@ -649,16 +649,20 @@ void E_(DirectXUpdateRects)( vout_thread_t *p_vout, vlc_bool_t b_force )
rect_src
.
bottom
=
p_vout
->
render
.
i_height
;
/* Clip the source image */
rect_src_clipped
.
left
=
(
rect_dest_clipped
.
left
-
rect_dest
.
left
)
*
p_vout
->
render
.
i_width
/
(
rect_dest
.
right
-
rect_dest
.
left
);
rect_src_clipped
.
right
=
p_vout
->
render
.
i_width
-
(
rect_dest
.
right
-
rect_dest_clipped
.
right
)
*
p_vout
->
render
.
i_width
/
(
rect_dest
.
right
-
rect_dest
.
left
);
rect_src_clipped
.
top
=
(
rect_dest_clipped
.
top
-
rect_dest
.
top
)
*
p_vout
->
render
.
i_height
/
(
rect_dest
.
bottom
-
rect_dest
.
top
);
rect_src_clipped
.
bottom
=
p_vout
->
render
.
i_height
-
(
rect_dest
.
bottom
-
rect_dest_clipped
.
bottom
)
*
p_vout
->
render
.
i_height
/
(
rect_dest
.
bottom
-
rect_dest
.
top
);
rect_src_clipped
.
left
=
p_vout
->
fmt_out
.
i_x_offset
+
(
rect_dest_clipped
.
left
-
rect_dest
.
left
)
*
p_vout
->
fmt_out
.
i_visible_width
/
(
rect_dest
.
right
-
rect_dest
.
left
);
rect_src_clipped
.
right
=
p_vout
->
fmt_out
.
i_x_offset
+
p_vout
->
fmt_out
.
i_visible_width
-
(
rect_dest
.
right
-
rect_dest_clipped
.
right
)
*
p_vout
->
fmt_out
.
i_visible_width
/
(
rect_dest
.
right
-
rect_dest
.
left
);
rect_src_clipped
.
top
=
p_vout
->
fmt_out
.
i_y_offset
+
(
rect_dest_clipped
.
top
-
rect_dest
.
top
)
*
p_vout
->
fmt_out
.
i_visible_height
/
(
rect_dest
.
bottom
-
rect_dest
.
top
);
rect_src_clipped
.
bottom
=
p_vout
->
fmt_out
.
i_y_offset
+
p_vout
->
fmt_out
.
i_visible_height
-
(
rect_dest
.
bottom
-
rect_dest_clipped
.
bottom
)
*
p_vout
->
fmt_out
.
i_visible_height
/
(
rect_dest
.
bottom
-
rect_dest
.
top
);
/* Apply overlay hardware constraints */
if
(
p_vout
->
p_sys
->
b_using_overlay
)
...
...
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