Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
e4f2a44d
Commit
e4f2a44d
authored
Sep 06, 2008
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ts demux: simplify the teletext case i_teletext_type to use a table.
parent
a4112126
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
52 deletions
+15
-52
modules/demux/ts.c
modules/demux/ts.c
+15
-52
No files found.
modules/demux/ts.c
View file @
e4f2a44d
...
...
@@ -185,6 +185,14 @@ vlc_module_end();
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
const
char
*
const
ppsz_teletext_type
[]
=
{
""
,
N_
(
"Teletext"
),
N_
(
"Teletext subtitles"
),
N_
(
"Teletext additional information"
),
N_
(
"Teletext programme schedule"
),
N_
(
"Teletext hearing impaired subtitles"
)
};
typedef
struct
{
...
...
@@ -3440,66 +3448,21 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
p_page
->
i_iso6392_language_code
,
3
);
p_es
->
fmt
.
psz_language
[
3
]
=
0
;
}
switch
(
p_page
->
i_teletext_type
)
{
case
0x1
:
p_es
->
fmt
.
psz_description
=
strdup
(
_
(
"Teletext"
));
msg_Dbg
(
p_demux
,
" * ttxt lan=%s page=%d%02x"
,
p_es
->
fmt
.
psz_language
,
p_page
->
i_teletext_magazine_number
,
p_page
->
i_teletext_page_number
);
break
;
case
0x2
:
p_es
->
fmt
.
psz_description
=
strdup
(
_
(
"Teletext subtitles"
));
msg_Dbg
(
p_demux
,
" * sub lan=%s page=%d%02x"
,
p_es
->
fmt
.
psz_language
,
p_page
->
i_teletext_magazine_number
,
p_page
->
i_teletext_page_number
);
break
;
p_es
->
fmt
.
psz_description
=
strdup
(
_
(
ppsz_teletext_type
[
p_page
->
i_teletext_type
]));
case
0x3
:
p_es
->
fmt
.
psz_description
=
strdup
(
_
(
"Teletext additional information"
));
msg_Dbg
(
p_demux
,
" * info lan=%s page=%d%02x"
,
msg_Dbg
(
p_demux
,
" * ttxt type=%s lan=%s page=%d%02x"
,
p_es
->
fmt
.
psz_description
,
p_es
->
fmt
.
psz_language
,
p_page
->
i_teletext_magazine_number
,
p_page
->
i_teletext_page_number
);
break
;
case
0x4
:
p_es
->
fmt
.
psz_description
=
strdup
(
_
(
"Teletext programme schedule"
));
msg_Dbg
(
p_demux
,
" * sched lan=%s page=%d%02x"
,
p_es
->
fmt
.
psz_language
,
p_page
->
i_teletext_magazine_number
,
p_page
->
i_teletext_page_number
);
break
;
case
0x5
:
p_es
->
fmt
.
psz_description
=
strdup
(
_
(
"Teletext hearing impaired subtitles"
));
msg_Dbg
(
p_demux
,
" * hearing impaired lan=%s page=%d%02x"
,
p_es
->
fmt
.
psz_language
,
p_page
->
i_teletext_magazine_number
,
p_page
->
i_teletext_page_number
);
break
;
default:
break
;
}
/* Hack, FIXME This stores the initial page for this track,
so that it can be used by the telx and zvbi decoders. */
p_es
->
fmt
.
subs
.
dvb
.
i_id
=
p_page
->
i_teletext_page_number
;
/* Hack, FIXME */
p_es
->
fmt
.
subs
.
dvb
.
i_id
|=
((
int
)
p_page
->
i_teletext_magazine_number
<<
16
);
((
int
)
p_page
->
i_teletext_magazine_number
<<
16
);
i
++
;
}
...
...
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