[vlc-devel] [RFC 1/2] activex: add option to set video scale factor
Pierre Lamot
pierre at videolabs.io
Thu Oct 5 19:24:18 CEST 2017
---
activex/axvlc.idl | 5 +++++
activex/vlccontrol2.cpp | 15 +++++++++++++++
activex/vlccontrol2.h | 2 ++
3 files changed, 22 insertions(+)
diff --git a/activex/axvlc.idl b/activex/axvlc.idl
index 9202ab2..5eb3822 100644
--- 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.")]
diff --git a/activex/vlccontrol2.cpp b/activex/vlccontrol2.cpp
index b8c3bb3..ec20618 100644
--- 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 )
diff --git a/activex/vlccontrol2.h b/activex/vlccontrol2.h
index 2a9bfc5..db6c52e 100644
--- 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*);
--
2.14.2
More information about the vlc-devel
mailing list