Commit 36a148a5 authored by Jean-Paul Saman's avatar Jean-Paul Saman

JavaScript API to change the selected teletext page from IE ActiveX,...

JavaScript API to change the selected teletext page from IE ActiveX, Mozilla/Firefox, Safari webbrowser plugins.
parent 9675fc04
......@@ -434,6 +434,11 @@ library AXVLC
[propput, helpstring("Sets crop filter geometry.")]
HRESULT crop([in] BSTR geometry);
[propget, helpstring("Returns teletext page used.")]
HRESULT subtitle([out, retval] long* page);
[propput, helpstring("Sets teletext page to use.")]
HRESULT subtitle([in] long page);
[helpstring("toggle fullscreen/windowed state.")]
HRESULT toggleFullscreen();
......
......@@ -2354,6 +2354,58 @@ STDMETHODIMP VLCVideo::put_crop(BSTR geometry)
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::takeSnapshot(LPPICTUREDISP* picture)
{
if( NULL == picture )
......
......@@ -526,6 +526,8 @@ public:
STDMETHODIMP put_subtitle(long);
STDMETHODIMP get_crop(BSTR*);
STDMETHODIMP put_crop(BSTR);
STDMETHODIMP get_teletext(long*);
STDMETHODIMP put_teletext(long);
STDMETHODIMP takeSnapshot(LPPICTUREDISP*);
STDMETHODIMP toggleFullscreen();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment