Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
96abd1a0
Commit
96abd1a0
authored
Sep 29, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regression in libvlc_video_set_teletext().
parent
ec2bb2fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
12 deletions
+54
-12
src/control/video.c
src/control/video.c
+54
-12
No files found.
src/control/video.c
View file @
96abd1a0
...
...
@@ -486,7 +486,7 @@ void libvlc_video_set_teletext( libvlc_media_player_t *p_mi, int i_page,
{
vout_thread_t
*
p_vout
=
GetVout
(
p_mi
,
p_e
);
vlc_object_t
*
p_vbi
;
int
i_ret
;
int
i_ret
=
-
1
;
if
(
!
p_vout
)
return
;
...
...
@@ -506,20 +506,62 @@ void libvlc_video_set_teletext( libvlc_media_player_t *p_mi, int i_page,
void
libvlc_toggle_teletext
(
libvlc_media_player_t
*
p_mi
,
libvlc_exception_t
*
p_e
)
{
/* We only work on the first vout */
v
out_thread_t
*
p_vout
=
GetVout
(
p_mi
,
p_e
)
;
bool
opaque
;
int
i_ret
;
input_thread_t
*
p_input_thread
;
v
lc_object_t
*
p_vbi
;
int
i_ret
;
/* GetVout will raise the exception for us */
if
(
!
p_
vout
)
return
;
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
if
(
!
p_
input_thread
)
return
;
opaque
=
var_GetBool
(
p_vout
,
"vbi-opaque"
);
i_ret
=
var_SetBool
(
p_vout
,
"vbi-opaque"
,
!
opaque
);
if
(
i_ret
)
libvlc_exception_raise
(
p_e
,
"Unexpected error while setting teletext transparency"
);
p_vbi
=
(
vlc_object_t
*
)
vlc_object_find_name
(
p_input_thread
,
"zvbi"
,
FIND_ANYWHERE
);
if
(
p_vbi
)
{
const
int
i_teletext_es
=
var_GetInteger
(
p_input_thread
,
"teletext-es"
);
const
int
i_spu_es
=
var_GetInteger
(
p_input_thread
,
"spu-es"
);
vlc_object_release
(
p_vout
);
if
(
(
i_teletext_es
>=
0
)
&&
(
i_teletext_es
==
i_spu_es
)
)
{
int
i_page
=
100
;
i_page
=
var_GetInteger
(
p_vbi
,
"vbi-page"
);
i_page
=
(
i_teletext_es
>=
0
)
?
i_page
:
0
;
i_ret
=
var_SetInteger
(
p_vbi
,
"vbi-page"
,
i_page
);
if
(
i_ret
)
libvlc_exception_raise
(
p_e
,
"Unexpected error while setting teletext page"
);
}
else
if
(
i_teletext_es
>=
0
)
{
bool
opaque
=
true
;
opaque
=
var_GetBool
(
p_vbi
,
"vbi-opaque"
);
i_ret
=
var_SetBool
(
p_vbi
,
"vbi-opaque"
,
!
opaque
);
if
(
i_ret
)
libvlc_exception_raise
(
p_e
,
"Unexpected error while setting teletext transparency"
);
}
vlc_object_release
(
p_vbi
);
}
else
{
/* Teletext is not enabled yet, so enable it.
* Only after it is enable it is possible to view teletext pages
*/
const
int
i_teletext_es
=
var_GetInteger
(
p_input_thread
,
"teletext-es"
);
if
(
i_teletext_es
>=
0
)
{
const
int
i_spu_es
=
var_GetInteger
(
p_input_thread
,
"spu-es"
);
if
(
i_teletext_es
==
i_spu_es
)
var_SetInteger
(
p_input_thread
,
"spu-es"
,
-
1
);
else
var_SetInteger
(
p_input_thread
,
"spu-es"
,
i_teletext_es
);
}
}
vlc_object_release
(
p_input_thread
);
}
int
libvlc_video_destroy
(
libvlc_media_player_t
*
p_mi
,
...
...
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