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
504ca2f0
Commit
504ca2f0
authored
May 25, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout: separate scale and autoscale callbacks
parent
d27078c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
22 deletions
+29
-22
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+29
-22
No files found.
src/video_output/vout_intf.c
View file @
504ca2f0
...
...
@@ -47,16 +47,18 @@
* Local prototypes
*****************************************************************************/
/* Object variables callbacks */
static
int
ZoomCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
CropCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
CropBorderCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
AspectCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
ScalingCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
AutoScaleCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
ScaleCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
ZoomCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
OnTopCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
FullscreenCallback
(
vlc_object_t
*
,
char
const
*
,
...
...
@@ -167,13 +169,13 @@ void vout_IntfInit( vout_thread_t *p_vout )
|
VLC_VAR_ISCOMMAND
);
text
.
psz_string
=
_
(
"Autoscale video"
);
var_Change
(
p_vout
,
"autoscale"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
var_AddCallback
(
p_vout
,
"autoscale"
,
Scaling
Callback
,
NULL
);
var_AddCallback
(
p_vout
,
"autoscale"
,
AutoScale
Callback
,
NULL
);
var_Create
(
p_vout
,
"scale"
,
VLC_VAR_FLOAT
|
VLC_VAR_DOINHERIT
|
VLC_VAR_ISCOMMAND
);
text
.
psz_string
=
_
(
"Scale factor"
);
var_Change
(
p_vout
,
"scale"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
var_AddCallback
(
p_vout
,
"scale"
,
Scal
ing
Callback
,
NULL
);
var_AddCallback
(
p_vout
,
"scale"
,
Scal
e
Callback
,
NULL
);
/* Zoom object var */
var_Create
(
p_vout
,
"zoom"
,
VLC_VAR_FLOAT
|
VLC_VAR_ISCOMMAND
|
...
...
@@ -535,14 +537,6 @@ void vout_EnableFilter( vout_thread_t *p_vout, const char *psz_name,
/*****************************************************************************
* Object variables callbacks
*****************************************************************************/
static
int
ZoomCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
p_data
;
return
var_SetFloat
(
p_this
,
"scale"
,
newval
.
f_float
);
}
static
int
CropCallback
(
vlc_object_t
*
object
,
char
const
*
cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
data
)
{
...
...
@@ -598,20 +592,33 @@ static int AspectCallback( vlc_object_t *object, char const *cmd,
return
VLC_SUCCESS
;
}
static
int
ScalingCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_
data
)
static
int
AutoScaleCallback
(
vlc_object_t
*
obj
,
char
const
*
name
,
vlc_value_t
prev
,
vlc_value_t
cur
,
void
*
data
)
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
(
void
)
oldval
;
(
void
)
newval
;
(
void
)
p_data
;
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
obj
;
(
void
)
name
;
(
void
)
prev
;
(
void
)
data
;
vout_ControlChangeDisplayFilled
(
p_vout
,
cur
.
b_bool
);
return
VLC_SUCCESS
;
}
if
(
!
strcmp
(
psz_cmd
,
"autoscale"
)
)
vout_ControlChangeDisplayFilled
(
p_vout
,
newval
.
b_bool
);
else
if
(
!
strcmp
(
psz_cmd
,
"scale"
)
)
vout_ControlChangeZoom
(
p_vout
,
1000
*
newval
.
f_float
,
1000
)
;
static
int
ScaleCallback
(
vlc_object_t
*
obj
,
char
const
*
name
,
vlc_value_t
prev
,
vlc_value_t
cur
,
void
*
data
)
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
obj
;
(
void
)
name
;
(
void
)
prev
;
(
void
)
data
;
vout_ControlChangeZoom
(
p_vout
,
1000
*
cur
.
f_float
,
1000
);
return
VLC_SUCCESS
;
}
static
int
ZoomCallback
(
vlc_object_t
*
obj
,
char
const
*
name
,
vlc_value_t
prev
,
vlc_value_t
cur
,
void
*
data
)
{
(
void
)
name
;
(
void
)
prev
;
(
void
)
data
;
return
var_SetFloat
(
obj
,
"scale"
,
cur
.
f_float
);
}
static
int
OnTopCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
...
...
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