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 10cdf0e10cSrcweir * 11*f39251c4SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 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. 19cdf0e10cSrcweir * 20*f39251c4SAndrew Rist *************************************************************/ 21*f39251c4SAndrew Rist 22*f39251c4SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #include "gstmanager.hxx" 25cdf0e10cSrcweir #include "gstplayer.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir using namespace ::com::sun::star; 28cdf0e10cSrcweir 29cdf0e10cSrcweir namespace avmedia 30cdf0e10cSrcweir { 31cdf0e10cSrcweir namespace gst 32cdf0e10cSrcweir { 33cdf0e10cSrcweir // ---------------- 34cdf0e10cSrcweir // - Manager - 35cdf0e10cSrcweir // ---------------- 36cdf0e10cSrcweir Manager(const uno::Reference<lang::XMultiServiceFactory> & rxMgr)37cdf0e10cSrcweirManager::Manager( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) : 38cdf0e10cSrcweir mxMgr( rxMgr ) 39cdf0e10cSrcweir {} 40cdf0e10cSrcweir 41cdf0e10cSrcweir // ------------------------------------------------------------------------------ 42cdf0e10cSrcweir ~Manager()43cdf0e10cSrcweirManager::~Manager() 44cdf0e10cSrcweir {} 45cdf0e10cSrcweir 46cdf0e10cSrcweir // ------------------------------------------------------------------------------ 47cdf0e10cSrcweir createPlayer(const::rtl::OUString & rURL)48cdf0e10cSrcweiruno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OUString& rURL ) 49cdf0e10cSrcweir throw( uno::RuntimeException ) 50cdf0e10cSrcweir { 51cdf0e10cSrcweir return( ::avmedia::gst::Player::create( rURL ) ); 52cdf0e10cSrcweir } 53cdf0e10cSrcweir 54cdf0e10cSrcweir // ------------------------------------------------------------------------------ 55cdf0e10cSrcweir getImplementationName()56cdf0e10cSrcweir::rtl::OUString SAL_CALL Manager::getImplementationName() 57cdf0e10cSrcweir throw( uno::RuntimeException ) 58cdf0e10cSrcweir { 59cdf0e10cSrcweir return( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_GSTREAMER_MANAGER_IMPLEMENTATIONNAME ) ) ); 60cdf0e10cSrcweir } 61cdf0e10cSrcweir 62cdf0e10cSrcweir // ------------------------------------------------------------------------------ 63cdf0e10cSrcweir supportsService(const::rtl::OUString & ServiceName)64cdf0e10cSrcweirsal_Bool SAL_CALL Manager::supportsService( const ::rtl::OUString& ServiceName ) 65cdf0e10cSrcweir throw( uno::RuntimeException ) 66cdf0e10cSrcweir { 67cdf0e10cSrcweir return( ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( AVMEDIA_GSTREAMER_MANAGER_SERVICENAME ) ) ); 68cdf0e10cSrcweir } 69cdf0e10cSrcweir 70cdf0e10cSrcweir // ------------------------------------------------------------------------------ 71cdf0e10cSrcweir getSupportedServiceNames()72cdf0e10cSrcweiruno::Sequence< ::rtl::OUString > SAL_CALL Manager::getSupportedServiceNames() 73cdf0e10cSrcweir throw( uno::RuntimeException ) 74cdf0e10cSrcweir { 75cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > aRet( 1 ); 76cdf0e10cSrcweir aRet[ 0 ] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_GSTREAMER_MANAGER_SERVICENAME ) ); 77cdf0e10cSrcweir 78cdf0e10cSrcweir return( aRet ); 79cdf0e10cSrcweir } 80cdf0e10cSrcweir } // namespace gst 81cdf0e10cSrcweir } // namespace avmedia 82