fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / avmedia / source / vlc / vlcplayer.hxx
blob3d88798c59fc6bd59867601daddcad8dd85bb32c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_AVMEDIA_SOURCE_VLC_VLCPLAYER_HXX
21 #define INCLUDED_AVMEDIA_SOURCE_VLC_VLCPLAYER_HXX
23 #include "vlccommon.hxx"
24 #include <boost/shared_ptr.hpp>
25 #include <cppuhelper/compbase2.hxx>
26 #include <com/sun/star/media/XPlayer.hpp>
27 #include <cppuhelper/basemutex.hxx>
29 #include "wrapper/Instance.hxx"
30 #include "wrapper/Media.hxx"
31 #include "wrapper/Player.hxx"
32 #include "wrapper/EventManager.hxx"
34 namespace avmedia {
35 namespace vlc {
37 typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::media::XPlayer,
38 ::com::sun::star::lang::XServiceInfo > VLC_Base;
40 class VLCPlayer : public ::cppu::BaseMutex,
41 public VLC_Base
43 wrapper::Instance& mInstance;
44 wrapper::EventHandler& mEventHandler;
46 wrapper::Media mMedia;
47 wrapper::Player mPlayer;
48 wrapper::EventManager mEventManager;
49 const rtl::OUString mUrl;
50 bool mPlaybackLoop;
51 ::com::sun::star::uno::Reference< css::media::XFrameGrabber > mrFrameGrabber;
52 intptr_t mPrevWinID;
53 public:
54 VLCPlayer( const rtl::OUString& url,
55 wrapper::Instance& instance,
56 wrapper::EventHandler& eh );
58 void setVideoSize( unsigned width, unsigned height );
59 unsigned getWidth() const;
60 unsigned getHeight() const;
62 void SAL_CALL setScale( float factor );
63 void SAL_CALL setWindowID( const intptr_t windowID );
65 void SAL_CALL start() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
66 void SAL_CALL stop() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
67 sal_Bool SAL_CALL isPlaying() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
68 double SAL_CALL getDuration() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
69 void SAL_CALL setMediaTime( double fTime ) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
70 double SAL_CALL getMediaTime() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
71 void SAL_CALL setPlaybackLoop( sal_Bool bSet ) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
72 sal_Bool SAL_CALL isPlaybackLoop() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
73 void SAL_CALL setVolumeDB( ::sal_Int16 nDB ) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
74 ::sal_Int16 SAL_CALL getVolumeDB() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
75 void SAL_CALL setMute( sal_Bool bSet ) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
76 sal_Bool SAL_CALL isMute() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
77 css::awt::Size SAL_CALL getPreferredPlayerWindowSize() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
78 ::com::sun::star::uno::Reference< css::media::XPlayerWindow > SAL_CALL createPlayerWindow( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
79 throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
80 ::com::sun::star::uno::Reference< css::media::XFrameGrabber > SAL_CALL createFrameGrabber()
81 throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
83 ::rtl::OUString SAL_CALL getImplementationName()
84 throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
85 sal_Bool SAL_CALL supportsService( const ::rtl::OUString& serviceName )
86 throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;;
87 ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
88 throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;;
90 private:
91 void replay();
97 #endif
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */