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()
24 OGLManager::~OGLManager()
28 uno::Reference
< media::XPlayer
> SAL_CALL
OGLManager::createPlayer( const OUString
& rURL
)
30 OGLPlayer
* pPlayer( new OGLPlayer() );
31 if( pPlayer
->create(rURL
) )
32 return uno::Reference
< media::XPlayer
>(pPlayer
);
36 SAL_WARN("avmedia.opengl", "Can't create player for OpenGL model: " + rURL
);
37 return uno::Reference
< media::XPlayer
>();
41 OUString SAL_CALL
OGLManager::getImplementationName()
43 return OUString("com.sun.star.comp.avmedia.Manager_OpenGL");
46 sal_Bool SAL_CALL
OGLManager::supportsService( const OUString
& rServiceName
)
48 return cppu::supportsService(this, rServiceName
);
51 uno::Sequence
< OUString
> SAL_CALL
OGLManager::getSupportedServiceNames()
53 return { "com.sun.star.media.Manager_OpenGL" };
57 } // namespace avmedia
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */