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 #ifndef INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLPLAYER_HXX
11 #define INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLPLAYER_HXX
13 #include <cppuhelper/compbase2.hxx>
14 #include <cppuhelper/basemutex.hxx>
15 #include <com/sun/star/lang/XServiceInfo.hpp>
16 #include <com/sun/star/media/XPlayer.hpp>
20 #include <vcl/opengl/OpenGLContext.hxx>
21 #include <vcl/timer.hxx>
25 namespace avmedia
{ namespace ogl
{
29 typedef ::cppu::WeakComponentImplHelper2
< com::sun::star::media::XPlayer
,
30 com::sun::star::lang::XServiceInfo
> Player_BASE
;
32 class OGLPlayer
: public cppu::BaseMutex
,
40 bool create( const OUString
& rURL
);
41 void releaseInputFiles();
44 virtual void SAL_CALL
start() throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
45 virtual void SAL_CALL
stop() throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
46 virtual sal_Bool SAL_CALL
isPlaying() throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
47 virtual double SAL_CALL
getDuration() throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
48 virtual void SAL_CALL
setMediaTime( double fTime
) throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
49 virtual double SAL_CALL
getMediaTime() throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
50 virtual void SAL_CALL
setPlaybackLoop( sal_Bool bSet
) throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
51 virtual sal_Bool SAL_CALL
isPlaybackLoop() throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
52 virtual void SAL_CALL
setVolumeDB( sal_Int16 nVolumeDB
) throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
53 virtual sal_Int16 SAL_CALL
getVolumeDB() throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
54 virtual void SAL_CALL
setMute( sal_Bool bSet
) throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
55 virtual sal_Bool SAL_CALL
isMute() throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
56 virtual com::sun::star::awt::Size SAL_CALL
getPreferredPlayerWindowSize() throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
57 virtual com::sun::star::uno::Reference
< com::sun::star::media::XPlayerWindow
> SAL_CALL
createPlayerWindow( const com::sun::star::uno::Sequence
< com::sun::star::uno::Any
>& rArguments
) throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
58 virtual com::sun::star::uno::Reference
< com::sun::star::media::XFrameGrabber
> SAL_CALL
createFrameGrabber() throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
60 virtual OUString SAL_CALL
getImplementationName() throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
61 virtual sal_Bool SAL_CALL
supportsService( const OUString
& rServiceName
) throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
62 virtual com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
65 DECL_LINK_TYPED( TimerHandler
, Timer
*, void );
69 libgltf::glTFHandle
* m_pHandle
;
70 std::vector
<libgltf::glTFFile
> m_vInputFiles
;
72 rtl::Reference
<OpenGLContext
> m_xContext
;
74 OGLWindow
* m_pOGLWindow
;
79 } // namespace avmedia
81 #endif // INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLPLAYER_HXX
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */