Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
455
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
1e3f6624
Commit
1e3f6624
authored
5 years ago
by
Roland Bewick
Committed by
Thomas Guillem
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
vout: handle secondary-sub-margin callback
Signed-off-by:
Thomas Guillem
<
thomas@gllm.fr
>
parent
08d142ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/video_output/vout_intf.c
+20
-0
20 additions, 0 deletions
src/video_output/vout_intf.c
with
20 additions
and
0 deletions
src/video_output/vout_intf.c
+
20
−
0
View file @
1e3f6624
...
...
@@ -41,6 +41,7 @@
#include
<vlc_vout_osd.h>
#include
<vlc_strings.h>
#include
<vlc_charset.h>
#include
<vlc_spu.h>
#include
"vout_internal.h"
#include
"snapshot.h"
...
...
@@ -74,6 +75,8 @@ static int SubFilterCallback( vlc_object_t *, char const *,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
SubMarginCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
SecondarySubMarginCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
ViewpointCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
...
...
@@ -265,6 +268,11 @@ void vout_CreateVars( vout_thread_t *p_vout )
var_Create
(
p_vout
,
"sub-margin"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
|
VLC_VAR_ISCOMMAND
);
/* Add secondary-sub-margin variable (dual subtitles) */
var_Create
(
p_vout
,
"secondary-sub-margin"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
|
VLC_VAR_ISCOMMAND
);
var_AddCallback
(
p_vout
,
"secondary-sub-margin"
,
SecondarySubMarginCallback
,
NULL
);
/* Mouse coordinates */
var_Create
(
p_vout
,
"mouse-button-down"
,
VLC_VAR_INTEGER
);
var_Create
(
p_vout
,
"mouse-moved"
,
VLC_VAR_COORDS
);
...
...
@@ -308,12 +316,14 @@ void vout_IntfReinit( vout_thread_t *p_vout )
var_TriggerCallback
(
p_vout
,
"sub-source"
);
var_TriggerCallback
(
p_vout
,
"sub-filter"
);
var_TriggerCallback
(
p_vout
,
"sub-margin"
);
var_TriggerCallback
(
p_vout
,
"secondary-sub-margin"
);
}
void
vout_IntfDeinit
(
vlc_object_t
*
obj
)
{
var_DelCallback
(
obj
,
"viewpoint"
,
ViewpointCallback
,
NULL
);
var_DelCallback
(
obj
,
"sub-margin"
,
SubMarginCallback
,
NULL
);
var_DelCallback
(
obj
,
"secondary-sub-margin"
,
SecondarySubMarginCallback
,
NULL
);
var_DelCallback
(
obj
,
"sub-filter"
,
SubFilterCallback
,
NULL
);
var_DelCallback
(
obj
,
"sub-source"
,
SubSourceCallback
,
NULL
);
var_DelCallback
(
obj
,
"video-filter"
,
VideoFilterCallback
,
NULL
);
...
...
@@ -613,6 +623,16 @@ static int SubMarginCallback( vlc_object_t *p_this, char const *psz_cmd,
return
VLC_SUCCESS
;
}
static
int
SecondarySubMarginCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
VLC_UNUSED
(
psz_cmd
);
VLC_UNUSED
(
oldval
);
VLC_UNUSED
(
p_data
);
vout_ChangeSpuChannelMargin
(
p_vout
,
VLC_VOUT_ORDER_SECONDARY
,
newval
.
i_int
);
return
VLC_SUCCESS
;
}
static
int
ViewpointCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment