Playing Video in a Dialog
Michael Stahl
mstahl at redhat.com
Mon Apr 28 09:07:58 PDT 2014
On 17/04/14 11:23, Fernand Vanrie wrote:
> On The French user site i found usefull code to play video on Windows
> using the API and Basic.
>
> The code opens a MediaWindow and play any video
>
> The player has a undocumented method "CreatePlayerWindow" who needs
> arguments (a empty array do crash LO)
>
> Do someone knows how to use this method and how Video can been played in
> a Dialog ?
hi Fernand,
let's see...
avmedia/source/win/window.cxx:
> bool Window::create( const uno::Sequence< uno::Any >& rArguments )
> {
> IVideoWindow* pVideoWindow = const_cast< IVideoWindow* >( mrPlayer.getVideoWindow() );
> WNDCLASS* mpWndClass = lcl_getWndClass();
>
> if( !mnFrameWnd && pVideoWindow && mpWndClass )
> {
> awt::Rectangle aRect;
> sal_IntPtr nWnd;
>
> rArguments[ 0 ] >>= nWnd;
> rArguments[ 1 ] >>= aRect;
>
> mnParentWnd = static_cast<int>(nWnd);
>
so on Windows, parameters are a HWND of the parent and a rectangle...
probably the parameters are undocumented for a reason, very
system-dependent and subject to change without notice. also i have no
idea how you can get a window's HWND from BASIC code.
More information about the LibreOffice
mailing list