merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0386-avmedia-source-gstreamer-gstplayer.hxx.diff
blob955f38eac68040802dce45026c4826f76a5ee3fc
1 --- /dev/null 2006-09-07 16:53:33.000000000 +0200
2 +++ avmedia/source/gstreamer/gstplayer.hxx 2006-09-22 13:39:21.000000000 +0200
3 @@ -0,0 +1,120 @@
4 +/*************************************************************************
5 + *
6 + * OpenOffice.org - a multi-platform office productivity suite
7 + *
8 + * $RCSfile$
9 + *
10 + * $Revision$
11 + *
12 + * last change: $Author$ $Date$
13 + *
14 + * The Contents of this file are made available subject to
15 + * the terms of GNU Lesser General Public License Version 2.1.
16 + *
17 + *
18 + * GNU Lesser General Public License Version 2.1
19 + * =============================================
20 + * Copyright 2005 by Sun Microsystems, Inc.
21 + * 901 San Antonio Road, Palo Alto, CA 94303, USA
22 + *
23 + * This library is free software; you can redistribute it and/or
24 + * modify it under the terms of the GNU Lesser General Public
25 + * License version 2.1, as published by the Free Software Foundation.
26 + *
27 + * This library is distributed in the hope that it will be useful,
28 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 + * Lesser General Public License for more details.
31 + *
32 + * You should have received a copy of the GNU Lesser General Public
33 + * License along with this library; if not, write to the Free Software
34 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
35 + * MA 02111-1307 USA
36 + *
37 + ************************************************************************/
39 +#ifndef _PLAYER_HXX
40 +#define _PLAYER_HXX
42 +#include <osl/conditn.h>
43 +#include "gstcommon.hxx"
45 +#ifndef _COM_SUN_STAR_MEDIA_XPLAYER_HDL_
46 +#include "com/sun/star/media/XPlayer.hdl"
47 +#endif
49 +typedef struct _GstXOverlay GstXOverlay;
51 +namespace avmedia { namespace gstreamer {
53 +// ----------
54 +// - Player -
55 +// ----------
57 +class Player : public ::cppu::WeakImplHelper2< ::com::sun::star::media::XPlayer,
58 + ::com::sun::star::lang::XServiceInfo >
60 +public:
62 + Player( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr );
63 + ~Player();
65 + void preparePlaybin( const ::rtl::OUString& rURL, bool bFakeVideo );
66 + bool create( const ::rtl::OUString& rURL );
67 + void processMessage( GstMessage *message );
68 + GstBusSyncReply processSyncMessage( GstMessage *message );
70 + // XPlayer
71 + virtual void SAL_CALL start( ) throw (::com::sun::star::uno::RuntimeException);
72 + virtual void SAL_CALL stop( ) throw (::com::sun::star::uno::RuntimeException);
73 + virtual sal_Bool SAL_CALL isPlaying( ) throw (::com::sun::star::uno::RuntimeException);
74 + virtual double SAL_CALL getDuration( ) throw (::com::sun::star::uno::RuntimeException);
75 + virtual void SAL_CALL setMediaTime( double fTime ) throw (::com::sun::star::uno::RuntimeException);
76 + virtual double SAL_CALL getMediaTime( ) throw (::com::sun::star::uno::RuntimeException);
77 + virtual void SAL_CALL setStopTime( double fTime ) throw (::com::sun::star::uno::RuntimeException);
78 + virtual double SAL_CALL getStopTime( ) throw (::com::sun::star::uno::RuntimeException);
79 + virtual void SAL_CALL setRate( double fRate ) throw (::com::sun::star::uno::RuntimeException);
80 + virtual double SAL_CALL getRate( ) throw (::com::sun::star::uno::RuntimeException);
81 + virtual void SAL_CALL setPlaybackLoop( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException);
82 + virtual sal_Bool SAL_CALL isPlaybackLoop( ) throw (::com::sun::star::uno::RuntimeException);
83 + virtual void SAL_CALL setMute( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException);
84 + virtual sal_Bool SAL_CALL isMute( ) throw (::com::sun::star::uno::RuntimeException);
85 + virtual void SAL_CALL setVolumeDB( sal_Int16 nVolumeDB ) throw (::com::sun::star::uno::RuntimeException);
86 + virtual sal_Int16 SAL_CALL getVolumeDB( ) throw (::com::sun::star::uno::RuntimeException);
87 + virtual ::com::sun::star::awt::Size SAL_CALL getPreferredPlayerWindowSize( ) throw (::com::sun::star::uno::RuntimeException);
88 + 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 >& aArguments ) throw (::com::sun::star::uno::RuntimeException);
89 + virtual ::com::sun::star::uno::Reference< ::com::sun::star::media::XFrameGrabber > SAL_CALL createFrameGrabber( ) throw (::com::sun::star::uno::RuntimeException);
91 + // XServiceInfo
92 + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
93 + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
94 + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
96 +private:
98 + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
100 + ::rtl::OUString maURL;
102 + // Add elements and pipeline here
103 + GstElement* mpPlaybin; // the playbin is also a pipeline
104 + sal_Bool mbFakeVideo;
106 + gdouble mnUnmutedVolume;
107 + sal_Bool mbMuted;
108 + sal_Bool mbLooping;
109 + sal_Bool mbInitialized;
111 + long mnWindowID;
112 + GstXOverlay* mpXOverlay;
113 + gint64 mnDuration;
114 + int mnWidth;
115 + int mnHeight;
117 + oslCondition maSizeCondition;
120 +} // namespace gstreamer
121 +} // namespace avmedia
123 +#endif // _PLAYER_HXX