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"
12 #include <cppuhelper/factory.hxx>
13 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
14 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
16 using namespace ::com::sun::star
;
18 static uno::Reference
< uno::XInterface
> SAL_CALL
create_MediaPlayer( const uno::Reference
< lang::XMultiServiceFactory
>& rxFact
)
20 return uno::Reference
< uno::XInterface
>( *new ::avmedia::ogl::OGLManager( rxFact
) );
23 extern "C" SAL_DLLPUBLIC_EXPORT
void* SAL_CALL
avmediaogl_component_getFactory( const sal_Char
* pImplName
, void* pServiceManager
, void* )
25 uno::Reference
< lang::XSingleServiceFactory
> xFactory
;
28 if( rtl_str_compare( pImplName
, "com.sun.star.comp.avmedia.Manager_OpenGL" ) == 0 )
30 const OUString
aServiceName( "com.sun.star.media.Manager_OpenGL" );
32 xFactory
= uno::Reference
< lang::XSingleServiceFactory
>( ::cppu::createSingleFactory(
33 static_cast< lang::XMultiServiceFactory
* >( pServiceManager
),
34 OUString("com.sun.star.comp.avmedia.Manager_OpenGL" ),
35 create_MediaPlayer
, uno::Sequence
< OUString
>( &aServiceName
, 1 ) ) );
41 pRet
= xFactory
.get();
47 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */