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
9e4c6586
Commit
9e4c6586
authored
Feb 04, 2010
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: restore Teletext functionality
Reverts part of
7db94f4d
and rewrite the code.
parent
69343b74
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
18 deletions
+84
-18
include/vlc/libvlc_media_player.h
include/vlc/libvlc_media_player.h
+18
-1
projects/activex/vlccontrol2.cpp
projects/activex/vlccontrol2.cpp
+4
-10
projects/mozilla/control/npolibvlc.cpp
projects/mozilla/control/npolibvlc.cpp
+3
-7
src/control/video.c
src/control/video.c
+57
-0
src/libvlc.sym
src/libvlc.sym
+2
-0
No files found.
include/vlc/libvlc_media_player.h
View file @
9e4c6586
/*****************************************************************************
* libvlc_media_player.h: libvlc_media_player external API
*****************************************************************************
* Copyright (C) 1998-20
09
the VideoLAN team
* Copyright (C) 1998-20
10
the VideoLAN team
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
...
...
@@ -712,6 +712,23 @@ VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t * );
VLC_PUBLIC_API
void
libvlc_video_set_crop_geometry
(
libvlc_media_player_t
*
,
const
char
*
);
/**
* Get current teletext page requested.
*
* \param p_mediaplayer the media player
* \return the current teletext page requested.
*/
VLC_PUBLIC_API
int
libvlc_video_get_teletext
(
libvlc_media_player_t
*
);
/**
* Set new teletext page to retrieve.
*
* \param p_mediaplayer the media player
* \param i_page teletex page number requested
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API
void
libvlc_video_set_teletext
(
libvlc_media_player_t
*
,
int
,
libvlc_exception_t
*
);
/**
* Toggle teletext transparent status on video output.
*
...
...
projects/activex/vlccontrol2.cpp
View file @
9e4c6586
...
...
@@ -1180,34 +1180,28 @@ STDMETHODIMP VLCVideo::get_teletext(long* page)
libvlc_media_player_t
*
p_md
;
HRESULT
hr
=
getMD
(
&
p_md
);
#if 0
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t ex;
libvlc_exception_init(&ex);
*
page
=
libvlc_video_get_teletext
(
p_md
);
hr = exception_bridge(&ex);
}
#endif
return
hr
;
};
STDMETHODIMP
VLCVideo
::
put_teletext
(
long
page
)
{
#warning Broken
libvlc_media_player_t
*
p_md
;
HRESULT
hr
=
getMD
(
&
p_md
);
#if 0
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_video_set_teletext(p_md, page);
libvlc_video_set_teletext
(
p_md
,
page
,
&
ex
);
hr
=
exception_bridge
(
&
ex
);
}
#endif
return
hr
;
};
...
...
projects/mozilla/control/npolibvlc.cpp
View file @
9e4c6586
...
...
@@ -1381,12 +1381,11 @@ LibvlcVideoNPObject::getProperty(int index, NPVariant &result)
}
case
ID_video_teletext
:
{
/* int i_page = libvlc_video_get_teletext(p_md, &ex);
RETURN_ON_EXCEPTION(this,ex);
int
i_page
=
libvlc_video_get_teletext
(
p_md
);
if
(
i_page
<
0
)
return
INVOKERESULT_GENERIC_ERROR
;
INT32_TO_NPVARIANT
(
i_page
,
result
);
return
INVOKERESULT_NO_ERROR
;
*/
return
INVOKERESULT_NO_SUCH_METHOD
;
}
case
ID_video_marquee
:
{
...
...
@@ -1491,13 +1490,10 @@ LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
{
if
(
isNumberValue
(
value
)
)
{
/*
libvlc_video_set_teletext
(
p_md
,
numberValue
(
value
),
&
ex
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
return
INVOKERESULT_NO_ERROR
;
*/
return
INVOKERESULT_NO_SUCH_METHOD
;
}
return
INVOKERESULT_INVALID_VALUE
;
}
...
...
src/control/video.c
View file @
9e4c6586
...
...
@@ -388,6 +388,63 @@ void libvlc_video_set_crop_geometry( libvlc_media_player_t *p_mi,
free
(
pp_vouts
);
}
int
libvlc_video_get_teletext
(
libvlc_media_player_t
*
p_mi
)
{
input_thread_t
*
p_input_thread
;
vlc_object_t
*
p_zvbi
=
NULL
;
int
i_ret
=
-
1
,
telx
;
p_input_thread
=
libvlc_get_input_thread
(
p_mi
);
if
(
!
p_input_thread
)
return
i_ret
;
if
(
var_CountChoices
(
p_input_thread
,
"teletext-es"
)
<=
0
)
{
vlc_object_release
(
p_input_thread
);
return
i_ret
;
}
telx
=
var_GetInteger
(
p_input_thread
,
"teletext-es"
);
if
(
input_GetEsObjects
(
p_input_thread
,
telx
,
&
p_zvbi
,
NULL
,
NULL
)
!=
VLC_SUCCESS
)
{
i_ret
=
var_GetInteger
(
p_zvbi
,
"vbi-page"
);
vlc_object_release
(
p_zvbi
);
}
vlc_object_release
(
p_input_thread
);
return
i_ret
;
}
void
libvlc_video_set_teletext
(
libvlc_media_player_t
*
p_mi
,
int
i_page
,
libvlc_exception_t
*
p_e
)
{
input_thread_t
*
p_input_thread
;
vlc_object_t
*
p_zvbi
=
NULL
;
int
telx
;
p_input_thread
=
libvlc_get_input_thread
(
p_mi
);
if
(
!
p_input_thread
)
return
;
if
(
var_CountChoices
(
p_input_thread
,
"teletext-es"
)
<=
0
)
{
vlc_object_release
(
p_input_thread
);
return
;
}
telx
=
var_GetInteger
(
p_input_thread
,
"teletext-es"
);
if
(
input_GetEsObjects
(
p_input_thread
,
telx
,
&
p_zvbi
,
NULL
,
NULL
)
!=
VLC_SUCCESS
)
{
int
i_ret
=
var_SetInteger
(
p_zvbi
,
"vbi-page"
,
i_page
);
vlc_object_release
(
p_zvbi
);
if
(
i_ret
)
{
libvlc_exception_raise
(
p_e
);
libvlc_printerr
(
"Unexpected error while setting teletext page"
);
}
}
vlc_object_release
(
p_input_thread
);
}
void
libvlc_toggle_teletext
(
libvlc_media_player_t
*
p_mi
)
{
input_thread_t
*
p_input_thread
;
...
...
src/libvlc.sym
View file @
9e4c6586
...
...
@@ -176,6 +176,7 @@ libvlc_video_get_scale
libvlc_video_get_spu
libvlc_video_get_spu_count
libvlc_video_get_spu_description
libvlc_video_get_teletext
libvlc_video_get_title_description
libvlc_video_get_track
libvlc_video_get_track_count
...
...
@@ -193,6 +194,7 @@ libvlc_video_set_mouse_input
libvlc_video_set_scale
libvlc_video_set_spu
libvlc_video_set_subtitle_file
libvlc_video_set_teletext
libvlc_video_set_track
libvlc_video_take_snapshot
libvlc_vlm_add_broadcast
...
...
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