bump product version to 6.3.0.0.beta1
[LibreOffice.git] / avmedia / source / gstreamer / gstmanager.cxx
blobaa55134e028f7864da6ec3671d5205eb37070cc1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <cppuhelper/supportsservice.hxx>
22 #include "gstmanager.hxx"
23 #include "gstplayer.hxx"
25 #include <tools/urlobj.hxx>
27 #define AVMEDIA_GST_MANAGER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Manager_GStreamer"
28 #define AVMEDIA_GST_MANAGER_SERVICENAME "com.sun.star.media.Manager"
30 using namespace ::com::sun::star;
32 namespace avmedia { namespace gstreamer {
34 Manager::Manager()
38 Manager::~Manager()
42 uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const OUString& rURL )
44 Player* pPlayer( new Player );
45 uno::Reference< media::XPlayer > xRet( pPlayer );
46 const INetURLObject aURL( rURL );
48 if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) ) )
49 xRet.clear();
51 return xRet;
54 OUString SAL_CALL Manager::getImplementationName( )
56 return OUString( AVMEDIA_GST_MANAGER_IMPLEMENTATIONNAME );
59 sal_Bool SAL_CALL Manager::supportsService( const OUString& ServiceName )
61 return cppu::supportsService(this, ServiceName);
64 uno::Sequence< OUString > SAL_CALL Manager::getSupportedServiceNames( )
66 return { AVMEDIA_GST_MANAGER_SERVICENAME };
69 } // namespace gstreamer
70 } // namespace avmedia
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */