1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: mediawindowbase_impl.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _AVMEDIA_MEDIAWINDOWBASE_IMPL_HXX
32 #define _AVMEDIA_MEDIAWINDOWBASE_IMPL_HXX
34 #include <avmedia/mediawindow.hxx>
35 #include <com/sun/star/media/XPlayer.hpp>
36 #include <com/sun/star/media/XPlayerWindow.hpp>
48 UPDATEMODE_SYNC_STATUSBAR
= 0,
49 UPDATEMODE_SYNC_PLAYER
= 1,
50 UPDATEMODE_SYNC_NONE
= 2
53 // -----------------------
54 // - MediaWindowBaseImpl -
55 // -----------------------
57 class MediaWindowBaseImpl
61 MediaWindowBaseImpl( MediaWindow
* pMediaWindow
);
62 virtual ~MediaWindowBaseImpl();
64 virtual void cleanUp();
65 virtual void onURLChanged();
67 static ::com::sun::star::uno::Reference
< ::com::sun::star::media::XPlayer
> createPlayer( const ::rtl::OUString
& rURL
);
71 void setURL( const ::rtl::OUString
& rURL
);
72 const ::rtl::OUString
& getURL() const;
76 bool hasPreferredSize() const;
77 Size
getPreferredSize() const;
79 bool setZoom( ::com::sun::star::media::ZoomLevel eLevel
);
80 ::com::sun::star::media::ZoomLevel
getZoom() const;
85 bool isPlaying() const;
87 double getDuration() const;
89 void setMediaTime( double fTime
);
90 double getMediaTime() const;
92 void setStopTime( double fTime
);
93 double getStopTime() const;
95 void setRate( double fRate
);
96 double getRate() const;
98 void setPlaybackLoop( bool bSet
);
99 bool isPlaybackLoop() const;
101 void setFixedAspectRatio( bool bSet
);
102 bool isFixedAspectRatio() const;
104 void setMute( bool bSet
);
107 void setVolumeDB( sal_Int16 nVolumeDB
);
108 sal_Int16
getVolumeDB() const;
110 void updateMediaItem( MediaItem
& rItem
) const;
111 void executeMediaItem( const MediaItem
& rItem
);
115 void stopPlayingInternal( bool );
117 MediaWindow
* getMediaWindow() const;
119 ::com::sun::star::uno::Reference
< ::com::sun::star::media::XPlayer
> getPlayer() const;
121 void setPlayerWindow( const ::com::sun::star::uno::Reference
< ::com::sun::star::media::XPlayerWindow
>& rxPlayerWindow
);
122 ::com::sun::star::uno::Reference
< ::com::sun::star::media::XPlayerWindow
> getPlayerWindow() const;
126 ::rtl::OUString maFileURL
;
127 ::com::sun::star::uno::Reference
< ::com::sun::star::media::XPlayer
> mxPlayer
;
128 ::com::sun::star::uno::Reference
< ::com::sun::star::media::XPlayerWindow
> mxPlayerWindow
;
129 MediaWindow
* mpMediaWindow
;