Commit 95613ae8 authored by Cyril Mathé's avatar Cyril Mathé Committed by Jean-Baptiste Kempf

ActiveX: Deinterlace JS Binding

- video.deinterlaceEnable(char *mode) : enable deinterlace filter which type is defined by mode
     - video.deinterlaceDisable()          : disable deinterlace filter
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 81e4ca66
......@@ -467,6 +467,11 @@ library AXVLC
[propput, helpstring("Sets teletext page to use.")]
HRESULT teletext([in] long page);
[helpstring("Enable deinterlace filter.")]
HRESULT deinterlaceEnable([in] BSTR mode);
[helpstring("Disable deinterlace filter.")]
HRESULT deinterlaceDisable();
[helpstring("toggle fullscreen/windowed state.")]
HRESULT toggleFullscreen();
......
......@@ -2220,6 +2220,39 @@ STDMETHODIMP VLCVideo::put_teletext(long page)
return hr;
};
STDMETHODIMP VLCVideo::deinterlaceDisable()
{
libvlc_media_player_t *p_md;
HRESULT hr = _p_instance->getMD(&p_md);
if( SUCCEEDED(hr) )
{
libvlc_exception_t ex;
libvlc_exception_init(&ex);
libvlc_video_set_deinterlace(p_md, 0, "", &ex);
hr = exception_bridge(&ex);
}
return hr;
};
STDMETHODIMP VLCVideo::deinterlaceEnable(BSTR mode)
{
libvlc_media_player_t *p_md;
HRESULT hr = _p_instance->getMD(&p_md);
if( SUCCEEDED(hr) )
{
libvlc_exception_t ex;
libvlc_exception_init(&ex);
/* get deinterlace mode from the user */
char *psz_mode = CStrFromBSTR(CP_UTF8, mode);
/* enable deinterlace filter if possible */
libvlc_video_set_deinterlace(p_md, 1, psz_mode, &ex);
hr = exception_bridge(&ex);
CoTaskMemFree(psz_mode);
}
return hr;
};
STDMETHODIMP VLCVideo::takeSnapshot(LPPICTUREDISP* picture)
{
if( NULL == picture )
......
......@@ -586,6 +586,8 @@ public:
STDMETHODIMP put_crop(BSTR);
STDMETHODIMP get_teletext(long*);
STDMETHODIMP put_teletext(long);
STDMETHODIMP deinterlaceDisable();
STDMETHODIMP deinterlaceEnable(BSTR);
STDMETHODIMP takeSnapshot(LPPICTUREDISP*);
STDMETHODIMP toggleFullscreen();
STDMETHODIMP toggleTeletext();
......
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