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
6521130d
Commit
6521130d
authored
Aug 28, 2007
by
Jean-Paul Saman
Committed by
Jean-Paul Saman
Mar 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace and tabs cleanup
parent
1299930e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
21 deletions
+20
-21
modules/codec/zvbi.c
modules/codec/zvbi.c
+20
-21
No files found.
modules/codec/zvbi.c
View file @
6521130d
...
...
@@ -43,11 +43,11 @@ typedef enum {
DATA_UNIT_EBU_TELETEXT_NON_SUBTITLE
=
0x02
,
DATA_UNIT_EBU_TELETEXT_SUBTITLE
=
0x03
,
DATA_UNIT_EBU_TELETEXT_INVERTED
=
0x0C
,
DATA_UNIT_ZVBI_WSS_CPR1204
=
0xB4
,
DATA_UNIT_ZVBI_CLOSED_CAPTION_525
=
0xB5
,
DATA_UNIT_ZVBI_MONOCHROME_SAMPLES_525
=
0xB6
,
DATA_UNIT_VPS
=
0xC3
,
DATA_UNIT_WSS
=
0xC4
,
DATA_UNIT_CLOSED_CAPTION
=
0xC5
,
...
...
@@ -137,16 +137,16 @@ static int Open( vlc_object_t *p_this )
if
(
(
p_sys
->
p_vbi_dec
==
NULL
)
||
(
p_sys
->
p_dvb_demux
==
NULL
)
)
{
msg_Err
(
p_dec
,
"VBI decoder/demux could not be created."
);
Close
(
p_dec
);
return
VLC_ENOMEM
;
}
vbi_event_handler_register
(
p_sys
->
p_vbi_dec
,
VBI_EVENT_TTX_PAGE
|
VBI_EVENT_CAPTION
|
VBI_EVENT_NETWORK
|
VBI_EVENT_ASPECT
|
VBI_EVENT_PROG_INFO
,
event_handler
,
p_dec
);
VBI_EVENT_TTX_PAGE
|
VBI_EVENT_CAPTION
|
VBI_EVENT_NETWORK
|
VBI_EVENT_ASPECT
|
VBI_EVENT_PROG_INFO
,
event_handler
,
p_dec
);
/* Create the var on vlc_global. */
p_sys
->
i_wanted_page
=
var_CreateGetInteger
(
p_dec
->
p_libvlc
,
"vbi-page"
);
p_sys
->
i_wanted_page
=
var_CreateGetInteger
(
p_dec
->
p_libvlc
,
"vbi-page"
);
var_AddCallback
(
p_dec
->
p_libvlc
,
"vbi-page"
,
RequestPage
,
p_sys
);
p_sys
->
b_opaque
=
var_CreateGetBool
(
p_dec
,
"vbi-opaque"
);
...
...
@@ -195,16 +195,16 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
p_pos
=
p_block
->
p_buffer
;
i_left
=
p_block
->
i_buffer
;
while
(
i_left
>
0
)
{
vbi_sliced
p_sliced
[
MAX_SLICES
];
unsigned
int
i_lines
=
0
;
int64_t
i_pts
;
i_lines
=
vbi_dvb_demux_cor
(
p_sys
->
p_dvb_demux
,
p_sliced
,
MAX_SLICES
,
&
i_pts
,
&
p_pos
,
&
i_left
);
if
(
i_lines
>
0
)
vbi_decode
(
p_sys
->
p_vbi_dec
,
p_sliced
,
i_lines
,
i_pts
/
90000
.
0
);
}
...
...
@@ -214,14 +214,14 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
vbi_dec2bcd
(
p_sys
->
i_wanted_page
),
VBI_ANY_SUBNO
,
VBI_WST_LEVEL_3p5
,
25
,
FALSE
);
if
(
!
b_cached
)
goto
error
;
if
(
(
p_sys
->
i_wanted_page
==
p_sys
->
i_last_page
)
&&
(
p_sys
->
b_update
!=
VLC_TRUE
)
)
goto
error
;
p_sys
->
i_last_page
=
p_sys
->
i_wanted_page
;
p_sys
->
b_update
=
VLC_FALSE
;
msg_Dbg
(
p_dec
,
"we now have page: %d ready for display"
,
...
...
@@ -235,7 +235,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
msg_Warn
(
p_dec
,
"can't get spu buffer"
);
goto
error
;
}
/* Create a new subpicture region */
memset
(
&
fmt
,
0
,
sizeof
(
video_format_t
)
);
fmt
.
i_chroma
=
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'A'
);
...
...
@@ -254,7 +254,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
}
p_spu
->
p_region
->
i_x
=
0
;
p_spu
->
p_region
->
i_y
=
0
;
/* Normal text subs, easy markup */
p_spu
->
i_flags
=
SUBPICTURE_ALIGN_TOP
;
...
...
@@ -341,7 +341,7 @@ static void event_handler( vbi_event *ev, void *user_data)
{
decoder_t
*
p_dec
=
(
decoder_t
*
)
user_data
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
if
(
ev
->
type
==
VBI_EVENT_TTX_PAGE
)
{
/* msg_Dbg( p_dec, "Page %03x.%02x ",
...
...
@@ -350,7 +350,7 @@ static void event_handler( vbi_event *ev, void *user_data)
*/
if
(
p_sys
->
i_last_page
==
vbi_bcd2dec
(
ev
->
ev
.
ttx_page
.
pgno
)
)
p_sys
->
b_update
=
VLC_TRUE
;
if
(
ev
->
ev
.
ttx_page
.
clock_update
)
msg_Dbg
(
p_dec
,
"clock"
);
if
(
ev
->
ev
.
ttx_page
.
header_update
)
...
...
@@ -370,10 +370,10 @@ static int RequestPage( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
decoder_sys_t
*
p_sys
=
p_data
;
if
(
(
newval
.
i_int
>
0
)
&&
(
newval
.
i_int
<
999
)
)
p_sys
->
i_wanted_page
=
newval
.
i_int
;
return
VLC_SUCCESS
;
}
...
...
@@ -386,4 +386,3 @@ static int Opaque( vlc_object_t *p_this, char const *psz_cmd,
p_sys
->
b_opaque
=
newval
.
b_bool
;
return
VLC_SUCCESS
;
}
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