Commit 86df0bee 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: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 23cf5491
...@@ -467,6 +467,11 @@ library AXVLC ...@@ -467,6 +467,11 @@ library AXVLC
[propput, helpstring("Sets teletext page to use.")] [propput, helpstring("Sets teletext page to use.")]
HRESULT teletext([in] long page); 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.")] [helpstring("toggle fullscreen/windowed state.")]
HRESULT toggleFullscreen(); HRESULT toggleFullscreen();
......
...@@ -2220,6 +2220,39 @@ STDMETHODIMP VLCVideo::put_teletext(long page) ...@@ -2220,6 +2220,39 @@ STDMETHODIMP VLCVideo::put_teletext(long page)
return hr; 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) STDMETHODIMP VLCVideo::takeSnapshot(LPPICTUREDISP* picture)
{ {
if( NULL == picture ) if( NULL == picture )
......
...@@ -586,6 +586,8 @@ public: ...@@ -586,6 +586,8 @@ public:
STDMETHODIMP put_crop(BSTR); STDMETHODIMP put_crop(BSTR);
STDMETHODIMP get_teletext(long*); STDMETHODIMP get_teletext(long*);
STDMETHODIMP put_teletext(long); STDMETHODIMP put_teletext(long);
STDMETHODIMP deinterlaceDisable();
STDMETHODIMP deinterlaceEnable(BSTR);
STDMETHODIMP takeSnapshot(LPPICTUREDISP*); STDMETHODIMP takeSnapshot(LPPICTUREDISP*);
STDMETHODIMP toggleFullscreen(); STDMETHODIMP toggleFullscreen();
STDMETHODIMP toggleTeletext(); 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