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
6399a8e7
Commit
6399a8e7
authored
Aug 23, 2007
by
Jean-Paul Saman
Committed by
Jean-Paul Saman
Mar 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Select teletext page to view from JavaScript in IE ActiveX, Mozilla/Firefox and Safari browser.
parent
446c1fc4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
164 additions
and
29 deletions
+164
-29
activex/axvlc.idl
activex/axvlc.idl
+6
-1
activex/vlccontrol2.cpp
activex/vlccontrol2.cpp
+52
-0
activex/vlccontrol2.h
activex/vlccontrol2.h
+10
-0
include/vlc/libvlc.h
include/vlc/libvlc.h
+32
-0
mozilla/control/npolibvlc.cpp
mozilla/control/npolibvlc.cpp
+34
-1
src/control/video.c
src/control/video.c
+30
-27
No files found.
activex/axvlc.idl
View file @
6399a8e7
...
...
@@ -426,7 +426,12 @@ library AXVLC
HRESULT
subtitle
(
[
out
,
retval
]
long
*
spu
)
;
[
propput
,
helpstring
(
"Sets video subtitle to use."
)
]
HRESULT
subtitle
(
[
in
]
long
spu
)
;
[
propget
,
helpstring
(
"Returns teletext page used."
)
]
HRESULT
teletext
(
[
out
,
retval
]
long
*
page
)
;
[
propput
,
helpstring
(
"Sets teletext page to use."
)
]
HRESULT
teletext
(
[
in
]
long
page
)
;
[
helpstring
(
"toggle fullscreen/windowed state."
)
]
HRESULT
toggleFullscreen
()
;
}
;
...
...
activex/vlccontrol2.cpp
View file @
6399a8e7
...
...
@@ -2272,6 +2272,58 @@ STDMETHODIMP VLCVideo::put_subtitle(long spu)
return
hr
;
};
STDMETHODIMP
VLCVideo
::
get_teletext
(
long
*
page
)
{
if
(
NULL
==
page
)
return
E_POINTER
;
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_libvlc
,
&
ex
);
if
(
!
libvlc_exception_raised
(
&
ex
)
)
{
*
page
=
libvlc_video_get_teletext
(
p_input
,
&
ex
);
libvlc_input_free
(
p_input
);
if
(
!
libvlc_exception_raised
(
&
ex
)
)
{
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCVideo
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
return
hr
;
};
STDMETHODIMP
VLCVideo
::
put_teletext
(
long
page
)
{
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_libvlc
,
&
ex
);
libvlc_video_set_teletext
(
p_input
,
page
,
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCVideo
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
return
NOERROR
;
}
return
hr
;
};
STDMETHODIMP
VLCVideo
::
toggleFullscreen
()
{
libvlc_instance_t
*
p_libvlc
;
...
...
activex/vlccontrol2.h
View file @
6399a8e7
...
...
@@ -66,6 +66,11 @@ public:
STDMETHODIMP
put_mute
(
VARIANT_BOOL
);
STDMETHODIMP
get_volume
(
long
*
);
STDMETHODIMP
put_volume
(
long
);
STDMETHODIMP
get_track
(
long
*
);
STDMETHODIMP
put_track
(
long
);
STDMETHODIMP
get_channel
(
long
*
);
STDMETHODIMP
put_channel
(
long
);
STDMETHODIMP
toggleMute
();
protected:
...
...
@@ -518,6 +523,11 @@ public:
STDMETHODIMP
get_height
(
long
*
);
STDMETHODIMP
get_aspectRatio
(
BSTR
*
);
STDMETHODIMP
put_aspectRatio
(
BSTR
);
STDMETHODIMP
get_subtitle
(
long
*
);
STDMETHODIMP
put_subtitle
(
long
);
STDMETHODIMP
get_teletext
(
long
*
);
STDMETHODIMP
put_teletext
(
long
);
STDMETHODIMP
toggleFullscreen
();
protected:
...
...
include/vlc/libvlc.h
View file @
6399a8e7
...
...
@@ -345,6 +345,38 @@ char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exception_t * );
*/
void
libvlc_video_set_aspect_ratio
(
libvlc_input_t
*
,
char
*
,
libvlc_exception_t
*
);
/**
* Get current video subtitle track
* \param p_input the input
* \param p_exception an initialized exception
* \return the video current subtitle track
*/
int
libvlc_video_get_spu
(
libvlc_input_t
*
,
libvlc_exception_t
*
);
/**
* Set new video subtitle track
* \param p_input the input
* \param psz_aspect new video subtitle track
* \param p_exception an initialized exception
*/
void
libvlc_video_set_spu
(
libvlc_input_t
*
,
int
,
libvlc_exception_t
*
);
/**
* Get current teletext page requested.
* \param p_input the input
* \param p_exception an initialized exception
* \return the current teletext page requested.
*/
int
libvlc_video_get_teletext
(
libvlc_input_t
*
,
libvlc_exception_t
*
);
/**
* Set new teletext page to retrieve
* \param p_input the input
* \param i_page teletex page number requested
* \param p_exception an initialized exception
*/
void
libvlc_video_set_teletext
(
libvlc_input_t
*
,
int
,
libvlc_exception_t
*
);
/**
* Take a snapshot of the current video window
* \param p_input the input
...
...
mozilla/control/npolibvlc.cpp
View file @
6399a8e7
...
...
@@ -1772,6 +1772,19 @@ void LibvlcPlaylistNPObject::parseOptions(NPObject *obj, int *i_options, char***
*
i_options
=
nOptions
;
*
ppsz_options
=
options
;
}
case
ID_video_teletext
:
{
int
i_page
=
libvlc_video_get_teletext
(
p_input
,
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
INT32_TO_NPVARIANT
(
i_page
,
result
);
return
INVOKERESULT_NO_ERROR
;
}
}
}
}
...
...
@@ -1786,7 +1799,8 @@ const NPUTF8 * const LibvlcVideoNPObject::propertyNames[] =
"height"
,
"width"
,
"aspectRatio"
,
"subtitle"
"subtitle"
,
"teletext"
};
enum
LibvlcVideoNPObjectPropertyIds
...
...
@@ -1796,6 +1810,7 @@ enum LibvlcVideoNPObjectPropertyIds
ID_video_width
,
ID_video_aspectratio
,
ID_video_subtitle
ID_video_teletext
};
const
int
LibvlcVideoNPObject
::
propertyCount
=
sizeof
(
LibvlcVideoNPObject
::
propertyNames
)
/
sizeof
(
NPUTF8
*
);
...
...
@@ -1887,6 +1902,24 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
INT32_TO_NPVARIANT
(
i_spu
,
result
);
return
INVOKERESULT_NO_ERROR
;
}
case
ID_video_teletext
:
{
if
(
isNumberValue
(
value
)
)
{
libvlc_video_set_teletext
(
p_input
,
numberValue
(
value
),
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
return
INVOKERESULT_NO_ERROR
;
}
libvlc_input_free
(
p_input
);
return
INVOKERESULT_INVALID_VALUE
;
}
}
libvlc_input_free
(
p_input
);
}
...
...
src/control/video.c
View file @
6399a8e7
...
...
@@ -56,33 +56,6 @@ static input_thread_t *GetInput( libvlc_input_t *p_input,
return
p_input_thread
;
}
/*
* Remember to release the returned input_thread_t since it is locked at
* the end of this function.
*/
static
input_thread_t
*
GetInput
(
libvlc_input_t
*
p_input
,
libvlc_exception_t
*
p_exception
)
{
input_thread_t
*
p_input_thread
=
NULL
;
if
(
!
p_input
)
{
libvlc_exception_raise
(
p_exception
,
"Input is NULL"
);
return
NULL
;
}
p_input_thread
=
(
input_thread_t
*
)
vlc_object_get
(
p_input
->
p_instance
->
p_vlc
,
p_input
->
i_input_id
);
if
(
!
p_input_thread
)
{
libvlc_exception_raise
(
p_exception
,
"Input does not exist"
);
return
NULL
;
}
return
p_input_thread
;
}
/*
* Remember to release the returned vout_thread_t since it is locked at
* the end of this function.
...
...
@@ -484,6 +457,36 @@ void libvlc_video_set_spu( libvlc_input_t *p_input, int i_spu,
vlc_object_release
(
p_input_thread
);
}
int
libvlc_video_get_teletext
(
libvlc_input_t
*
p_input
,
libvlc_exception_t
*
p_e
)
{
vout_thread_t
*
p_vout
=
GetVout
(
p_input
,
p_e
);
int
i_ret
=
-
1
;
if
(
!
p_vout
)
return
i_ret
;
i_ret
=
var_GetInteger
(
p_vout
,
"vbi-page"
);
vlc_object_release
(
p_vout
);
return
i_ret
;
}
void
libvlc_video_set_teletext
(
libvlc_input_t
*
p_input
,
int
i_page
,
libvlc_exception_t
*
p_e
)
{
vout_thread_t
*
p_vout
=
GetVout
(
p_input
,
p_e
);
int
i_ret
=
-
1
;
if
(
!
p_vout
)
return
;
i_ret
=
var_SetInteger
(
p_vout
,
"vbi-page"
,
i_page
);
if
(
i_ret
)
libvlc_exception_raise
(
p_e
,
"Unexpected error while setting teletext page"
);
vlc_object_release
(
p_vout
);
}
int
libvlc_video_destroy
(
libvlc_input_t
*
p_input
,
libvlc_exception_t
*
p_e
)
{
...
...
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