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
305b0ad3
Commit
305b0ad3
authored
May 07, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB/X11: handle scaling, crop and A/R
(Crop is currently dysfunctional, picture offset are missing)
parent
bad101ba
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
0 deletions
+46
-0
modules/video_output/xcb/common.c
modules/video_output/xcb/common.c
+43
-0
modules/video_output/xcb/x11.c
modules/video_output/xcb/x11.c
+2
-0
modules/video_output/xcb/xcb_vlc.h
modules/video_output/xcb/xcb_vlc.h
+1
-0
No files found.
modules/video_output/xcb/common.c
View file @
305b0ad3
...
...
@@ -226,3 +226,46 @@ void PictureFree (picture_t *pic, xcb_connection_t *conn)
}
shmdt
(
pic
->
p
->
p_pixels
);
}
/**
* Video output thread management stuff.
* FIXME: Much of this should move to core
*/
void
CommonManage
(
vout_thread_t
*
vout
)
{
if
(
vout
->
i_changes
&
VOUT_SCALE_CHANGE
)
{
vout
->
b_autoscale
=
var_GetBool
(
vout
,
"autoscale"
);
vout
->
i_zoom
=
ZOOM_FP_FACTOR
;
vout
->
i_changes
&=
~
VOUT_SCALE_CHANGE
;
vout
->
i_changes
|=
VOUT_SIZE_CHANGE
;
}
if
(
vout
->
i_changes
&
VOUT_ZOOM_CHANGE
)
{
vout
->
b_autoscale
=
false
;
vout
->
i_zoom
=
var_GetFloat
(
vout
,
"scale"
)
*
ZOOM_FP_FACTOR
;
vout
->
i_changes
&=
~
VOUT_ZOOM_CHANGE
;
vout
->
i_changes
|=
VOUT_SIZE_CHANGE
;
}
if
(
vout
->
i_changes
&
VOUT_CROP_CHANGE
)
{
vout
->
fmt_out
.
i_x_offset
=
vout
->
fmt_in
.
i_x_offset
;
vout
->
fmt_out
.
i_y_offset
=
vout
->
fmt_in
.
i_y_offset
;
vout
->
fmt_out
.
i_visible_width
=
vout
->
fmt_in
.
i_visible_width
;
vout
->
fmt_out
.
i_visible_height
=
vout
->
fmt_in
.
i_visible_height
;
vout
->
i_changes
&=
~
VOUT_CROP_CHANGE
;
vout
->
i_changes
|=
VOUT_SIZE_CHANGE
;
}
if
(
vout
->
i_changes
&
VOUT_ASPECT_CHANGE
)
{
vout
->
fmt_out
.
i_aspect
=
vout
->
fmt_in
.
i_aspect
;
vout
->
fmt_out
.
i_sar_num
=
vout
->
fmt_in
.
i_sar_num
;
vout
->
fmt_out
.
i_sar_den
=
vout
->
fmt_in
.
i_sar_den
;
vout
->
output
.
i_aspect
=
vout
->
fmt_in
.
i_aspect
;
vout
->
i_changes
&=
~
VOUT_ASPECT_CHANGE
;
vout
->
i_changes
|=
VOUT_SIZE_CHANGE
;
}
}
modules/video_output/xcb/x11.c
View file @
305b0ad3
...
...
@@ -408,6 +408,8 @@ static int Manage (vout_thread_t *vout)
msg_Err
(
vout
,
"X server failure"
);
return
VLC_EGENERIC
;
}
CommonManage
(
vout
);
/* FIXME: <-- move that to core */
return
VLC_SUCCESS
;
}
...
...
modules/video_output/xcb/xcb_vlc.h
View file @
305b0ad3
...
...
@@ -51,3 +51,4 @@ int GetWindowSize (struct vout_window_t *wnd, xcb_connection_t *conn,
unsigned
*
restrict
width
,
unsigned
*
restrict
height
);
int
PictureAlloc
(
vout_thread_t
*
,
picture_t
*
,
size_t
,
xcb_connection_t
*
);
void
PictureFree
(
picture_t
*
pic
,
xcb_connection_t
*
conn
);
void
CommonManage
(
vout_thread_t
*
);
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