Jean-Baptiste Kempf pushed to branch master at videolan / VLC Browser Plugins
Commits: 6ee39ead by Pierre Lamot at 2017-10-13T00:03:49+02:00 activex: add option to set video scale factor Similar to libvlc_video_set_scale Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org> - - - - - 3 changed files: - activex/axvlc.idl - activex/vlccontrol2.cpp - activex/vlccontrol2.h Changes: ===================================== activex/axvlc.idl ===================================== --- a/activex/axvlc.idl +++ b/activex/axvlc.idl @@ -513,6 +513,11 @@ library AXVLC [propput, helpstring("Sets video aspect ratio.")] HRESULT aspectRatio([in] BSTR aspect); + [propget, helpstring("Returns video scale.")] + HRESULT scale([out, retval] float* aspect); + [propput, helpstring("Sets video scale.")] + HRESULT scale([in] float aspect); + [propget, helpstring("Returns video subtitle used.")] HRESULT subtitle([out, retval] long* spu); [propput, helpstring("Sets video subtitle to use.")] ===================================== activex/vlccontrol2.cpp ===================================== --- a/activex/vlccontrol2.cpp +++ b/activex/vlccontrol2.cpp @@ -1109,6 +1109,21 @@ STDMETHODIMP VLCVideo::put_aspectRatio(BSTR aspect) return S_OK; } +STDMETHODIMP VLCVideo::get_scale(float* scale) +{ + if( NULL == scale ) + return E_POINTER; + + *scale = _plug->get_player().get_mp().scale(); + return S_OK; +} + +STDMETHODIMP VLCVideo::put_scale(float scale) +{ + _plug->get_player().get_mp().setScale( scale ); + return S_OK; +} + STDMETHODIMP VLCVideo::get_subtitle(long* spu) { if( NULL == spu ) ===================================== activex/vlccontrol2.h ===================================== --- a/activex/vlccontrol2.h +++ b/activex/vlccontrol2.h @@ -345,6 +345,8 @@ public: STDMETHODIMP get_height(long*); STDMETHODIMP get_aspectRatio(BSTR*); STDMETHODIMP put_aspectRatio(BSTR); + STDMETHODIMP get_scale(float*); + STDMETHODIMP put_scale(float); STDMETHODIMP get_subtitle(long*); STDMETHODIMP put_subtitle(long); STDMETHODIMP get_crop(BSTR*); View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/commit/6ee39ead04f52ffe83b24457cd4f429122a81911 --- View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/commit/6ee39ead04f52ffe83b24457cd4f429122a81911 You're receiving this email because of your account on code.videolan.org.
_______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits