1*9ea84ac5SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*9ea84ac5SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*9ea84ac5SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*9ea84ac5SAndrew Rist * distributed with this work for additional information 6*9ea84ac5SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*9ea84ac5SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*9ea84ac5SAndrew Rist * "License"); you may not use this file except in compliance 9*9ea84ac5SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*9ea84ac5SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*9ea84ac5SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*9ea84ac5SAndrew Rist * software distributed under the License is distributed on an 15*9ea84ac5SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*9ea84ac5SAndrew Rist * KIND, either express or implied. See the License for the 17*9ea84ac5SAndrew Rist * specific language governing permissions and limitations 18*9ea84ac5SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*9ea84ac5SAndrew Rist *************************************************************/ 21*9ea84ac5SAndrew Rist 22*9ea84ac5SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _PLAYER_HXX 25cdf0e10cSrcweir #define _PLAYER_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "xinecommon.hxx" 28cdf0e10cSrcweir 29cdf0e10cSrcweir #ifndef _COM_SUN_STAR_MEDIA_XPLAYER_HDL_ 30cdf0e10cSrcweir #include "com/sun/star/media/XPlayer.hdl" 31cdf0e10cSrcweir #endif 32cdf0e10cSrcweir 33cdf0e10cSrcweir namespace avmedia { namespace xine { 34cdf0e10cSrcweir 35cdf0e10cSrcweir // ---------- 36cdf0e10cSrcweir // - Player - 37cdf0e10cSrcweir // ---------- 38cdf0e10cSrcweir 39cdf0e10cSrcweir class Player : public ::cppu::WeakImplHelper2< ::com::sun::star::media::XPlayer, 40cdf0e10cSrcweir ::com::sun::star::lang::XServiceInfo > 41cdf0e10cSrcweir { 42cdf0e10cSrcweir public: 43cdf0e10cSrcweir 44cdf0e10cSrcweir Player(); 45cdf0e10cSrcweir ~Player(); 46cdf0e10cSrcweir 47cdf0e10cSrcweir bool create( const ::rtl::OUString& rURL ); 48cdf0e10cSrcweir 49cdf0e10cSrcweir // XPlayer 50cdf0e10cSrcweir virtual void SAL_CALL start( ) throw (::com::sun::star::uno::RuntimeException); 51cdf0e10cSrcweir virtual void SAL_CALL stop( ) throw (::com::sun::star::uno::RuntimeException); 52cdf0e10cSrcweir virtual sal_Bool SAL_CALL isPlaying( ) throw (::com::sun::star::uno::RuntimeException); 53cdf0e10cSrcweir virtual double SAL_CALL getDuration( ) throw (::com::sun::star::uno::RuntimeException); 54cdf0e10cSrcweir virtual void SAL_CALL setMediaTime( double fTime ) throw (::com::sun::star::uno::RuntimeException); 55cdf0e10cSrcweir virtual double SAL_CALL getMediaTime( ) throw (::com::sun::star::uno::RuntimeException); 56cdf0e10cSrcweir virtual void SAL_CALL setStopTime( double fTime ) throw (::com::sun::star::uno::RuntimeException); 57cdf0e10cSrcweir virtual double SAL_CALL getStopTime( ) throw (::com::sun::star::uno::RuntimeException); 58cdf0e10cSrcweir virtual void SAL_CALL setRate( double fRate ) throw (::com::sun::star::uno::RuntimeException); 59cdf0e10cSrcweir virtual double SAL_CALL getRate( ) throw (::com::sun::star::uno::RuntimeException); 60cdf0e10cSrcweir virtual void SAL_CALL setPlaybackLoop( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException); 61cdf0e10cSrcweir virtual sal_Bool SAL_CALL isPlaybackLoop( ) throw (::com::sun::star::uno::RuntimeException); 62cdf0e10cSrcweir virtual void SAL_CALL setMute( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException); 63cdf0e10cSrcweir virtual sal_Bool SAL_CALL isMute( ) throw (::com::sun::star::uno::RuntimeException); 64cdf0e10cSrcweir virtual void SAL_CALL setVolumeDB( sal_Int16 nVolumeDB ) throw (::com::sun::star::uno::RuntimeException); 65cdf0e10cSrcweir virtual sal_Int16 SAL_CALL getVolumeDB( ) throw (::com::sun::star::uno::RuntimeException); 66cdf0e10cSrcweir virtual ::com::sun::star::awt::Size SAL_CALL getPreferredPlayerWindowSize( ) throw (::com::sun::star::uno::RuntimeException); 67cdf0e10cSrcweir 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); 68cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::media::XFrameGrabber > SAL_CALL createFrameGrabber( ) throw (::com::sun::star::uno::RuntimeException); 69cdf0e10cSrcweir // XServiceInfo 70cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); 71cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); 72cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); 73cdf0e10cSrcweir 74cdf0e10cSrcweir private: 75cdf0e10cSrcweir }; 76cdf0e10cSrcweir 77cdf0e10cSrcweir } // namespace xine 78cdf0e10cSrcweir } // namespace avmedia 79cdf0e10cSrcweir 80cdf0e10cSrcweir #endif // _PLAYER_HXX 81