Commit ccf11e72 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Update to 4.0 APIs

parent 073b01ee
......@@ -416,8 +416,6 @@ library AXVLC
[helpstring("disable Marquee Filter.")]
HRESULT disable();
[propget, helpstring("Retrieve marquee text.")]
HRESULT text([out, retval] BSTR* val);
[propput, helpstring("Change marquee text.")]
HRESULT text([in] BSTR val);
......@@ -554,10 +552,12 @@ library AXVLC
[propput, helpstring("Sets video subtitle to use.")]
HRESULT subtitle([in] long spu);
[propget, helpstring("Returns crop filter geometry.")]
HRESULT crop([out, retval] BSTR* geometry);
[propput, helpstring("Sets crop filter geometry.")]
HRESULT crop([in] BSTR geometry);
[propput, helpstring("Sets crop ratio.")]
HRESULT crop_ratio([in] ULONG num, [in] ULONG den);
[propput, helpstring("Sets crop window.")]
HRESULT crop_window([in] ULONG x, [in] ULONG y, [in] ULONG width, [in] ULONG height);
[propput, helpstring("Sets crop border.")]
HRESULT crop_border([in] ULONG left, [in] ULONG right, [in] ULONG top, [in] ULONG bottom);
[propget, helpstring("Returns teletext page used.")]
HRESULT teletext([out, retval] long* page);
......
......@@ -867,13 +867,6 @@ STDMETHODIMP VLCMarquee::put_position(BSTR val)
return hr;
}
STDMETHODIMP VLCMarquee::get_text(BSTR *val)
{
if( NULL == val )
return E_POINTER;
return E_INVALIDARG;
}
STDMETHODIMP VLCMarquee::put_text(BSTR val)
{
char *psz_text = CStrFromBSTR(CP_UTF8, val);
......@@ -1397,32 +1390,20 @@ STDMETHODIMP VLCVideo::put_subtitle(long spu)
return S_OK;
}
STDMETHODIMP VLCVideo::get_crop(BSTR* geometry)
STDMETHODIMP VLCVideo::put_crop_ratio(ULONG num, ULONG den)
{
if( NULL == geometry )
return E_POINTER;
auto g = _plug->get_player().get_mp().cropGeometry();
*geometry = BSTRFromCStr( CP_UTF8, g.c_str() );
return *geometry == nullptr ? E_OUTOFMEMORY : S_OK;
_plug->get_player().get_mp().setCropRatio(num, den);
return S_OK;
}
STDMETHODIMP VLCVideo::put_crop(BSTR geometry)
STDMETHODIMP VLCVideo::put_crop_window(ULONG x, ULONG y, ULONG width, ULONG height)
{
if( 0 == SysStringLen(geometry) )
{
_plug->get_player().get_mp().setCropGeometry( "" );
return S_OK;
}
char *psz_geometry = CStrFromBSTR(CP_UTF8, geometry);
if( !psz_geometry )
{
return E_OUTOFMEMORY;
}
_plug->get_player().get_mp().setCropGeometry( psz_geometry );
CoTaskMemFree(psz_geometry);
_plug->get_player().get_mp().setCropWindow(x, y, width, height);
return S_OK;
}
STDMETHODIMP VLCVideo::put_crop_border(ULONG left, ULONG right, ULONG top, ULONG bottom)
{
_plug->get_player().get_mp().setCropBorder(left, right, top, bottom);
return S_OK;
}
......
......@@ -206,7 +206,6 @@ public:
STDMETHODIMP enable() { return do_put_int(libvlc_marquee_Enable, true); }
STDMETHODIMP disable() { return do_put_int(libvlc_marquee_Enable, false); }
STDMETHODIMP get_text(BSTR *);
STDMETHODIMP put_text(BSTR);
STDMETHODIMP get_position(BSTR *);
STDMETHODIMP put_position(BSTR);
......@@ -355,8 +354,9 @@ public:
STDMETHODIMP put_scale(float);
STDMETHODIMP get_subtitle(long*);
STDMETHODIMP put_subtitle(long);
STDMETHODIMP get_crop(BSTR*);
STDMETHODIMP put_crop(BSTR);
STDMETHODIMP put_crop_ratio(ULONG, ULONG);
STDMETHODIMP put_crop_window(ULONG, ULONG, ULONG, ULONG);
STDMETHODIMP put_crop_border(ULONG, ULONG, ULONG, ULONG);
STDMETHODIMP get_teletext(long*);
STDMETHODIMP put_teletext(long);
STDMETHODIMP get_marquee(IVLCMarquee**);
......
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