1*f39251c4SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*f39251c4SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*f39251c4SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*f39251c4SAndrew Rist * distributed with this work for additional information 6*f39251c4SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*f39251c4SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*f39251c4SAndrew Rist * "License"); you may not use this file except in compliance 9*f39251c4SAndrew Rist * with the License. You may obtain a copy of the License at 10*f39251c4SAndrew Rist * 11*f39251c4SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*f39251c4SAndrew Rist * 13*f39251c4SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*f39251c4SAndrew Rist * software distributed under the License is distributed on an 15*f39251c4SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*f39251c4SAndrew Rist * KIND, either express or implied. See the License for the 17*f39251c4SAndrew Rist * specific language governing permissions and limitations 18*f39251c4SAndrew Rist * under the License. 19*f39251c4SAndrew Rist * 20*f39251c4SAndrew Rist *************************************************************/ 21*f39251c4SAndrew Rist 22*f39251c4SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #include "player.hxx" 25cdf0e10cSrcweir #include "window.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir using namespace ::com::sun::star; 28cdf0e10cSrcweir 29cdf0e10cSrcweir namespace avmedia { namespace xine { 30cdf0e10cSrcweir 31cdf0e10cSrcweir // ---------------- 32cdf0e10cSrcweir // - Player - 33cdf0e10cSrcweir // ---------------- 34cdf0e10cSrcweir Player()35cdf0e10cSrcweirPlayer::Player() 36cdf0e10cSrcweir { 37cdf0e10cSrcweir } 38cdf0e10cSrcweir 39cdf0e10cSrcweir // ------------------------------------------------------------------------------ 40cdf0e10cSrcweir ~Player()41cdf0e10cSrcweirPlayer::~Player() 42cdf0e10cSrcweir { 43cdf0e10cSrcweir } 44cdf0e10cSrcweir 45cdf0e10cSrcweir // ------------------------------------------------------------------------------ 46cdf0e10cSrcweir create(const::rtl::OUString &)47cdf0e10cSrcweirbool Player::create( const ::rtl::OUString& /* rURL */ ) 48cdf0e10cSrcweir { 49cdf0e10cSrcweir bool bRet = false; 50cdf0e10cSrcweir 51cdf0e10cSrcweir 52cdf0e10cSrcweir return bRet; 53cdf0e10cSrcweir } 54cdf0e10cSrcweir 55cdf0e10cSrcweir // ------------------------------------------------------------------------------ 56cdf0e10cSrcweir start()57cdf0e10cSrcweirvoid SAL_CALL Player::start( ) 58cdf0e10cSrcweir throw (uno::RuntimeException) 59cdf0e10cSrcweir { 60cdf0e10cSrcweir } 61cdf0e10cSrcweir 62cdf0e10cSrcweir // ------------------------------------------------------------------------------ 63cdf0e10cSrcweir stop()64cdf0e10cSrcweirvoid SAL_CALL Player::stop( ) 65cdf0e10cSrcweir throw (uno::RuntimeException) 66cdf0e10cSrcweir { 67cdf0e10cSrcweir } 68cdf0e10cSrcweir 69cdf0e10cSrcweir // ------------------------------------------------------------------------------ 70cdf0e10cSrcweir isPlaying()71cdf0e10cSrcweirsal_Bool SAL_CALL Player::isPlaying() 72cdf0e10cSrcweir throw (uno::RuntimeException) 73cdf0e10cSrcweir { 74cdf0e10cSrcweir bool bRet = false; 75cdf0e10cSrcweir 76cdf0e10cSrcweir return bRet; 77cdf0e10cSrcweir } 78cdf0e10cSrcweir 79cdf0e10cSrcweir // ------------------------------------------------------------------------------ 80cdf0e10cSrcweir getDuration()81cdf0e10cSrcweirdouble SAL_CALL Player::getDuration( ) 82cdf0e10cSrcweir throw (uno::RuntimeException) 83cdf0e10cSrcweir { 84cdf0e10cSrcweir double fRet = 0.0; 85cdf0e10cSrcweir 86cdf0e10cSrcweir return fRet; 87cdf0e10cSrcweir } 88cdf0e10cSrcweir 89cdf0e10cSrcweir // ------------------------------------------------------------------------------ 90cdf0e10cSrcweir setMediaTime(double)91cdf0e10cSrcweirvoid SAL_CALL Player::setMediaTime( double /* fTime */ ) 92cdf0e10cSrcweir throw (uno::RuntimeException) 93cdf0e10cSrcweir { 94cdf0e10cSrcweir } 95cdf0e10cSrcweir 96cdf0e10cSrcweir // ------------------------------------------------------------------------------ 97cdf0e10cSrcweir getMediaTime()98cdf0e10cSrcweirdouble SAL_CALL Player::getMediaTime( ) 99cdf0e10cSrcweir throw (uno::RuntimeException) 100cdf0e10cSrcweir { 101cdf0e10cSrcweir double fRet = 0.0; 102cdf0e10cSrcweir 103cdf0e10cSrcweir return fRet; 104cdf0e10cSrcweir } 105cdf0e10cSrcweir 106cdf0e10cSrcweir // ------------------------------------------------------------------------------ 107cdf0e10cSrcweir setStopTime(double)108cdf0e10cSrcweirvoid SAL_CALL Player::setStopTime( double /* fTime */ ) 109cdf0e10cSrcweir throw (uno::RuntimeException) 110cdf0e10cSrcweir { 111cdf0e10cSrcweir } 112cdf0e10cSrcweir 113cdf0e10cSrcweir // ------------------------------------------------------------------------------ 114cdf0e10cSrcweir getStopTime()115cdf0e10cSrcweirdouble SAL_CALL Player::getStopTime( ) 116cdf0e10cSrcweir throw (uno::RuntimeException) 117cdf0e10cSrcweir { 118cdf0e10cSrcweir double fRet = 0.0; 119cdf0e10cSrcweir 120cdf0e10cSrcweir return fRet; 121cdf0e10cSrcweir } 122cdf0e10cSrcweir 123cdf0e10cSrcweir // ------------------------------------------------------------------------------ 124cdf0e10cSrcweir setRate(double)125cdf0e10cSrcweirvoid SAL_CALL Player::setRate( double /* fRate */ ) 126cdf0e10cSrcweir throw (uno::RuntimeException) 127cdf0e10cSrcweir { 128cdf0e10cSrcweir } 129cdf0e10cSrcweir 130cdf0e10cSrcweir // ------------------------------------------------------------------------------ 131cdf0e10cSrcweir getRate()132cdf0e10cSrcweirdouble SAL_CALL Player::getRate( ) 133cdf0e10cSrcweir throw (uno::RuntimeException) 134cdf0e10cSrcweir { 135cdf0e10cSrcweir double fRet = 0.0; 136cdf0e10cSrcweir 137cdf0e10cSrcweir return fRet; 138cdf0e10cSrcweir } 139cdf0e10cSrcweir 140cdf0e10cSrcweir // ------------------------------------------------------------------------------ 141cdf0e10cSrcweir setPlaybackLoop(sal_Bool)142cdf0e10cSrcweirvoid SAL_CALL Player::setPlaybackLoop( sal_Bool /* bSet */ ) 143cdf0e10cSrcweir throw (uno::RuntimeException) 144cdf0e10cSrcweir { 145cdf0e10cSrcweir } 146cdf0e10cSrcweir 147cdf0e10cSrcweir // ------------------------------------------------------------------------------ 148cdf0e10cSrcweir isPlaybackLoop()149cdf0e10cSrcweirsal_Bool SAL_CALL Player::isPlaybackLoop( ) 150cdf0e10cSrcweir throw (uno::RuntimeException) 151cdf0e10cSrcweir { 152cdf0e10cSrcweir bool bRet = false; 153cdf0e10cSrcweir 154cdf0e10cSrcweir return bRet; 155cdf0e10cSrcweir } 156cdf0e10cSrcweir 157cdf0e10cSrcweir // ------------------------------------------------------------------------------ 158cdf0e10cSrcweir setMute(sal_Bool)159cdf0e10cSrcweirvoid SAL_CALL Player::setMute( sal_Bool /* bSet */ ) 160cdf0e10cSrcweir throw (uno::RuntimeException) 161cdf0e10cSrcweir { 162cdf0e10cSrcweir } 163cdf0e10cSrcweir 164cdf0e10cSrcweir // ------------------------------------------------------------------------------ 165cdf0e10cSrcweir isMute()166cdf0e10cSrcweirsal_Bool SAL_CALL Player::isMute( ) 167cdf0e10cSrcweir throw (uno::RuntimeException) 168cdf0e10cSrcweir { 169cdf0e10cSrcweir bool bRet = false; 170cdf0e10cSrcweir 171cdf0e10cSrcweir return bRet; 172cdf0e10cSrcweir } 173cdf0e10cSrcweir 174cdf0e10cSrcweir // ------------------------------------------------------------------------------ 175cdf0e10cSrcweir setVolumeDB(sal_Int16)176cdf0e10cSrcweirvoid SAL_CALL Player::setVolumeDB( sal_Int16 /* nVolumeDB */ ) 177cdf0e10cSrcweir throw (uno::RuntimeException) 178cdf0e10cSrcweir { 179cdf0e10cSrcweir } 180cdf0e10cSrcweir 181cdf0e10cSrcweir // ------------------------------------------------------------------------------ 182cdf0e10cSrcweir getVolumeDB()183cdf0e10cSrcweirsal_Int16 SAL_CALL Player::getVolumeDB( ) 184cdf0e10cSrcweir throw (uno::RuntimeException) 185cdf0e10cSrcweir { 186cdf0e10cSrcweir sal_Int16 nRet = 0; 187cdf0e10cSrcweir 188cdf0e10cSrcweir return nRet; 189cdf0e10cSrcweir } 190cdf0e10cSrcweir 191cdf0e10cSrcweir // ------------------------------------------------------------------------------ 192cdf0e10cSrcweir getPreferredPlayerWindowSize()193cdf0e10cSrcweirawt::Size SAL_CALL Player::getPreferredPlayerWindowSize( ) 194cdf0e10cSrcweir throw (uno::RuntimeException) 195cdf0e10cSrcweir { 196cdf0e10cSrcweir awt::Size aSize( 0, 0 ); 197cdf0e10cSrcweir 198cdf0e10cSrcweir return aSize; 199cdf0e10cSrcweir } 200cdf0e10cSrcweir 201cdf0e10cSrcweir // ------------------------------------------------------------------------------ 202cdf0e10cSrcweir createPlayerWindow(const uno::Sequence<uno::Any> & aArguments)203cdf0e10cSrcweiruno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( const uno::Sequence< uno::Any >& aArguments ) 204cdf0e10cSrcweir throw (uno::RuntimeException) 205cdf0e10cSrcweir { 206cdf0e10cSrcweir uno::Reference< ::media::XPlayerWindow > xRet; 207cdf0e10cSrcweir awt::Size aSize( getPreferredPlayerWindowSize() ); 208cdf0e10cSrcweir 209cdf0e10cSrcweir if( aSize.Width > 0 && aSize.Height > 0 ) 210cdf0e10cSrcweir { 211cdf0e10cSrcweir ::avmedia::xine::Window* pWindow = new ::avmedia::xine::Window( *this ); 212cdf0e10cSrcweir 213cdf0e10cSrcweir xRet = pWindow; 214cdf0e10cSrcweir 215cdf0e10cSrcweir if( !pWindow->create( aArguments ) ) 216cdf0e10cSrcweir xRet = uno::Reference< ::media::XPlayerWindow >(); 217cdf0e10cSrcweir } 218cdf0e10cSrcweir 219cdf0e10cSrcweir return xRet; 220cdf0e10cSrcweir } 221cdf0e10cSrcweir 222cdf0e10cSrcweir // ------------------------------------------------------------------------------ 223cdf0e10cSrcweir createFrameGrabber()224cdf0e10cSrcweiruno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber( ) 225cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException) 226cdf0e10cSrcweir { 227cdf0e10cSrcweir return NULL; 228cdf0e10cSrcweir } 229cdf0e10cSrcweir 230cdf0e10cSrcweir // ------------------------------------------------------------------------------ 231cdf0e10cSrcweir getImplementationName()232cdf0e10cSrcweir::rtl::OUString SAL_CALL Player::getImplementationName( ) 233cdf0e10cSrcweir throw (uno::RuntimeException) 234cdf0e10cSrcweir { 235cdf0e10cSrcweir return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_XINE_PLAYER_IMPLEMENTATIONNAME ) ); 236cdf0e10cSrcweir } 237cdf0e10cSrcweir 238cdf0e10cSrcweir // ------------------------------------------------------------------------------ 239cdf0e10cSrcweir supportsService(const::rtl::OUString & ServiceName)240cdf0e10cSrcweirsal_Bool SAL_CALL Player::supportsService( const ::rtl::OUString& ServiceName ) 241cdf0e10cSrcweir throw (uno::RuntimeException) 242cdf0e10cSrcweir { 243cdf0e10cSrcweir return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_XINE_PLAYER_SERVICENAME ) ); 244cdf0e10cSrcweir } 245cdf0e10cSrcweir 246cdf0e10cSrcweir // ------------------------------------------------------------------------------ 247cdf0e10cSrcweir getSupportedServiceNames()248cdf0e10cSrcweiruno::Sequence< ::rtl::OUString > SAL_CALL Player::getSupportedServiceNames( ) 249cdf0e10cSrcweir throw (uno::RuntimeException) 250cdf0e10cSrcweir { 251cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > aRet(1); 252cdf0e10cSrcweir aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_XINE_PLAYER_SERVICENAME ) ); 253cdf0e10cSrcweir 254cdf0e10cSrcweir return aRet; 255cdf0e10cSrcweir } 256cdf0e10cSrcweir 257cdf0e10cSrcweir } // namespace xine 258cdf0e10cSrcweir } // namespace avmedia 259