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
88660f19
Commit
88660f19
authored
Mar 06, 2014
by
Matthias Keiser
Committed by
Rémi Denis-Courmont
Mar 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
video output: support rotated movies
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
5290dabe
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
0 deletions
+81
-0
include/vlc_vout_display.h
include/vlc_vout_display.h
+13
-0
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/video_output/display.c
src/video_output/display.c
+67
-0
No files found.
include/vlc_vout_display.h
View file @
88660f19
...
...
@@ -436,5 +436,18 @@ typedef struct {
*/
VLC_API
void
vout_display_PlacePicture
(
vout_display_place_t
*
place
,
const
video_format_t
*
source
,
const
vout_display_cfg_t
*
cfg
,
bool
do_clipping
);
/**
* Helper function that applies the necessary transforms to the mouse position
* and then calls vout_display_SendEventMouseMoved.
*
* \param vd vout_display_t.
* \param orient_display The orientation of the picture as seen on screen (probably ORIENT_NORMAL).
* \param m_x Mouse x position (relative to place, origin is top left).
* \param m_y Mouse y position (relative to place, origin is top left).
* \param place Place of the picture.
*/
VLC_API
void
vout_display_SendMouseMovedDisplayCoordinates
(
vout_display_t
*
vd
,
video_orientation_t
orient_display
,
int
m_x
,
int
m_y
,
vout_display_place_t
*
place
);
#endif
/* VLC_VOUT_DISPLAY_H */
src/libvlccore.sym
View file @
88660f19
...
...
@@ -636,6 +636,7 @@ vout_SetDisplayAspect
vout_SetDisplayCrop
vout_display_GetDefaultDisplaySize
vout_display_PlacePicture
vout_display_SendMouseMovedDisplayCoordinates
xml_Create
text_style_Copy
text_style_Delete
...
...
src/video_output/display.c
View file @
88660f19
...
...
@@ -197,6 +197,13 @@ void vout_display_GetDefaultDisplaySize(unsigned *width, unsigned *height,
*
width
=
*
width
*
cfg
->
zoom
.
num
/
cfg
->
zoom
.
den
;
*
height
=
*
height
*
cfg
->
zoom
.
num
/
cfg
->
zoom
.
den
;
if
(
ORIENT_IS_SWAP
(
source
->
orientation
))
{
unsigned
store
=
*
width
;
*
width
=
*
height
;
*
height
=
store
;
}
}
/* */
...
...
@@ -214,6 +221,10 @@ void vout_display_PlacePicture(vout_display_place_t *place,
unsigned
display_width
;
unsigned
display_height
;
video_format_t
source_rot
;
video_format_ApplyRotation
(
source
,
&
source_rot
);
source
=
&
source_rot
;
if
(
cfg
->
is_display_filled
)
{
display_width
=
cfg
->
display
.
width
;
display_height
=
cfg
->
display
.
height
;
...
...
@@ -273,6 +284,62 @@ void vout_display_PlacePicture(vout_display_place_t *place,
}
}
void
vout_display_SendMouseMovedDisplayCoordinates
(
vout_display_t
*
vd
,
video_orientation_t
orient_display
,
int
m_x
,
int
m_y
,
vout_display_place_t
*
place
)
{
video_format_t
source_rot
=
vd
->
source
;
video_format_TransformTo
(
&
source_rot
,
orient_display
);
if
(
place
->
width
>
0
&&
place
->
height
>
0
)
{
int
x
=
(
int
)(
source_rot
.
i_x_offset
+
(
int64_t
)(
m_x
-
place
->
x
)
*
source_rot
.
i_visible_width
/
place
->
width
);
int
y
=
(
int
)(
source_rot
.
i_y_offset
+
(
int64_t
)(
m_y
-
place
->
y
)
*
source_rot
.
i_visible_height
/
place
->
height
);
video_transform_t
transform
=
video_format_GetTransform
(
vd
->
source
.
orientation
,
orient_display
);
int
store
;
switch
(
transform
)
{
case
TRANSFORM_R90
:
store
=
x
;
x
=
y
;
y
=
vd
->
source
.
i_visible_height
-
store
;
break
;
case
TRANSFORM_R180
:
x
=
vd
->
source
.
i_visible_width
-
x
;
y
=
vd
->
source
.
i_visible_height
-
y
;
break
;
case
TRANSFORM_R270
:
store
=
x
;
x
=
vd
->
source
.
i_visible_width
-
y
;
y
=
store
;
break
;
case
TRANSFORM_HFLIP
:
x
=
vd
->
source
.
i_visible_width
-
x
;
break
;
case
TRANSFORM_VFLIP
:
y
=
vd
->
source
.
i_visible_height
-
y
;
break
;
case
TRANSFORM_TRANSPOSE
:
store
=
x
;
x
=
y
;
y
=
store
;
break
;
case
TRANSFORM_ANTI_TRANSPOSE
:
store
=
x
;
x
=
vd
->
source
.
i_visible_width
-
y
;
y
=
vd
->
source
.
i_visible_height
-
store
;
break
;
default:
break
;
}
vout_display_SendEventMouseMoved
(
vd
,
x
,
y
);
}
}
struct
vout_display_owner_sys_t
{
vout_thread_t
*
vout
;
bool
is_wrapper
;
/* Is the current display a wrapper */
...
...
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