LCOV - code coverage report
Current view: top level - avmedia/source/gstreamer - gstwindow.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 80 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 31 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 <com/sun/star/awt/SystemPointer.hpp>
      21             : 
      22             : #include <cppuhelper/supportsservice.hxx>
      23             : 
      24             : #include "gstwindow.hxx"
      25             : #include "gstplayer.hxx"
      26             : 
      27             : #define AVMEDIA_GST_WINDOW_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Window_GStreamer"
      28             : #define AVMEDIA_GST_WINDOW_SERVICENAME "com.sun.star.media.Window_GStreamer"
      29             : 
      30             : using namespace ::com::sun::star;
      31             : 
      32             : namespace avmedia { namespace gstreamer {
      33             : 
      34           0 : static ::osl::Mutex& ImplGetOwnStaticMutex()
      35             : {
      36             :     static ::osl::Mutex* pMutex = NULL;
      37             : 
      38           0 :     if( pMutex == NULL )
      39             :     {
      40           0 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      41             : 
      42           0 :         if( pMutex == NULL )
      43             :         {
      44           0 :             static ::osl::Mutex aMutex;
      45           0 :             pMutex = &aMutex;
      46           0 :         }
      47             :     }
      48             : 
      49           0 :     return *pMutex;
      50             : }
      51             : 
      52             : // Window
      53             : 
      54             : 
      55           0 : Window::Window( const uno::Reference< lang::XMultiServiceFactory >& rxMgr, Player& rPlayer ) :
      56             :     mxMgr( rxMgr ),
      57             :     meZoomLevel( media::ZoomLevel_NOT_AVAILABLE ),
      58             :     mrPlayer( rPlayer ),
      59           0 :     mnPointerType( awt::SystemPointer::ARROW )
      60             : {
      61           0 :     ::osl::MutexGuard aGuard( ImplGetOwnStaticMutex() );
      62             : 
      63           0 : }
      64             : 
      65           0 : Window::~Window()
      66             : {
      67           0 : }
      68             : 
      69             : // XPlayerWindow
      70             : 
      71             : 
      72           0 : void SAL_CALL Window::update(  )
      73             :     throw (uno::RuntimeException, std::exception)
      74             : {
      75           0 : }
      76             : 
      77           0 : sal_Bool SAL_CALL Window::setZoomLevel( media::ZoomLevel eZoomLevel )
      78             :     throw (uno::RuntimeException, std::exception)
      79             : {
      80           0 :         bool bRet = false;
      81             : 
      82           0 :         if( media::ZoomLevel_NOT_AVAILABLE != meZoomLevel &&
      83             :             media::ZoomLevel_NOT_AVAILABLE != eZoomLevel )
      84             :         {
      85           0 :             if( eZoomLevel != meZoomLevel )
      86             :             {
      87           0 :                 meZoomLevel = eZoomLevel;
      88             :             }
      89             : 
      90           0 :             bRet = true;
      91             :         }
      92             : 
      93           0 :         return bRet;
      94             : }
      95             : 
      96           0 : media::ZoomLevel SAL_CALL Window::getZoomLevel(  )
      97             :     throw (uno::RuntimeException, std::exception)
      98             : {
      99           0 :     return meZoomLevel;
     100             : }
     101             : 
     102           0 : void SAL_CALL Window::setPointerType( sal_Int32 nPointerType )
     103             :     throw (uno::RuntimeException, std::exception)
     104             : {
     105           0 :     mnPointerType = nPointerType;
     106           0 : }
     107             : 
     108             : // XWindow
     109             : 
     110             : 
     111           0 : void SAL_CALL Window::setPosSize( sal_Int32 /*X*/, sal_Int32 /*Y*/, sal_Int32 /*Width*/, sal_Int32 /*Height*/, sal_Int16 /*Flags*/ )
     112             :     throw (uno::RuntimeException, std::exception)
     113             : {
     114           0 : }
     115             : 
     116           0 : awt::Rectangle SAL_CALL Window::getPosSize()
     117             :     throw (uno::RuntimeException, std::exception)
     118             : {
     119           0 :     awt::Rectangle aRet;
     120             : 
     121           0 :     aRet.X = aRet.Y = 0;
     122           0 :     aRet.Width = 320;
     123           0 :     aRet.Height = 240;
     124             : 
     125           0 :     return aRet;
     126             : }
     127             : 
     128           0 : void SAL_CALL Window::setVisible( sal_Bool /*bVisible*/ )
     129             :     throw (uno::RuntimeException, std::exception)
     130             : {
     131           0 : }
     132             : 
     133           0 : void SAL_CALL Window::setEnable( sal_Bool /*bEnable*/ )
     134             :     throw (uno::RuntimeException, std::exception)
     135             : {
     136           0 : }
     137             : 
     138           0 : void SAL_CALL Window::setFocus(  )
     139             :     throw (uno::RuntimeException, std::exception)
     140             : {
     141           0 : }
     142             : 
     143           0 : void SAL_CALL Window::addWindowListener( const uno::Reference< awt::XWindowListener >& )
     144             :     throw (uno::RuntimeException, std::exception)
     145             : {
     146           0 : }
     147             : 
     148           0 : void SAL_CALL Window::removeWindowListener( const uno::Reference< awt::XWindowListener >& )
     149             :     throw (uno::RuntimeException, std::exception)
     150             : {
     151           0 : }
     152             : 
     153           0 : void SAL_CALL Window::addFocusListener( const uno::Reference< awt::XFocusListener >& )
     154             :     throw (uno::RuntimeException, std::exception)
     155             : {
     156           0 : }
     157             : 
     158           0 : void SAL_CALL Window::removeFocusListener( const uno::Reference< awt::XFocusListener >& )
     159             :     throw (uno::RuntimeException, std::exception)
     160             : {
     161           0 : }
     162             : 
     163           0 : void SAL_CALL Window::addKeyListener( const uno::Reference< awt::XKeyListener >& )
     164             :     throw (uno::RuntimeException, std::exception)
     165             : {
     166           0 : }
     167             : 
     168           0 : void SAL_CALL Window::removeKeyListener( const uno::Reference< awt::XKeyListener >& )
     169             :     throw (uno::RuntimeException, std::exception)
     170             : {
     171           0 : }
     172             : 
     173           0 : void SAL_CALL Window::addMouseListener( const uno::Reference< awt::XMouseListener >& )
     174             :     throw (uno::RuntimeException, std::exception)
     175             : {
     176           0 : }
     177             : 
     178           0 : void SAL_CALL Window::removeMouseListener( const uno::Reference< awt::XMouseListener >& )
     179             :     throw (uno::RuntimeException, std::exception)
     180             : {
     181           0 : }
     182             : 
     183           0 : void SAL_CALL Window::addMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& )
     184             :     throw (uno::RuntimeException, std::exception)
     185             : {
     186           0 : }
     187             : 
     188           0 : void SAL_CALL Window::removeMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& )
     189             :     throw (uno::RuntimeException, std::exception)
     190             : {
     191           0 : }
     192             : 
     193           0 : void SAL_CALL Window::addPaintListener( const uno::Reference< awt::XPaintListener >& )
     194             :     throw (uno::RuntimeException, std::exception)
     195             : {
     196           0 : }
     197             : 
     198           0 : void SAL_CALL Window::removePaintListener( const uno::Reference< awt::XPaintListener >& )
     199             :     throw (uno::RuntimeException, std::exception)
     200             : {
     201           0 : }
     202             : 
     203             : // XComponent
     204             : 
     205             : 
     206           0 : void SAL_CALL Window::dispose(  )
     207             :     throw (uno::RuntimeException, std::exception)
     208             : {
     209           0 : }
     210             : 
     211           0 : void SAL_CALL Window::addEventListener( const uno::Reference< lang::XEventListener >& )
     212             :     throw (uno::RuntimeException, std::exception)
     213             : {
     214           0 : }
     215             : 
     216           0 : void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventListener >& )
     217             :     throw (uno::RuntimeException, std::exception)
     218             : {
     219           0 : }
     220             : 
     221             : // XServiceInfo
     222             : 
     223             : 
     224           0 : OUString SAL_CALL Window::getImplementationName(  )
     225             :     throw (uno::RuntimeException, std::exception)
     226             : {
     227           0 :     return OUString( AVMEDIA_GST_WINDOW_IMPLEMENTATIONNAME );
     228             : }
     229             : 
     230           0 : sal_Bool SAL_CALL Window::supportsService( const OUString& ServiceName )
     231             :     throw (uno::RuntimeException, std::exception)
     232             : {
     233           0 :     return cppu::supportsService(this, ServiceName);
     234             : }
     235             : 
     236           0 : uno::Sequence< OUString > SAL_CALL Window::getSupportedServiceNames(  )
     237             :     throw (uno::RuntimeException, std::exception)
     238             : {
     239           0 :     uno::Sequence< OUString > aRet(1);
     240           0 :     aRet[0] = AVMEDIA_GST_WINDOW_SERVICENAME ;
     241             : 
     242           0 :     return aRet;
     243             : }
     244             : 
     245             : } // namespace gstreamer
     246             : } // namespace avmedia
     247             : 
     248             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11