summaryrefslogtreecommitdiff
path: root/avmedia/source/win
diff options
context:
space:
mode:
Diffstat (limited to 'avmedia/source/win')
-rw-r--r--avmedia/source/win/framegrabber.cxx36
-rw-r--r--avmedia/source/win/framegrabber.hxx2
-rw-r--r--avmedia/source/win/interface.hxx2
-rw-r--r--avmedia/source/win/manager.cxx2
-rw-r--r--avmedia/source/win/manager.hxx2
-rw-r--r--avmedia/source/win/player.cxx56
-rw-r--r--avmedia/source/win/player.hxx6
-rw-r--r--avmedia/source/win/wincommon.hxx2
-rw-r--r--avmedia/source/win/window.cxx52
-rw-r--r--avmedia/source/win/window.hxx2
-rw-r--r--avmedia/source/win/winuno.cxx6
11 files changed, 84 insertions, 84 deletions
diff --git a/avmedia/source/win/framegrabber.cxx b/avmedia/source/win/framegrabber.cxx
index 3cfe5f89264d..59a9217da47f 100644
--- a/avmedia/source/win/framegrabber.cxx
+++ b/avmedia/source/win/framegrabber.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -96,7 +96,7 @@ IMediaDet* FrameGrabber::implCreateMediaDet( const ::rtl::OUString& rURL ) const
}
}
}
-
+
return pDet;
}
@@ -106,7 +106,7 @@ bool FrameGrabber::create( const ::rtl::OUString& rURL )
{
// just check if a MediaDet interface can be created with the given URL
IMediaDet* pDet = implCreateMediaDet( rURL );
-
+
if( pDet )
{
maURL = rURL;
@@ -126,19 +126,19 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
{
uno::Reference< graphic::XGraphic > xRet;
IMediaDet* pDet = implCreateMediaDet( maURL );
-
+
if( pDet )
{
double fLength;
long nStreamCount;
bool bFound = false;
-
+
if( SUCCEEDED( pDet->get_OutputStreams( &nStreamCount ) ) )
{
for( long n = 0; ( n < nStreamCount ) && !bFound; ++n )
{
GUID aMajorType;
-
+
if( SUCCEEDED( pDet->put_CurrentStream( n ) ) &&
SUCCEEDED( pDet->get_StreamType( &aMajorType ) ) &&
( aMajorType == MEDIATYPE_Video ) )
@@ -147,24 +147,24 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
}
}
}
-
+
if( bFound &&
( S_OK == pDet->get_StreamLength( &fLength ) ) &&
( fLength > 0.0 ) && ( fMediaTime >= 0.0 ) && ( fMediaTime <= fLength ) )
{
AM_MEDIA_TYPE aMediaType;
- long nWidth = 0, nHeight = 0, nSize = 0;
-
+ long nWidth = 0, nHeight = 0, nSize = 0;
+
if( SUCCEEDED( pDet->get_StreamMediaType( &aMediaType ) ) )
{
- if( ( aMediaType.formattype == FORMAT_VideoInfo ) &&
+ if( ( aMediaType.formattype == FORMAT_VideoInfo ) &&
( aMediaType.cbFormat >= sizeof( VIDEOINFOHEADER ) ) )
{
VIDEOINFOHEADER* pVih = reinterpret_cast< VIDEOINFOHEADER* >( aMediaType.pbFormat );
-
+
nWidth = pVih->bmiHeader.biWidth;
nHeight = pVih->bmiHeader.biHeight;
-
+
if( nHeight < 0 )
nHeight *= -1;
}
@@ -175,27 +175,27 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
aMediaType.cbFormat = 0;
aMediaType.pbFormat = NULL;
}
-
+
if( aMediaType.pUnk != NULL )
{
aMediaType.pUnk->Release();
aMediaType.pUnk = NULL;
- }
+ }
}
-
+
if( ( nWidth > 0 ) && ( nHeight > 0 ) &&
SUCCEEDED( pDet->GetBitmapBits( 0, &nSize, NULL, nWidth, nHeight ) ) &&
( nSize > 0 ) )
{
char* pBuffer = new char[ nSize ];
- try
+ try
{
if( SUCCEEDED( pDet->GetBitmapBits( fMediaTime, NULL, pBuffer, nWidth, nHeight ) ) )
{
SvMemoryStream aMemStm( pBuffer, nSize, STREAM_READ | STREAM_WRITE );
Bitmap aBmp;
-
+
if( aBmp.Read( aMemStm, false ) && !aBmp.IsEmpty() )
{
const Graphic aGraphic( aBmp );
@@ -213,7 +213,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
pDet->Release();
}
-
+
return xRet;
}
diff --git a/avmedia/source/win/framegrabber.hxx b/avmedia/source/win/framegrabber.hxx
index 0499a5086e49..9d3b23753cf1 100644
--- a/avmedia/source/win/framegrabber.hxx
+++ b/avmedia/source/win/framegrabber.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/avmedia/source/win/interface.hxx b/avmedia/source/win/interface.hxx
index 0e1944c4923e..be9efe3fcd9a 100644
--- a/avmedia/source/win/interface.hxx
+++ b/avmedia/source/win/interface.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/avmedia/source/win/manager.cxx b/avmedia/source/win/manager.cxx
index c10a96233766..3ba63fab827e 100644
--- a/avmedia/source/win/manager.cxx
+++ b/avmedia/source/win/manager.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/avmedia/source/win/manager.hxx b/avmedia/source/win/manager.hxx
index 0dd52627641b..9f4d6b46bb23 100644
--- a/avmedia/source/win/manager.hxx
+++ b/avmedia/source/win/manager.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx
index 4d341fb667ea..9b7e8f7f2a54 100644
--- a/avmedia/source/win/player.cxx
+++ b/avmedia/source/win/player.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -104,22 +104,22 @@ Player::~Player()
if( mpMP )
mpMP->Release();
-
+
if( mpMS )
mpMS->Release();
-
+
if( mpME )
mpME->Release();
-
+
if( mpMC )
mpMC->Release();
-
+
if( mpEV )
mpEV->Release();
-
+
if( mpOMF )
mpOMF->Release();
-
+
if( mpGB )
mpGB->Release();
@@ -143,12 +143,12 @@ bool Player::create( const ::rtl::OUString& rURL )
if( SUCCEEDED( CoCreateInstance( CLSID_OverlayMixer, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**) &mpOMF ) ) )
{
mpGB->AddFilter( mpOMF, L"com_sun_star_media_OverlayMixerFilter" );
-
+
if( !SUCCEEDED( mpOMF->QueryInterface( IID_IDDrawExclModeVideo, (void**) &mpEV ) ) )
mpEV = NULL;
}
}
-
+
if( SUCCEEDED( hR = mpGB->RenderFile( reinterpret_cast<LPCWSTR>(rURL.getStr()), NULL ) ) &&
SUCCEEDED( hR = mpGB->QueryInterface( IID_IMediaControl, (void**) &mpMC ) ) &&
SUCCEEDED( hR = mpGB->QueryInterface( IID_IMediaEventEx, (void**) &mpME ) ) &&
@@ -168,7 +168,7 @@ bool Player::create( const ::rtl::OUString& rURL )
bRet = true;
}
}
-
+
if( bRet )
maURL = rURL;
else
@@ -206,15 +206,15 @@ void Player::setDDrawParams( IDirectDraw* pDDraw, IDirectDrawSurface* pDDrawSurf
// ------------------------------------------------------------------------------
long Player::processEvent()
-{
+{
long nCode, nParam1, nParam2;
-
+
if( mpME && SUCCEEDED( mpME->GetEvent( &nCode, &nParam1, &nParam2, 0 ) ) )
{
if( EC_COMPLETE == nCode )
{
if( mbLooping )
- {
+ {
setMediaTime( 0.0 );
start();
}
@@ -224,10 +224,10 @@ long Player::processEvent()
stop();
}
}
-
+
mpME->FreeEventParams( nCode, nParam1, nParam2 );
}
-
+
return 0;
}
@@ -272,7 +272,7 @@ double SAL_CALL Player::getDuration( )
if( mpMP )
mpMP->get_Duration( &aRefTime );
-
+
return aRefTime;
}
@@ -301,8 +301,8 @@ double SAL_CALL Player::getMediaTime( )
if( mpMP )
mpMP->get_CurrentPosition( &aRefTime );
-
- return aRefTime;
+
+ return aRefTime;
}
// ------------------------------------------------------------------------------
@@ -324,7 +324,7 @@ double SAL_CALL Player::getStopTime( )
if( mpMP )
mpMP->get_StopTime( &aRefTime );
- return aRefTime;
+ return aRefTime;
}
// ------------------------------------------------------------------------------
@@ -345,7 +345,7 @@ double SAL_CALL Player::getRate( )
if( mpMP )
mpMP->get_Rate( &fRet );
-
+
return fRet;
}
@@ -387,7 +387,7 @@ sal_Bool SAL_CALL Player::isMute( )
// ------------------------------------------------------------------------------
-void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB )
+void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB )
throw (uno::RuntimeException)
{
mnUnmutedVolume = static_cast< long >( nVolumeDB ) * 100;
@@ -397,8 +397,8 @@ void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB )
}
// ------------------------------------------------------------------------------
-
-sal_Int16 SAL_CALL Player::getVolumeDB( )
+
+sal_Int16 SAL_CALL Player::getVolumeDB( )
throw (uno::RuntimeException)
{
return( static_cast< sal_Int16 >( mnUnmutedVolume / 100 ) );
@@ -410,9 +410,9 @@ awt::Size SAL_CALL Player::getPreferredPlayerWindowSize( )
throw (uno::RuntimeException)
{
awt::Size aSize( 0, 0 );
-
+
if( mpBV )
- {
+ {
long nWidth = 0, nHeight = 0;
mpBV->GetVideoSize( &nWidth, &nHeight );
@@ -454,13 +454,13 @@ uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber( )
if( maURL.getLength() > 0 )
{
FrameGrabber* pGrabber = new FrameGrabber( mxMgr );
-
+
xRet = pGrabber;
-
+
if( !pGrabber->create( maURL ) )
xRet.clear();
}
-
+
return xRet;
}
diff --git a/avmedia/source/win/player.hxx b/avmedia/source/win/player.hxx
index 7f87511209bd..c91a1435e561 100644
--- a/avmedia/source/win/player.hxx
+++ b/avmedia/source/win/player.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,9 +65,9 @@ public:
void setNotifyWnd( int nNotifyWnd );
void setDDrawParams( IDirectDraw* pDDraw, IDirectDrawSurface* pDDrawSurface );
long processEvent();
-
+
const IVideoWindow* getVideoWindow() const;
-
+
// XPlayer
virtual void SAL_CALL start( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL stop( ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/avmedia/source/win/wincommon.hxx b/avmedia/source/win/wincommon.hxx
index 0dd7cae023d3..d0877fd05532 100644
--- a/avmedia/source/win/wincommon.hxx
+++ b/avmedia/source/win/wincommon.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx
index 7163c076fb8b..3c2006abb81f 100644
--- a/avmedia/source/win/window.cxx
+++ b/avmedia/source/win/window.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -90,11 +90,11 @@ LRESULT CALLBACK MediaPlayerWndProc( HWND hWnd,UINT nMsg, WPARAM nPar1, LPARAM n
case( WM_SETCURSOR ):
pWindow->updatePointer();
break;
-
+
case( WM_GRAPHNOTIFY ):
pWindow->processGraphEvent();
break;
-
+
case( WM_MOUSEMOVE ):
case( WM_LBUTTONDOWN ):
case( WM_MBUTTONDOWN ):
@@ -105,11 +105,11 @@ LRESULT CALLBACK MediaPlayerWndProc( HWND hWnd,UINT nMsg, WPARAM nPar1, LPARAM n
{
awt::MouseEvent aUNOEvt;
POINT aWinPoint;
-
+
if( !::GetCursorPos( &aWinPoint ) || !::ScreenToClient( hWnd, &aWinPoint ) )
{
- aWinPoint.x = GET_X_LPARAM( nPar2 );
- aWinPoint.y = GET_Y_LPARAM( nPar2 );
+ aWinPoint.x = GET_X_LPARAM( nPar2 );
+ aWinPoint.y = GET_Y_LPARAM( nPar2 );
}
aUNOEvt.Modifiers = 0;
aUNOEvt.Buttons = 0;
@@ -337,11 +337,11 @@ bool Window::create( const uno::Sequence< uno::Any >& rArguments )
aRect.X, aRect.Y, aRect.Width, aRect.Height,
(HWND)mnParentWnd , NULL, mpWndClass->hInstance, 0 );
}
-
+
if( mnFrameWnd )
{
::SetWindowLong( (HWND) mnFrameWnd, 0, (DWORD) this );
-
+
#ifdef DDRAW_TEST_OUTPUT
IDirectDraw7* pDDraw;
IDirectDrawSurface7* pDDSurface;
@@ -352,12 +352,12 @@ bool Window::create( const uno::Sequence< uno::Any >& rArguments )
if( DD_OK == pDDraw->SetCooperativeLevel( (HWND) mnParentWnd, DDSCL_NORMAL ) )
{
DDSURFACEDESC2 aDDDesc;
-
+
memset( &aDDDesc, 0, sizeof( aDDDesc ) );
aDDDesc.dwSize = sizeof( aDDDesc );
aDDDesc.dwFlags = DDSD_CAPS;
aDDDesc.ddsCaps.dwCaps |= DDSCAPS_PRIMARYSURFACE;
-
+
if( DD_OK == pDDraw->CreateSurface( &aDDDesc, &pDDSurface, NULL ) )
{
if( DD_OK == pDDraw->CreateClipper( 0, &pDDClipper, NULL ) )
@@ -367,21 +367,21 @@ bool Window::create( const uno::Sequence< uno::Any >& rArguments )
}
mrPlayer.setDDrawParams( (IDirectDraw*) pDDraw, (IDirectDrawSurface*) pDDSurface );
-#endif
-
+#endif
+
pVideoWindow->put_Owner( (OAHWND) mnFrameWnd );
pVideoWindow->put_MessageDrain( (OAHWND) mnFrameWnd );
pVideoWindow->put_WindowStyle( WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN );
mrPlayer.setNotifyWnd( mnFrameWnd );
-
+
meZoomLevel = media::ZoomLevel_ORIGINAL;
ImplLayoutVideoWindow();
#ifdef DDRAW_TEST_OUTPUT
}
}
}
-#endif
+#endif
}
}
@@ -397,7 +397,7 @@ void Window::processGraphEvent()
// ------------------------------------------------------------------------------
-void Window::updatePointer()
+void Window::updatePointer()
{
char* pCursorName;
@@ -407,12 +407,12 @@ void Window::updatePointer()
//case( awt::SystemPointer::HAND ): pCursorName = IDC_HAND; break;
case( awt::SystemPointer::MOVE ): pCursorName = IDC_SIZEALL; break;
case( awt::SystemPointer::WAIT ): pCursorName = IDC_WAIT; break;
-
+
default:
pCursorName = IDC_ARROW;
break;
}
-
+
::SetCursor( ::LoadCursor( NULL, pCursorName ) );
}
@@ -456,7 +456,7 @@ media::ZoomLevel SAL_CALL Window::getZoomLevel( )
// ------------------------------------------------------------------------------
-void SAL_CALL Window::setPointerType( sal_Int32 nPointerType )
+void SAL_CALL Window::setPointerType( sal_Int32 nPointerType )
throw (uno::RuntimeException)
{
mnPointerType = nPointerType;
@@ -655,11 +655,11 @@ void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventLis
void Window::fireMousePressedEvent( const ::com::sun::star::awt::MouseEvent& rEvt )
{
::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseListener >*) 0 ) );
-
+
if( pContainer )
{
::cppu::OInterfaceIteratorHelper aIter( *pContainer );
-
+
while( aIter.hasMoreElements() )
uno::Reference< awt::XMouseListener >( aIter.next(), uno::UNO_QUERY )->mousePressed( rEvt );
}
@@ -670,11 +670,11 @@ void Window::fireMousePressedEvent( const ::com::sun::star::awt::MouseEvent& rEv
void Window::fireMouseReleasedEvent( const ::com::sun::star::awt::MouseEvent& rEvt )
{
::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseListener >*) 0 ) );
-
+
if( pContainer )
{
::cppu::OInterfaceIteratorHelper aIter( *pContainer );
-
+
while( aIter.hasMoreElements() )
uno::Reference< awt::XMouseListener >( aIter.next(), uno::UNO_QUERY )->mouseReleased( rEvt );
}
@@ -685,11 +685,11 @@ void Window::fireMouseReleasedEvent( const ::com::sun::star::awt::MouseEvent& rE
void Window::fireMouseMovedEvent( const ::com::sun::star::awt::MouseEvent& rEvt )
{
::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseMotionListener >*) 0 ) );
-
+
if( pContainer )
{
::cppu::OInterfaceIteratorHelper aIter( *pContainer );
-
+
while( aIter.hasMoreElements() )
uno::Reference< awt::XMouseMotionListener >( aIter.next(), uno::UNO_QUERY )->mouseMoved( rEvt );
}
@@ -700,11 +700,11 @@ void Window::fireMouseMovedEvent( const ::com::sun::star::awt::MouseEvent& rEvt
void Window::fireSetFocusEvent( const ::com::sun::star::awt::FocusEvent& rEvt )
{
::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XFocusListener >*) 0 ) );
-
+
if( pContainer )
{
::cppu::OInterfaceIteratorHelper aIter( *pContainer );
-
+
while( aIter.hasMoreElements() )
uno::Reference< awt::XFocusListener >( aIter.next(), uno::UNO_QUERY )->focusGained( rEvt );
}
diff --git a/avmedia/source/win/window.hxx b/avmedia/source/win/window.hxx
index 22a6c295f8d3..047f1744c84b 100644
--- a/avmedia/source/win/window.hxx
+++ b/avmedia/source/win/window.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/avmedia/source/win/winuno.cxx b/avmedia/source/win/winuno.cxx
index 3a63f757fbd3..8f4b3d6e93a1 100644
--- a/avmedia/source/win/winuno.cxx
+++ b/avmedia/source/win/winuno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -62,7 +62,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey )
try
{
uno::Reference< registry::XRegistryKey > xNewKey1(
- static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
+ static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
::rtl::OUString::createFromAscii( "/com.sun.star.comp.media.Manager_DirectX/UNO/SERVICES/com.sun.star.media.Manager_DirectX" ) ) );
bRet = sal_True;
@@ -83,7 +83,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey )
extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* )
{
uno::Reference< lang::XSingleServiceFactory > xFactory;
- void* pRet = 0;
+ void* pRet = 0;
if( rtl_str_compare( pImplName, "com.sun.star.comp.media.Manager_DirectX" ) == 0 )
{