summaryrefslogtreecommitdiff
path: root/avmedia/source/vlc/vlcuno.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-05-29 12:27:08 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-07-26 10:50:16 +0100
commit791e2f66652f9fd4af100776730c62484927c144 (patch)
tree526eb600fdd94d9bdb88e295525d4cf40ca20788 /avmedia/source/vlc/vlcuno.cxx
parent4426b03a38279c99857202871917a5b9cef02758 (diff)
initial vlc component build / conditionals and hookup.
Change-Id: I12e4a368e18a58099160ee65eebe837744e11378
Diffstat (limited to 'avmedia/source/vlc/vlcuno.cxx')
-rw-r--r--avmedia/source/vlc/vlcuno.cxx56
1 files changed, 56 insertions, 0 deletions
diff --git a/avmedia/source/vlc/vlcuno.cxx b/avmedia/source/vlc/vlcuno.cxx
new file mode 100644
index 000000000000..e907a1bbeb02
--- /dev/null
+++ b/avmedia/source/vlc/vlcuno.cxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "vlccommon.hxx"
+
+using namespace ::com::sun::star;
+
+#define IMPL_NAME "com.sun.star.comp.media.Manager_VLC"
+#define SERVICE_NAME "com.sun.star.comp.avmedia.Manager_VLC"
+
+static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno::Reference< lang::XMultiServiceFactory >& rxFact )
+{
+ fprintf (stderr, "create VLC Media player !\n");
+ (void) rxFact;
+ return uno::Reference< uno::XInterface >(); // *new ::avmedia::vlc::Manager( rxFact ) );
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediavlc_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
+{
+ uno::Reference< lang::XSingleServiceFactory > xFactory;
+ void* pRet = 0;
+
+ if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
+ {
+ const OUString aServiceName( SERVICE_NAME );
+ xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
+ reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
+ IMPL_NAME, create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) );
+ }
+
+ if( xFactory.is() )
+ {
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
+
+ return pRet;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */