Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / avmedia / source / opengl / oglmanager.cxx
blob0f7cfddc77d47ec150157b81ab5dffc9e47b9223
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
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);
33 else
35 delete 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" };
56 } // namespace ogl
57 } // namespace avmedia
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */