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
ab9c3b36
Commit
ab9c3b36
authored
Aug 11, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codec: cc: add background variable (fix #9977)
parent
5a767722
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
modules/codec/cc.c
modules/codec/cc.c
+10
-1
No files found.
modules/codec/cc.c
View file @
ab9c3b36
...
@@ -51,6 +51,10 @@
...
@@ -51,6 +51,10 @@
static
int
Open
(
vlc_object_t
*
);
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
#define OPAQUE_TEXT N_("Opacity")
#define OPAQUE_LONGTEXT N_("Setting to true " \
"makes the text to be boxed and maybe easier to read." )
vlc_module_begin
()
vlc_module_begin
()
set_shortname
(
N_
(
"CC 608/708"
))
set_shortname
(
N_
(
"CC 608/708"
))
set_description
(
N_
(
"Closed Captions decoder"
)
)
set_description
(
N_
(
"Closed Captions decoder"
)
)
...
@@ -58,6 +62,9 @@ vlc_module_begin ()
...
@@ -58,6 +62,9 @@ vlc_module_begin ()
set_category
(
CAT_INPUT
)
set_category
(
CAT_INPUT
)
set_subcategory
(
SUBCAT_INPUT_SCODEC
)
set_subcategory
(
SUBCAT_INPUT_SCODEC
)
set_callbacks
(
Open
,
Close
)
set_callbacks
(
Open
,
Close
)
add_bool
(
"cc-opaque"
,
true
,
OPAQUE_TEXT
,
OPAQUE_LONGTEXT
,
false
)
vlc_module_end
()
vlc_module_end
()
/*****************************************************************************
/*****************************************************************************
...
@@ -150,6 +157,7 @@ struct decoder_sys_t
...
@@ -150,6 +157,7 @@ struct decoder_sys_t
int
i_channel
;
int
i_channel
;
eia608_t
eia608
;
eia608_t
eia608
;
bool
b_opaque
;
};
};
static
subpicture_t
*
Decode
(
decoder_t
*
,
block_t
**
);
static
subpicture_t
*
Decode
(
decoder_t
*
,
block_t
**
);
...
@@ -198,6 +206,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -198,6 +206,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
i_channel
=
i_channel
;
p_sys
->
i_channel
=
i_channel
;
Eia608Init
(
&
p_sys
->
eia608
);
Eia608Init
(
&
p_sys
->
eia608
);
p_sys
->
b_opaque
=
var_InheritBool
(
p_dec
,
"cc-opaque"
);
p_dec
->
fmt_out
.
i_cat
=
SPU_ES
;
p_dec
->
fmt_out
.
i_cat
=
SPU_ES
;
p_dec
->
fmt_out
.
i_codec
=
VLC_CODEC_TEXT
;
p_dec
->
fmt_out
.
i_codec
=
VLC_CODEC_TEXT
;
...
@@ -330,7 +339,7 @@ static subpicture_t *Subtitle( decoder_t *p_dec, text_segment_t *p_segments, mti
...
@@ -330,7 +339,7 @@ static subpicture_t *Subtitle( decoder_t *p_dec, text_segment_t *p_segments, mti
p_spu_sys
->
align
=
SUBPICTURE_ALIGN_LEAVETEXT
;
p_spu_sys
->
align
=
SUBPICTURE_ALIGN_LEAVETEXT
;
p_spu_sys
->
p_segments
=
p_segments
;
p_spu_sys
->
p_segments
=
p_segments
;
p_spu_sys
->
i_font_height_percent
=
5
;
p_spu_sys
->
i_font_height_percent
=
5
;
p_spu_sys
->
renderbg
=
tr
ue
;
p_spu_sys
->
renderbg
=
p_dec
->
p_sys
->
b_opaq
ue
;
return
p_spu
;
return
p_spu
;
}
}
...
...
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