xref: /AOO42X/main/avmedia/source/gstreamer/gstmanager.cxx (revision b1c5455db1639c48e26c568e4fa7ee78ca5d60ee)
1f39251c4SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3f39251c4SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4f39251c4SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5f39251c4SAndrew Rist  * distributed with this work for additional information
6f39251c4SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7f39251c4SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8f39251c4SAndrew Rist  * "License"); you may not use this file except in compliance
9f39251c4SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11f39251c4SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13f39251c4SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14f39251c4SAndrew Rist  * software distributed under the License is distributed on an
15f39251c4SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16f39251c4SAndrew Rist  * KIND, either express or implied.  See the License for the
17f39251c4SAndrew Rist  * specific language governing permissions and limitations
18f39251c4SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20f39251c4SAndrew Rist  *************************************************************/
21f39251c4SAndrew Rist 
22f39251c4SAndrew 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<uno::XComponentContext> & rxContext)37*652e100fSDamjan Jovanovic Manager::Manager( const uno::Reference< uno::XComponentContext >& rxContext ) :
38*652e100fSDamjan Jovanovic     mxContext( rxContext )
39cdf0e10cSrcweir {}
40cdf0e10cSrcweir 
41cdf0e10cSrcweir // ------------------------------------------------------------------------------
42cdf0e10cSrcweir 
~Manager()43cdf0e10cSrcweir Manager::~Manager()
44cdf0e10cSrcweir {}
45cdf0e10cSrcweir 
46cdf0e10cSrcweir // ------------------------------------------------------------------------------
47cdf0e10cSrcweir 
createPlayer(const::rtl::OUString & rURL)48cdf0e10cSrcweir uno::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 {
59*652e100fSDamjan Jovanovic     return getImplementationName_Static();
60cdf0e10cSrcweir }
61cdf0e10cSrcweir 
62cdf0e10cSrcweir // ------------------------------------------------------------------------------
63cdf0e10cSrcweir 
supportsService(const::rtl::OUString & ServiceName)64cdf0e10cSrcweir sal_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()72cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > SAL_CALL Manager::getSupportedServiceNames()
73cdf0e10cSrcweir      throw( uno::RuntimeException )
74cdf0e10cSrcweir {
75*652e100fSDamjan Jovanovic     return getSupportedServiceNames_Static();
76*652e100fSDamjan Jovanovic }
77*652e100fSDamjan Jovanovic 
78*652e100fSDamjan Jovanovic // ------------------------------------------------------------------------------
79*652e100fSDamjan Jovanovic 
getImplementationName_Static()80*652e100fSDamjan Jovanovic ::rtl::OUString SAL_CALL Manager::getImplementationName_Static()
81*652e100fSDamjan Jovanovic {
82*652e100fSDamjan Jovanovic     return( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_GSTREAMER_MANAGER_IMPLEMENTATIONNAME ) ) );
83*652e100fSDamjan Jovanovic }
84*652e100fSDamjan Jovanovic 
85*652e100fSDamjan Jovanovic // ------------------------------------------------------------------------------
86*652e100fSDamjan Jovanovic 
getSupportedServiceNames_Static()87*652e100fSDamjan Jovanovic uno::Sequence< ::rtl::OUString > SAL_CALL Manager::getSupportedServiceNames_Static()
88*652e100fSDamjan Jovanovic {
89cdf0e10cSrcweir     uno::Sequence< ::rtl::OUString > aRet( 1 );
90cdf0e10cSrcweir     aRet[ 0 ] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_GSTREAMER_MANAGER_SERVICENAME ) );
91cdf0e10cSrcweir     return( aRet );
92cdf0e10cSrcweir }
93*652e100fSDamjan Jovanovic 
94cdf0e10cSrcweir } // namespace gst
95cdf0e10cSrcweir } // namespace avmedia
96