1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include "oglmanager.hxx"
11 #include "oglframegrabber.hxx"
12 #include "oglplayer.hxx"
14 #include <cppuhelper/supportsservice.hxx>
16 using namespace com::sun::star
;
18 namespace avmedia
{ namespace ogl
{
20 OGLManager::OGLManager( const uno::Reference
< lang::XMultiServiceFactory
>& rMgr
)
26 OGLManager::~OGLManager()
30 uno::Reference
< media::XPlayer
> SAL_CALL
OGLManager::createPlayer( const OUString
& rURL
)
31 throw (uno::RuntimeException
, std::exception
)
33 OGLPlayer
* pPlayer( new OGLPlayer() );
34 if( pPlayer
->create(rURL
) )
35 return uno::Reference
< media::XPlayer
>(pPlayer
);
39 SAL_WARN("avmedia.opengl", "Can't create player for OpenGL model: " + rURL
);
40 return uno::Reference
< media::XPlayer
>();
44 OUString SAL_CALL
OGLManager::getImplementationName() throw ( uno::RuntimeException
, std::exception
)
46 return OUString("com.sun.star.comp.avmedia.Manager_OpenGL");
49 sal_Bool SAL_CALL
OGLManager::supportsService( const OUString
& rServiceName
)
50 throw ( uno::RuntimeException
, std::exception
)
52 return cppu::supportsService(this, rServiceName
);
55 uno::Sequence
< OUString
> SAL_CALL
OGLManager::getSupportedServiceNames()
56 throw ( uno::RuntimeException
, std::exception
)
58 ::uno::Sequence
< OUString
> aRet(1);
59 aRet
[0] = "com.sun.star.media.Manager_OpenGL";
64 } // namespace avmedia
66 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */