LCOV - code coverage report
Current view: top level - avmedia/source/gstreamer - gstmanager.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 20 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 7 0.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             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include <cppuhelper/supportsservice.hxx>
      21             : 
      22             : #include "gstmanager.hxx"
      23             : #include "gstplayer.hxx"
      24             : 
      25             : #include <tools/urlobj.hxx>
      26             : 
      27             : #define AVMEDIA_GST_MANAGER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Manager_GStreamer"
      28             : #define AVMEDIA_GST_MANAGER_SERVICENAME "com.sun.star.media.Manager"
      29             : 
      30             : #if !defined DBG
      31             : #if OSL_DEBUG_LEVEL > 2
      32             : #define DBG OSL_TRACE
      33             : #else
      34             : #define DBG(...)
      35             : #endif
      36             : #endif
      37             : 
      38             : using namespace ::com::sun::star;
      39             : 
      40             : namespace avmedia { namespace gstreamer {
      41             : 
      42             : // - Manager -
      43             : 
      44             : 
      45           0 : Manager::Manager( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
      46           0 :     mxMgr( rxMgr )
      47             : {
      48             :     DBG( "avmediagst: Manager::Manager" );
      49           0 : }
      50             : 
      51             : 
      52             : 
      53           0 : Manager::~Manager()
      54             : {
      55           0 : }
      56             : 
      57             : 
      58             : 
      59           0 : uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const OUString& rURL )
      60             :     throw (uno::RuntimeException, std::exception)
      61             : {
      62           0 :     Player*                             pPlayer( new Player( mxMgr ) );
      63           0 :     uno::Reference< media::XPlayer >    xRet( pPlayer );
      64           0 :     const INetURLObject                 aURL( rURL );
      65             : 
      66             :     DBG( "avmediagst: Manager::createPlayer" );
      67             : 
      68           0 :     if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) )  )
      69           0 :         xRet = uno::Reference< media::XPlayer >();
      70             : 
      71           0 :     return xRet;
      72             : }
      73             : 
      74             : 
      75             : 
      76           0 : OUString SAL_CALL Manager::getImplementationName(  )
      77             :     throw (uno::RuntimeException, std::exception)
      78             : {
      79           0 :     return OUString( AVMEDIA_GST_MANAGER_IMPLEMENTATIONNAME );
      80             : }
      81             : 
      82             : 
      83             : 
      84           0 : sal_Bool SAL_CALL Manager::supportsService( const OUString& ServiceName )
      85             :     throw (uno::RuntimeException, std::exception)
      86             : {
      87           0 :     return cppu::supportsService(this, ServiceName);
      88             : }
      89             : 
      90             : 
      91             : 
      92           0 : uno::Sequence< OUString > SAL_CALL Manager::getSupportedServiceNames(  )
      93             :     throw (uno::RuntimeException, std::exception)
      94             : {
      95           0 :     uno::Sequence< OUString > aRet(1);
      96           0 :     aRet[0] = AVMEDIA_GST_MANAGER_SERVICENAME ;
      97             : 
      98           0 :     return aRet;
      99             : }
     100             : 
     101             : } // namespace gstreamer
     102             : } // namespace avmedia
     103             : 
     104             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11