summaryrefslogtreecommitdiff
path: root/avmedia/source/gstreamer/gstuno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'avmedia/source/gstreamer/gstuno.cxx')
-rw-r--r--avmedia/source/gstreamer/gstuno.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/avmedia/source/gstreamer/gstuno.cxx b/avmedia/source/gstreamer/gstuno.cxx
index 80953536a6e4..affb8eb20fce 100644
--- a/avmedia/source/gstreamer/gstuno.cxx
+++ b/avmedia/source/gstreamer/gstuno.cxx
@@ -26,6 +26,7 @@
*
************************************************************************/
+#include "mediamisc.hxx"
#include "gstmanager.hxx"
using namespace ::com::sun::star;
@@ -34,6 +35,14 @@ using namespace ::com::sun::star;
// - factory methods -
// -------------------
+#ifdef AVMEDIA_GST_0_10
+# define IMPL_NAME "com.sun.star.comp.media.Manager_GStreamer_0_10"
+# define SERVICE_NAME AVMEDIA_MANAGER_SERVICE_NAME_OLD // "com.sun.star.comp.avmedia.Manager_GStreamer_0_10"
+#else
+# define IMPL_NAME "com.sun.star.comp.media.Manager_GStreamer"
+# define SERVICE_NAME AVMEDIA_MANAGER_SERVICE_NAME // "com.sun.star.comp.avmedia.Manager_GStreamer"
+#endif
+
static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno::Reference< lang::XMultiServiceFactory >& rxFact )
{
return uno::Reference< uno::XInterface >( *new ::avmedia::gstreamer::Manager( rxFact ) );
@@ -44,14 +53,12 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_C
uno::Reference< lang::XSingleServiceFactory > xFactory;
void* pRet = 0;
- if( rtl_str_compare( pImplName, "com.sun.star.comp.media.Manager_GStreamer" ) == 0 )
+ if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
{
- const ::rtl::OUString aServiceName( ::rtl::OUString("com.sun.star.media.Manager_GStreamer" ) );
-
+ const ::rtl::OUString aServiceName( SERVICE_NAME );
xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- ::rtl::OUString("com.sun.star.comp.media.Manager_GStreamer" ),
- create_MediaPlayer, uno::Sequence< ::rtl::OUString >( &aServiceName, 1 ) ) );
+ IMPL_NAME, create_MediaPlayer, uno::Sequence< ::rtl::OUString >( &aServiceName, 1 ) ) );
}
if( xFactory.is() )