merge the formfield patch from ooo-build
[ooovba.git] / avmedia / source / xine / player.cxx
blob5b44d7ae1c8d80be43e49d147e36fd7c2bc1cf0c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: player.cxx,v $
10 * $Revision: 1.6 $
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 #include "player.hxx"
32 #include "window.hxx"
34 using namespace ::com::sun::star;
36 namespace avmedia { namespace xine {
38 // ----------------
39 // - Player -
40 // ----------------
42 Player::Player()
46 // ------------------------------------------------------------------------------
48 Player::~Player()
52 // ------------------------------------------------------------------------------
54 bool Player::create( const ::rtl::OUString& /* rURL */ )
56 bool bRet = false;
59 return bRet;
62 // ------------------------------------------------------------------------------
64 void SAL_CALL Player::start( )
65 throw (uno::RuntimeException)
69 // ------------------------------------------------------------------------------
71 void SAL_CALL Player::stop( )
72 throw (uno::RuntimeException)
76 // ------------------------------------------------------------------------------
78 sal_Bool SAL_CALL Player::isPlaying()
79 throw (uno::RuntimeException)
81 bool bRet = false;
83 return bRet;
86 // ------------------------------------------------------------------------------
88 double SAL_CALL Player::getDuration( )
89 throw (uno::RuntimeException)
91 double fRet = 0.0;
93 return fRet;
96 // ------------------------------------------------------------------------------
98 void SAL_CALL Player::setMediaTime( double /* fTime */ )
99 throw (uno::RuntimeException)
103 // ------------------------------------------------------------------------------
105 double SAL_CALL Player::getMediaTime( )
106 throw (uno::RuntimeException)
108 double fRet = 0.0;
110 return fRet;
113 // ------------------------------------------------------------------------------
115 void SAL_CALL Player::setStopTime( double /* fTime */ )
116 throw (uno::RuntimeException)
120 // ------------------------------------------------------------------------------
122 double SAL_CALL Player::getStopTime( )
123 throw (uno::RuntimeException)
125 double fRet = 0.0;
127 return fRet;
130 // ------------------------------------------------------------------------------
132 void SAL_CALL Player::setRate( double /* fRate */ )
133 throw (uno::RuntimeException)
137 // ------------------------------------------------------------------------------
139 double SAL_CALL Player::getRate( )
140 throw (uno::RuntimeException)
142 double fRet = 0.0;
144 return fRet;
147 // ------------------------------------------------------------------------------
149 void SAL_CALL Player::setPlaybackLoop( sal_Bool /* bSet */ )
150 throw (uno::RuntimeException)
154 // ------------------------------------------------------------------------------
156 sal_Bool SAL_CALL Player::isPlaybackLoop( )
157 throw (uno::RuntimeException)
159 bool bRet = false;
161 return bRet;
164 // ------------------------------------------------------------------------------
166 void SAL_CALL Player::setMute( sal_Bool /* bSet */ )
167 throw (uno::RuntimeException)
171 // ------------------------------------------------------------------------------
173 sal_Bool SAL_CALL Player::isMute( )
174 throw (uno::RuntimeException)
176 bool bRet = false;
178 return bRet;
181 // ------------------------------------------------------------------------------
183 void SAL_CALL Player::setVolumeDB( sal_Int16 /* nVolumeDB */ )
184 throw (uno::RuntimeException)
188 // ------------------------------------------------------------------------------
190 sal_Int16 SAL_CALL Player::getVolumeDB( )
191 throw (uno::RuntimeException)
193 sal_Int16 nRet = 0;
195 return nRet;
198 // ------------------------------------------------------------------------------
200 awt::Size SAL_CALL Player::getPreferredPlayerWindowSize( )
201 throw (uno::RuntimeException)
203 awt::Size aSize( 0, 0 );
205 return aSize;
208 // ------------------------------------------------------------------------------
210 uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( const uno::Sequence< uno::Any >& aArguments )
211 throw (uno::RuntimeException)
213 uno::Reference< ::media::XPlayerWindow > xRet;
214 awt::Size aSize( getPreferredPlayerWindowSize() );
216 if( aSize.Width > 0 && aSize.Height > 0 )
218 ::avmedia::xine::Window* pWindow = new ::avmedia::xine::Window( *this );
220 xRet = pWindow;
222 if( !pWindow->create( aArguments ) )
223 xRet = uno::Reference< ::media::XPlayerWindow >();
226 return xRet;
229 // ------------------------------------------------------------------------------
231 uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber( )
232 throw (::com::sun::star::uno::RuntimeException)
234 return NULL;
237 // ------------------------------------------------------------------------------
239 ::rtl::OUString SAL_CALL Player::getImplementationName( )
240 throw (uno::RuntimeException)
242 return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_XINE_PLAYER_IMPLEMENTATIONNAME ) );
245 // ------------------------------------------------------------------------------
247 sal_Bool SAL_CALL Player::supportsService( const ::rtl::OUString& ServiceName )
248 throw (uno::RuntimeException)
250 return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_XINE_PLAYER_SERVICENAME ) );
253 // ------------------------------------------------------------------------------
255 uno::Sequence< ::rtl::OUString > SAL_CALL Player::getSupportedServiceNames( )
256 throw (uno::RuntimeException)
258 uno::Sequence< ::rtl::OUString > aRet(1);
259 aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_XINE_PLAYER_SERVICENAME ) );
261 return aRet;
264 } // namespace xine
265 } // namespace avmedia