summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/Library_avmediavlc.mk37
-rw-r--r--avmedia/source/vlc/vlcplayer.cxx15
-rw-r--r--avmedia/source/vlc/vlcplayer.hxx3
-rw-r--r--avmedia/source/vlc/wrapper/Instance.cxx8
4 files changed, 27 insertions, 36 deletions
diff --git a/avmedia/Library_avmediavlc.mk b/avmedia/Library_avmediavlc.mk
index 1c317e355874..a04237b77a91 100644
--- a/avmedia/Library_avmediavlc.mk
+++ b/avmedia/Library_avmediavlc.mk
@@ -12,9 +12,9 @@ $(eval $(call gb_Library_Library,avmediavlc))
$(eval $(call gb_Library_set_componentfile,avmediavlc,avmedia/source/vlc/avmediavlc))
$(eval $(call gb_Library_set_include,avmediavlc,\
- $$(INCLUDE) \
- -I$(SRCDIR)/avmedia/source/inc \
- $(VLC_CFLAGS) \
+ $$(INCLUDE) \
+ -I$(SRCDIR)/avmedia/source/inc \
+ $(VLC_CFLAGS) \
))
$(eval $(call gb_Library_add_libs,avmediavlc,$(VLC_LIBS)))
@@ -24,28 +24,29 @@ $(eval $(call gb_Library_use_sdk_api,avmediavlc))
ifeq ($(OS),WNT)
$(eval $(call gb_Library_add_defs,avmediavlc,\
- -DWINNT
+ -DWINNT
))
endif
$(eval $(call gb_Library_use_libraries,avmediavlc,\
- comphelper \
- cppu \
- cppuhelper \
- sal \
- tl \
- vcl \
- utl \
- $(gb_UWINAPI) \
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ tl \
+ vcl \
+ utl \
+ $(gb_UWINAPI) \
))
$(eval $(call gb_Library_add_exception_objects,avmediavlc,\
- avmedia/source/vlc/vlcmanager \
- avmedia/source/vlc/vlcplayer \
- avmedia/source/vlc/vlcuno \
- avmedia/source/vlc/vlcwindow \
- avmedia/source/vlc/vlcframegrabber \
- avmedia/source/vlc/wrapper/Instance \
+ avmedia/source/vlc/vlcmanager \
+ avmedia/source/vlc/vlcplayer \
+ avmedia/source/vlc/vlcuno \
+ avmedia/source/vlc/vlcwindow \
+ avmedia/source/vlc/vlcframegrabber \
+ avmedia/source/vlc/wrapper/Instance \
+ avmedia/source/vlc/wrapper/Media \
))
# vim: set noet sw=4 ts=4:
diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index bcfc04f8cf79..f3e3f6924d45 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -23,22 +23,11 @@ const char * const VLC_ARGS[] = {
const int MS_IN_SEC = 1000; // Millisec in sec
-namespace
-{
- libvlc_media_t* InitMedia( const rtl::OUString& url, VLC::Instance& instance )
- {
- rtl::OString dest;
- url.convertToString(&dest, RTL_TEXTENCODING_UTF8, 0);
-
- return libvlc_media_new_path(instance, dest.getStr());
- }
-}
-
VLCPlayer::VLCPlayer( const rtl::OUString& url )
: VLC_Base(m_aMutex)
, mInstance( VLC_ARGS )
- , mMedia( InitMedia( url, mInstance ), libvlc_media_release )
- , mPlayer( libvlc_media_player_new_from_media( mMedia.get() ), libvlc_media_player_release )
+ , mMedia( url, mInstance )
+ , mPlayer( libvlc_media_player_new_from_media( mMedia ), libvlc_media_player_release )
, mUrl( url )
, mPlaybackLoop( false )
{
diff --git a/avmedia/source/vlc/vlcplayer.hxx b/avmedia/source/vlc/vlcplayer.hxx
index b7c4bed70ab0..e8d3fd0b9e08 100644
--- a/avmedia/source/vlc/vlcplayer.hxx
+++ b/avmedia/source/vlc/vlcplayer.hxx
@@ -28,6 +28,7 @@
#include <cppuhelper/basemutex.hxx>
#include "wrapper/Instance.hxx"
+#include "wrapper/Media.hxx"
namespace avmedia {
namespace vlc {
@@ -39,7 +40,7 @@ class VLCPlayer : public ::cppu::BaseMutex,
public VLC_Base
{
VLC::Instance mInstance;
- boost::shared_ptr<libvlc_media_t> mMedia;
+ VLC::Media mMedia;
boost::shared_ptr<libvlc_media_player_t> mPlayer;
const rtl::OUString mUrl;
bool mPlaybackLoop;
diff --git a/avmedia/source/vlc/wrapper/Instance.cxx b/avmedia/source/vlc/wrapper/Instance.cxx
index a150fefe620a..301d97b8d34b 100644
--- a/avmedia/source/vlc/wrapper/Instance.cxx
+++ b/avmedia/source/vlc/wrapper/Instance.cxx
@@ -1,5 +1,4 @@
-#include <rtl/ustring.hxx>
-
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "Instance.hxx"
#include "SymbolLoader.hxx"
@@ -7,8 +6,8 @@ namespace VLC
{
namespace
{
- libvlc_instance_t *(*libvlc_new) (int argc, const char * const *argv);
- void (*libvlc_release) (libvlc_instance_t *p_instance);
+ libvlc_instance_t* ( *libvlc_new ) ( int argc, const char * const *argv );
+ void ( *libvlc_release ) ( libvlc_instance_t *p_instance );
ApiMap VLC_INSTANCE_API[] =
{
@@ -30,3 +29,4 @@ namespace VLC
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */