nss: upgrade to release 3.73
[LibreOffice.git] / avmedia / source / vlc / vlcplayer.hxx
blob1ec64a534a600b8e517fbe8c409ea0ad8387dbfc
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 #pragma once
22 #include "vlccommon.hxx"
23 #include <cppuhelper/compbase.hxx>
24 #include <com/sun/star/media/XPlayer.hpp>
25 #include <cppuhelper/basemutex.hxx>
27 #include <wrapper/Instance.hxx>
28 #include <wrapper/Media.hxx>
29 #include <wrapper/Player.hxx>
30 #include <wrapper/EventManager.hxx>
32 namespace avmedia::vlc {
34 typedef ::cppu::WeakComponentImplHelper< css::media::XPlayer,
35 css::lang::XServiceInfo > VLC_Base;
37 class VLCPlayer : public ::cppu::BaseMutex,
38 public VLC_Base
40 wrapper::EventHandler& mEventHandler;
42 wrapper::Media mMedia;
43 wrapper::Player mPlayer;
44 wrapper::EventManager mEventManager;
45 const OUString mUrl;
46 bool mPlaybackLoop;
47 css::uno::Reference< css::media::XFrameGrabber > mrFrameGrabber;
48 intptr_t mPrevWinID;
49 public:
50 VLCPlayer( const OUString& url,
51 wrapper::Instance& instance,
52 wrapper::EventHandler& eh );
54 void setVideoSize( unsigned width, unsigned height );
56 void setWindowID( const intptr_t windowID );
58 void SAL_CALL start() override;
59 void SAL_CALL stop() override;
60 sal_Bool SAL_CALL isPlaying() override;
61 double SAL_CALL getDuration() override;
62 void SAL_CALL setMediaTime( double fTime ) override;
63 double SAL_CALL getMediaTime() override;
64 void SAL_CALL setPlaybackLoop( sal_Bool bSet ) override;
65 sal_Bool SAL_CALL isPlaybackLoop() override;
66 void SAL_CALL setVolumeDB( ::sal_Int16 nDB ) override;
67 ::sal_Int16 SAL_CALL getVolumeDB() override;
68 void SAL_CALL setMute( sal_Bool bSet ) override;
69 sal_Bool SAL_CALL isMute() override;
70 css::awt::Size SAL_CALL getPreferredPlayerWindowSize() override;
71 css::uno::Reference< css::media::XPlayerWindow > SAL_CALL createPlayerWindow( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
72 css::uno::Reference< css::media::XFrameGrabber > SAL_CALL createFrameGrabber() override;
74 OUString SAL_CALL getImplementationName() override;
75 sal_Bool SAL_CALL supportsService( const OUString& serviceName ) override;
76 css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
78 private:
79 void replay();
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */