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
Show 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,15 +47,17 @@
...
@@ -47,15 +47,17 @@
* Local prototypes
* Local prototypes
*****************************************************************************/
*****************************************************************************/
/* Object variables callbacks */
/* 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
*
,
static
int
CropCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
CropBorderCallback
(
vlc_object_t
*
,
char
const
*
,
static
int
CropBorderCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
AspectCallback
(
vlc_object_t
*
,
char
const
*
,
static
int
AspectCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
ScalingCallback
(
vlc_object_t
*
,
char
const
*
,
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
*
);
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
OnTopCallback
(
vlc_object_t
*
,
char
const
*
,
static
int
OnTopCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
vlc_value_t
,
vlc_value_t
,
void
*
);
...
@@ -167,13 +169,13 @@ void vout_IntfInit( vout_thread_t *p_vout )
...
@@ -167,13 +169,13 @@ void vout_IntfInit( vout_thread_t *p_vout )
|
VLC_VAR_ISCOMMAND
);
|
VLC_VAR_ISCOMMAND
);
text
.
psz_string
=
_
(
"Autoscale video"
);
text
.
psz_string
=
_
(
"Autoscale video"
);
var_Change
(
p_vout
,
"autoscale"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
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
var_Create
(
p_vout
,
"scale"
,
VLC_VAR_FLOAT
|
VLC_VAR_DOINHERIT
|
VLC_VAR_ISCOMMAND
);
|
VLC_VAR_ISCOMMAND
);
text
.
psz_string
=
_
(
"Scale factor"
);
text
.
psz_string
=
_
(
"Scale factor"
);
var_Change
(
p_vout
,
"scale"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
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 */
/* Zoom object var */
var_Create
(
p_vout
,
"zoom"
,
VLC_VAR_FLOAT
|
VLC_VAR_ISCOMMAND
|
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,
...
@@ -535,14 +537,6 @@ void vout_EnableFilter( vout_thread_t *p_vout, const char *psz_name,
/*****************************************************************************
/*****************************************************************************
* Object variables callbacks
* 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
,
static
int
CropCallback
(
vlc_object_t
*
object
,
char
const
*
cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
data
)
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
data
)
{
{
...
@@ -598,20 +592,33 @@ static int AspectCallback( vlc_object_t *object, char const *cmd,
...
@@ -598,20 +592,33 @@ static int AspectCallback( vlc_object_t *object, char const *cmd,
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
static
int
ScalingCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
static
int
AutoScaleCallback
(
vlc_object_t
*
obj
,
char
const
*
name
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_
data
)
vlc_value_t
prev
,
vlc_value_t
cur
,
void
*
data
)
{
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
obj
;
(
void
)
oldval
;
(
void
)
newval
;
(
void
)
p_data
;
(
void
)
name
;
(
void
)
prev
;
(
void
)
data
;
vout_ControlChangeDisplayFilled
(
p_vout
,
cur
.
b_bool
);
return
VLC_SUCCESS
;
}
if
(
!
strcmp
(
psz_cmd
,
"autoscale"
)
)
static
int
ScaleCallback
(
vlc_object_t
*
obj
,
char
const
*
name
,
vout_ControlChangeDisplayFilled
(
p_vout
,
newval
.
b_bool
);
vlc_value_t
prev
,
vlc_value_t
cur
,
void
*
data
)
else
if
(
!
strcmp
(
psz_cmd
,
"scale"
)
)
{
vout_ControlChangeZoom
(
p_vout
,
1000
*
newval
.
f_float
,
1000
)
;
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
;
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
,
static
int
OnTopCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
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