LCOV - code coverage report
Current view: top level - avmedia/source/opengl - ogluno.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 13 13 100.0 %
Date: 2015-06-13 12:38:46 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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             :  */
       9             : 
      10             : #include "oglmanager.hxx"
      11             : 
      12             : #include <cppuhelper/factory.hxx>
      13             : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      14             : #include <com/sun/star/lang/XSingleServiceFactory.hpp>
      15             : 
      16             : using namespace ::com::sun::star;
      17             : 
      18           1 : static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno::Reference< lang::XMultiServiceFactory >& rxFact )
      19             : {
      20           1 :     return uno::Reference< uno::XInterface >( *new ::avmedia::ogl::OGLManager( rxFact ) );
      21             : }
      22             : 
      23           1 : extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaogl_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* )
      24             : {
      25           1 :     uno::Reference< lang::XSingleServiceFactory > xFactory;
      26           1 :     void* pRet = 0;
      27             : 
      28           1 :     if( rtl_str_compare( pImplName, "com.sun.star.comp.avmedia.Manager_OpenGL" ) == 0 )
      29             :     {
      30           1 :         const OUString aServiceName( "com.sun.star.media.Manager_OpenGL" );
      31             : 
      32           2 :         xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
      33             :                         static_cast< lang::XMultiServiceFactory* >( pServiceManager ),
      34             :                         OUString("com.sun.star.comp.avmedia.Manager_OpenGL" ),
      35           2 :                         create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) );
      36             :     }
      37             : 
      38           1 :     if( xFactory.is() )
      39             :     {
      40           1 :         xFactory->acquire();
      41           1 :         pRet = xFactory.get();
      42             :     }
      43             : 
      44           1 :     return pRet;
      45             : }
      46             : 
      47             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11