LCOV - code coverage report
Current view: top level - avmedia/source/gstreamer - gstmanager.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 20 0.0 %
Date: 2012-08-25 Functions: 0 7 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2010 Novell, Inc.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #include "gstmanager.hxx"
      30                 :            : #include "gstplayer.hxx"
      31                 :            : 
      32                 :            : #include <tools/urlobj.hxx>
      33                 :            : 
      34                 :            : #define AVMEDIA_GST_MANAGER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Manager_GStreamer"
      35                 :            : #define AVMEDIA_GST_MANAGER_SERVICENAME "com.sun.star.media.Manager"
      36                 :            : 
      37                 :            : #if !defined DBG
      38                 :            : #if OSL_DEBUG_LEVEL > 2
      39                 :            : #define DBG OSL_TRACE
      40                 :            : #else
      41                 :            : #define DBG(...)
      42                 :            : #endif
      43                 :            : #endif
      44                 :            : 
      45                 :            : using namespace ::com::sun::star;
      46                 :            : 
      47                 :            : namespace avmedia { namespace gstreamer {
      48                 :            : // ----------------
      49                 :            : // - Manager -
      50                 :            : // ----------------
      51                 :            : 
      52                 :          0 : Manager::Manager( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
      53                 :          0 :     mxMgr( rxMgr )
      54                 :            : {
      55                 :            :     DBG( "avmediagst: Manager::Manager" );
      56                 :          0 : }
      57                 :            : 
      58                 :            : // ------------------------------------------------------------------------------
      59                 :            : 
      60                 :          0 : Manager::~Manager()
      61                 :            : {
      62                 :          0 : }
      63                 :            : 
      64                 :            : // ------------------------------------------------------------------------------
      65                 :            : 
      66                 :          0 : uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OUString& rURL )
      67                 :            :     throw (uno::RuntimeException)
      68                 :            : {
      69                 :          0 :     Player*                             pPlayer( new Player( mxMgr ) );
      70                 :          0 :     uno::Reference< media::XPlayer >    xRet( pPlayer );
      71                 :          0 :     const INetURLObject                 aURL( rURL );
      72                 :            : 
      73                 :            :     DBG( "avmediagst: Manager::createPlayer" );
      74                 :            : 
      75                 :          0 :     if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) )  )
      76                 :          0 :         xRet = uno::Reference< media::XPlayer >();
      77                 :            : 
      78                 :          0 :     return xRet;
      79                 :            : }
      80                 :            : 
      81                 :            : // ------------------------------------------------------------------------------
      82                 :            : 
      83                 :          0 : ::rtl::OUString SAL_CALL Manager::getImplementationName(  )
      84                 :            :     throw (uno::RuntimeException)
      85                 :            : {
      86                 :          0 :     return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_GST_MANAGER_IMPLEMENTATIONNAME ) );
      87                 :            : }
      88                 :            : 
      89                 :            : // ------------------------------------------------------------------------------
      90                 :            : 
      91                 :          0 : sal_Bool SAL_CALL Manager::supportsService( const ::rtl::OUString& ServiceName )
      92                 :            :     throw (uno::RuntimeException)
      93                 :            : {
      94                 :          0 :     return ServiceName == AVMEDIA_GST_MANAGER_SERVICENAME;
      95                 :            : }
      96                 :            : 
      97                 :            : // ------------------------------------------------------------------------------
      98                 :            : 
      99                 :          0 : uno::Sequence< ::rtl::OUString > SAL_CALL Manager::getSupportedServiceNames(  )
     100                 :            :     throw (uno::RuntimeException)
     101                 :            : {
     102                 :          0 :     uno::Sequence< ::rtl::OUString > aRet(1);
     103                 :          0 :     aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_GST_MANAGER_SERVICENAME ) );
     104                 :            : 
     105                 :          0 :     return aRet;
     106                 :            : }
     107                 :            : 
     108                 :            : } // namespace gstreamer
     109                 :            : } // namespace avmedia
     110                 :            : 
     111                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10