summaryrefslogtreecommitdiff
path: root/avmedia/source
diff options
context:
space:
mode:
authorMinh Ngo <nlminhtl@gmail.com>2013-08-05 23:57:42 +0300
committerMichael Meeks <michael.meeks@suse.com>2013-08-21 10:54:51 +0100
commitcb3ba53e3f995d4034bc5a9113015d81a1db30a4 (patch)
treef074dadb5d0f3db0a9f9a72f79ed4bd0ad73bf75 /avmedia/source
parent619b848b66fd6e9825655cb6e9734c58e54fbe83 (diff)
API interface for libvlc_media_t
Change-Id: I5e1875dabc7bdf3717540343648a9212506faf1a
Diffstat (limited to 'avmedia/source')
-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
3 files changed, 8 insertions, 18 deletions
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: */