Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
6a9d3e7f
Kaydet (Commit)
6a9d3e7f
authored
Eyl 14, 2013
tarafından
Minh Ngo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Avmedia/VLC component code refactoring.
Change-Id: Ibba5874e63356069d1af725d98980910dbaf8eb1
üst
b3e0c808
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
207 additions
and
122 deletions
+207
-122
vlcframegrabber.cxx
avmedia/source/vlc/vlcframegrabber.cxx
+2
-2
vlcframegrabber.hxx
avmedia/source/vlc/vlcframegrabber.hxx
+13
-14
vlcmanager.cxx
avmedia/source/vlc/vlcmanager.cxx
+1
-1
vlcmanager.hxx
avmedia/source/vlc/vlcmanager.hxx
+2
-2
vlcplayer.cxx
avmedia/source/vlc/vlcplayer.cxx
+2
-2
vlcplayer.hxx
avmedia/source/vlc/vlcplayer.hxx
+7
-7
vlcwindow.cxx
avmedia/source/vlc/vlcwindow.cxx
+5
-2
Common.cxx
avmedia/source/vlc/wrapper/Common.cxx
+10
-3
Common.hxx
avmedia/source/vlc/wrapper/Common.hxx
+8
-1
EventHandler.cxx
avmedia/source/vlc/wrapper/EventHandler.cxx
+8
-2
EventHandler.hxx
avmedia/source/vlc/wrapper/EventHandler.hxx
+10
-3
EventManager.cxx
avmedia/source/vlc/wrapper/EventManager.cxx
+20
-16
EventManager.hxx
avmedia/source/vlc/wrapper/EventManager.hxx
+11
-6
Instance.cxx
avmedia/source/vlc/wrapper/Instance.cxx
+14
-9
Instance.hxx
avmedia/source/vlc/wrapper/Instance.hxx
+7
-1
Media.cxx
avmedia/source/vlc/wrapper/Media.cxx
+21
-15
Media.hxx
avmedia/source/vlc/wrapper/Media.hxx
+7
-1
Player.cxx
avmedia/source/vlc/wrapper/Player.cxx
+35
-26
Player.hxx
avmedia/source/vlc/wrapper/Player.hxx
+7
-1
SymbolLoader.hxx
avmedia/source/vlc/wrapper/SymbolLoader.hxx
+10
-4
ThreadsafeQueue.hxx
avmedia/source/vlc/wrapper/ThreadsafeQueue.hxx
+7
-4
No files found.
avmedia/source/vlc/vlcframegrabber.cxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -35,7 +35,7 @@ namespace
};
}
VLCFrameGrabber
::
VLCFrameGrabber
(
VLC
::
EventHandler
&
eh
,
const
rtl
::
OUString
&
url
)
VLCFrameGrabber
::
VLCFrameGrabber
(
wrapper
::
EventHandler
&
eh
,
const
rtl
::
OUString
&
url
)
:
FrameGrabber_BASE
()
,
mInstance
(
sizeof
(
VLC_ARGS
)
/
sizeof
(
VLC_ARGS
[
0
]
),
VLC_ARGS
)
,
mMedia
(
url
,
mInstance
)
...
...
@@ -51,7 +51,7 @@ VLCFrameGrabber::VLCFrameGrabber( VLC::EventHandler& eh, const rtl::OUString& ur
const
rtl
::
OUString
&
fileName
=
utl
::
TempFile
::
CreateTempName
();
{
VLC
::
EventManager
manager
(
mPlayer
,
mEventHandler
);
wrapper
::
EventManager
manager
(
mPlayer
,
mEventHandler
);
manager
.
onPaused
(
boost
::
bind
(
&
osl
::
Condition
::
set
,
&
condition
));
if
(
!
mPlayer
.
play
()
)
...
...
avmedia/source/vlc/vlcframegrabber.hxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -26,11 +26,6 @@
#include "vlccommon.hxx"
#include "wrapper/Wrapper.hxx"
namespace
VLC
{
class
EventHandler
;
}
namespace
avmedia
{
namespace
vlc
{
...
...
@@ -39,18 +34,22 @@ typedef ::cppu::WeakImplHelper2< ::com::sun::star::media::XFrameGrabber,
class
VLCFrameGrabber
:
public
FrameGrabber_BASE
{
VLC
::
Instance
mInstance
;
VLC
::
Media
mMedia
;
VLC
::
Player
mPlayer
;
VLC
::
EventHandler
&
mEventHandler
;
wrapper
::
Instance
mInstance
;
wrapper
::
Media
mMedia
;
wrapper
::
Player
mPlayer
;
wrapper
::
EventHandler
&
mEventHandler
;
public
:
VLCFrameGrabber
(
VLC
::
EventHandler
&
eh
,
const
rtl
::
OUString
&
url
);
VLCFrameGrabber
(
wrapper
::
EventHandler
&
eh
,
const
rtl
::
OUString
&
url
);
::
com
::
sun
::
star
::
uno
::
Reference
<
css
::
graphic
::
XGraphic
>
SAL_CALL
grabFrame
(
double
fMediaTime
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
::
com
::
sun
::
star
::
uno
::
Reference
<
css
::
graphic
::
XGraphic
>
SAL_CALL
grabFrame
(
double
fMediaTime
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
::
rtl
::
OUString
SAL_CALL
getImplementationName
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
::
sal_Bool
SAL_CALL
supportsService
(
const
::
rtl
::
OUString
&
serviceName
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
::
rtl
::
OUString
SAL_CALL
getImplementationName
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
::
sal_Bool
SAL_CALL
supportsService
(
const
::
rtl
::
OUString
&
serviceName
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
};
}
...
...
avmedia/source/vlc/vlcmanager.cxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -37,7 +37,7 @@ Manager::Manager( const uno::Reference< lang::XMultiServiceFactory >& rxMgr )
:
mEventHandler
()
,
mxMgr
(
rxMgr
)
{
using
namespace
VLC
;
using
namespace
wrapper
;
static
bool
success
=
Instance
::
LoadSymbols
()
&&
EventManager
::
LoadSymbols
()
&&
Media
::
LoadSymbols
()
&&
Player
::
LoadSymbols
()
&&
Common
::
LoadSymbols
();
...
...
avmedia/source/vlc/vlcmanager.hxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -30,8 +30,8 @@ namespace vlc {
class
Manager
:
public
::
cppu
::
WeakImplHelper2
<
::
com
::
sun
::
star
::
media
::
XManager
,
::
com
::
sun
::
star
::
lang
::
XServiceInfo
>
{
boost
::
scoped_ptr
<
VLC
::
Instance
>
mInstance
;
VLC
::
EventHandler
mEventHandler
;
boost
::
scoped_ptr
<
wrapper
::
Instance
>
mInstance
;
wrapper
::
EventHandler
mEventHandler
;
public
:
Manager
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
rxMgr
);
~
Manager
();
...
...
avmedia/source/vlc/vlcplayer.cxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -22,8 +22,8 @@ namespace
}
VLCPlayer
::
VLCPlayer
(
const
rtl
::
OUString
&
url
,
VLC
::
Instance
&
instance
,
VLC
::
EventHandler
&
eh
)
wrapper
::
Instance
&
instance
,
wrapper
::
EventHandler
&
eh
)
:
VLC_Base
(
m_aMutex
)
,
mInstance
(
instance
)
,
mEventHandler
(
eh
)
...
...
avmedia/source/vlc/vlcplayer.hxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -42,19 +42,19 @@ typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::media::XPlayer,
class
VLCPlayer
:
public
::
cppu
::
BaseMutex
,
public
VLC_Base
{
VLC
::
Instance
&
mInstance
;
VLC
::
EventHandler
&
mEventHandler
;
wrapper
::
Instance
&
mInstance
;
wrapper
::
EventHandler
&
mEventHandler
;
VLC
::
Media
mMedia
;
VLC
::
Player
mPlayer
;
VLC
::
EventManager
mEventManager
;
wrapper
::
Media
mMedia
;
wrapper
::
Player
mPlayer
;
wrapper
::
EventManager
mEventManager
;
const
rtl
::
OUString
mUrl
;
bool
mPlaybackLoop
;
::
com
::
sun
::
star
::
uno
::
Reference
<
css
::
media
::
XFrameGrabber
>
mrFrameGrabber
;
public
:
VLCPlayer
(
const
rtl
::
OUString
&
url
,
VLC
::
Instance
&
instance
,
VLC
::
EventHandler
&
eh
);
wrapper
::
Instance
&
instance
,
wrapper
::
EventHandler
&
eh
);
void
SAL_CALL
start
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
void
SAL_CALL
stop
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
...
...
avmedia/source/vlc/vlcwindow.cxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -6,8 +6,11 @@ using namespace ::com::sun::star;
namespace
avmedia
{
namespace
vlc
{
const
::
rtl
::
OUString
AVMEDIA_VLC_WINDOW_IMPLEMENTATIONNAME
=
"com.sun.star.comp.avmedia.Window_VLC"
;
const
::
rtl
::
OUString
AVMEDIA_VLC_WINDOW_SERVICENAME
=
"com.sun.star.media.Window_VLC"
;
namespace
{
const
::
rtl
::
OUString
AVMEDIA_VLC_WINDOW_IMPLEMENTATIONNAME
=
"com.sun.star.comp.avmedia.Window_VLC"
;
const
::
rtl
::
OUString
AVMEDIA_VLC_WINDOW_SERVICENAME
=
"com.sun.star.media.Window_VLC"
;
}
VLCWindow
::
VLCWindow
()
{
...
...
avmedia/source/vlc/wrapper/Common.cxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -9,13 +9,17 @@
#include "Common.hxx"
#include "SymbolLoader.hxx"
namespace
VLC
{
namespace
{
const
char
*
(
*
libvlc_get_version
)
(
void
);
const
char
*
(
*
libvlc_get_version
)
(
void
);
}
namespace
avmedia
{
namespace
vlc
{
namespace
wrapper
{
bool
Common
::
LoadSymbols
()
{
ApiMap
VLC_COMMON_API
[]
=
...
...
@@ -30,4 +34,6 @@ const char* Common::Version()
{
return
libvlc_get_version
();
}
}
}
}
\ No newline at end of file
avmedia/source/vlc/wrapper/Common.hxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -10,7 +10,11 @@
#ifndef _WRAPPER_COMMON_HXX
#define _WRAPPER_COMMON_HXX
namespace
VLC
namespace
avmedia
{
namespace
vlc
{
namespace
wrapper
{
class
Common
{
...
...
@@ -19,6 +23,8 @@ namespace VLC
static
const
char
*
Version
();
};
}
}
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
avmedia/source/vlc/wrapper/EventHandler.cxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -9,7 +9,11 @@
#include "EventHandler.hxx"
namespace
VLC
namespace
avmedia
{
namespace
vlc
{
namespace
wrapper
{
EventHandler
::
EventHandler
()
:
::
osl
::
Thread
()
...
...
@@ -35,7 +39,8 @@ void EventHandler::run()
callback
();
}
while
(
true
);
}
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
avmedia/source/vlc/wrapper/EventHandler.hxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -10,12 +10,17 @@
#ifndef _WRAPPER_EVENT_HANDLER_HXX
#define _WRAPPER_EVENT_HANDLER_HXX
#include <boost/function.hpp>
#include <boost/noncopyable.hpp>
#include <salhelper/thread.hxx>
#include "ThreadsafeQueue.hxx"
namespace
VLC
namespace
avmedia
{
class
EventHandler
:
public
::
osl
::
Thread
namespace
vlc
{
namespace
wrapper
{
class
EventHandler
:
public
::
osl
::
Thread
,
boost
::
noncopyable
{
public
:
EventHandler
();
...
...
@@ -26,9 +31,11 @@ namespace VLC
public
:
typedef
boost
::
function
<
void
()
>
TCallback
;
avmedia
::
vlc
::
ThreadsafeQueue
<
TCallback
>
mCallbackQueue
;
ThreadsafeQueue
<
TCallback
>
mCallbackQueue
;
};
}
}
}
#endif // _WRAPPER_EVENT_HANDLER_HXX
...
...
avmedia/source/vlc/wrapper/EventManager.cxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -12,25 +12,28 @@
#include "EventHandler.hxx"
#include "Types.hxx"
namespace
VLC
namespace
{
namespace
{
libvlc_event_manager_t
*
(
*
libvlc_media_player_event_manager
)
(
libvlc_media_player_t
*
p_mi
);
int
(
*
libvlc_event_attach
)
(
libvlc_event_manager_t
*
p_event_manager
,
libvlc_event_type_t
i_event_type
,
libvlc_callback_t
f_callback
,
void
*
user_data
);
void
(
*
libvlc_event_detach
)
(
libvlc_event_manager_t
*
p_event_manager
,
libvlc_event_type_t
i_event_type
,
libvlc_callback_t
f_callback
,
void
*
p_user_data
);
}
libvlc_event_manager_t
*
(
*
libvlc_media_player_event_manager
)
(
libvlc_media_player_t
*
p_mi
);
int
(
*
libvlc_event_attach
)
(
libvlc_event_manager_t
*
p_event_manager
,
libvlc_event_type_t
i_event_type
,
libvlc_callback_t
f_callback
,
void
*
user_data
);
void
(
*
libvlc_event_detach
)
(
libvlc_event_manager_t
*
p_event_manager
,
libvlc_event_type_t
i_event_type
,
libvlc_callback_t
f_callback
,
void
*
p_user_data
);
}
namespace
avmedia
{
namespace
vlc
{
namespace
wrapper
{
void
EventManager
::
Handler
(
const
libvlc_event_t
*
event
,
void
*
pData
)
{
EventManager
*
instance
=
static_cast
<
EventManager
*>
(
pData
);
std
::
cout
<<
"HANDLER"
<<
std
::
endl
;
switch
(
event
->
type
)
{
case
libvlc_MediaPlayerPaused
:
...
...
@@ -54,7 +57,7 @@ bool EventManager::LoadSymbols()
return
InitApiMap
(
VLC_EVENT_MANAGER_API
);
}
EventManager
::
EventManager
(
VLC
::
Player
&
player
,
VLC
::
EventHandler
&
eh
)
EventManager
::
EventManager
(
Player
&
player
,
EventHandler
&
eh
)
:
mEventHandler
(
eh
)
,
mManager
(
libvlc_media_player_event_manager
(
player
)
)
{
...
...
@@ -80,7 +83,8 @@ void EventManager::onEndReached( const Callback& callback )
mOnEndReached
=
callback
;
registerSignal
(
libvlc_MediaPlayerEndReached
,
callback
);
}
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
avmedia/source/vlc/wrapper/EventManager.hxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -11,30 +11,33 @@
#define _WRAPPER_EVENT_MANAGER_HXX
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/noncopyable.hpp>
#include "Player.hxx"
struct
libvlc_event_manager_t
;
struct
libvlc_event_t
;
namespace
VLC
namespace
avmedia
{
namespace
vlc
{
namespace
wrapper
{
class
EventHandler
;
class
EventManager
class
EventManager
:
boost
::
noncopyable
{
public
:
static
bool
LoadSymbols
();
typedef
boost
::
function
<
void
()
>
Callback
;
EventManager
(
VLC
::
Player
&
player
,
VLC
::
EventHandler
&
eh
);
EventManager
(
Player
&
player
,
EventHandler
&
eh
);
void
onPaused
(
const
Callback
&
callback
=
Callback
()
);
void
onEndReached
(
const
Callback
&
callback
=
Callback
()
);
private
:
VLC
::
EventHandler
&
mEventHandler
;
EventHandler
&
mEventHandler
;
typedef
boost
::
function
<
void
()
>
TCallback
;
libvlc_event_manager_t
*
mManager
;
TCallback
mOnPaused
;
...
...
@@ -45,6 +48,8 @@ namespace VLC
static
void
Handler
(
const
libvlc_event_t
*
event
,
void
*
pData
);
};
}
}
}
#endif
...
...
avmedia/source/vlc/wrapper/Instance.cxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -10,15 +10,19 @@
#include "Instance.hxx"
#include "SymbolLoader.hxx"
namespace
VLC
namespace
{
namespace
{
libvlc_instance_t
*
(
*
libvlc_new
)
(
int
argc
,
const
char
*
const
*
argv
);
void
(
*
libvlc_release
)
(
libvlc_instance_t
*
p_instance
);
void
(
*
libvlc_retain
)
(
libvlc_instance_t
*
p_instance
);
}
libvlc_instance_t
*
(
*
libvlc_new
)
(
int
argc
,
const
char
*
const
*
argv
);
void
(
*
libvlc_release
)
(
libvlc_instance_t
*
p_instance
);
void
(
*
libvlc_retain
)
(
libvlc_instance_t
*
p_instance
);
}
namespace
avmedia
{
namespace
vlc
{
namespace
wrapper
{
bool
Instance
::
LoadSymbols
()
{
ApiMap
VLC_INSTANCE_API
[]
=
...
...
@@ -38,7 +42,7 @@ namespace VLC
Instance
::
Instance
(
const
Instance
&
other
)
{
operator
=
(
other
);
operator
=
(
other
);
}
const
Instance
&
Instance
::
operator
=
(
const
Instance
&
other
)
...
...
@@ -53,7 +57,8 @@ namespace VLC
{
libvlc_release
(
mInstance
);
}
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
avmedia/source/vlc/wrapper/Instance.hxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -12,7 +12,11 @@
struct
libvlc_instance_t
;
namespace
VLC
namespace
avmedia
{
namespace
vlc
{
namespace
wrapper
{
class
Instance
{
...
...
@@ -32,6 +36,8 @@ namespace VLC
libvlc_instance_t
*
mInstance
;
};
}
}
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
avmedia/source/vlc/wrapper/Media.cxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -14,23 +14,28 @@
#include "Types.hxx"
struct
libvlc_instance_t
;
namespace
VLC
namespace
avmedia
{
namespace
{
libvlc_media_t
*
(
*
libvlc_media_new_path
)
(
libvlc_instance_t
*
p_instance
,
const
char
*
path
);
void
(
*
libvlc_media_release
)
(
libvlc_media_t
*
p_md
);
void
(
*
libvlc_media_retain
)
(
libvlc_media_t
*
p_md
);
libvlc_time_t
(
*
libvlc_media_get_duration
)
(
libvlc_media_t
*
p_md
);
namespace
vlc
{
namespace
wrapper
{
namespace
{
libvlc_media_t
*
(
*
libvlc_media_new_path
)
(
libvlc_instance_t
*
p_instance
,
const
char
*
path
);
void
(
*
libvlc_media_release
)
(
libvlc_media_t
*
p_md
);
void
(
*
libvlc_media_retain
)
(
libvlc_media_t
*
p_md
);
libvlc_time_t
(
*
libvlc_media_get_duration
)
(
libvlc_media_t
*
p_md
);
libvlc_media_t
*
InitMedia
(
const
rtl
::
OUString
&
url
,
VLC
::
Instance
&
instance
)
{
rtl
::
OString
dest
;
url
.
convertToString
(
&
dest
,
RTL_TEXTENCODING_UTF8
,
0
);
libvlc_media_t
*
InitMedia
(
const
rtl
::
OUString
&
url
,
Instance
&
instance
)
{
rtl
::
OString
dest
;
url
.
convertToString
(
&
dest
,
RTL_TEXTENCODING_UTF8
,
0
);
return
libvlc_media_new_path
(
instance
,
dest
.
getStr
());
}
return
libvlc_media_new_path
(
instance
,
dest
.
getStr
());
}
}
bool
Media
::
LoadSymbols
()
{
...
...
@@ -52,7 +57,7 @@ Media::Media( const rtl::OUString& url, Instance& instance )
Media
::
Media
(
const
Media
&
other
)
{
operator
=
(
other
);
operator
=
(
other
);
}
const
Media
&
Media
::
operator
=
(
const
Media
&
other
)
...
...
@@ -77,7 +82,8 @@ Media::~Media()
{
libvlc_media_release
(
mMedia
);
}
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
avmedia/source/vlc/wrapper/Media.hxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -14,7 +14,11 @@ struct libvlc_media_t;
namespace
rtl
{
class
OUString
;
}
namespace
VLC
namespace
avmedia
{
namespace
vlc
{
namespace
wrapper
{
class
Instance
;
class
Media
...
...
@@ -38,6 +42,8 @@ namespace VLC
libvlc_media_t
*
mMedia
;
};
}
}
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
avmedia/source/vlc/wrapper/Player.cxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -14,40 +14,47 @@
#include "SymbolLoader.hxx"
struct
libvlc_media_t
;
namespace
VLC
namespace
{
namespace
{
void
(
*
libvlc_media_player_retain
)
(
libvlc_media_player_t
*
p_mi
);
libvlc_media_player_t
*
(
*
libvlc_media_player_new_from_media
)
(
libvlc_media_t
*
p_md
);
void
(
*
libvlc_media_player_relea
se
)
(
libvlc_media_player_t
*
p_mi
);
int
(
*
libvlc_media_player_play
)
(
libvlc_media_player_t
*
p_mi
);
void
(
*
libvlc_media_player_pause
)
(
libvlc_media_player_t
*
p_mi
);
int
(
*
libvlc_media_player_is_playing
)
(
libvlc_media_player_t
*
p_mi
);
void
(
*
libvlc_media_player_stop
)
(
libvlc_media_player_t
*
p_mi
);
void
(
*
libvlc_media_player_set_time
)
(
libvlc_media_player_t
*
p_mi
,
libvlc_time_t
i_time
);
libvlc_time_t
(
*
libvlc_media_player_get_time
)
(
libvlc_media_player_t
*
p_mi
);
float
(
*
libvlc_media_player_get_rate
)
(
libvlc_media_player_t
*
p_mi
);
int
(
*
libvlc_audio_set_volume
)
(
libvlc_media_player_t
*
p_mi
,
int
i_volume
);
int
(
*
libvlc_audio_get_volume
)
(
libvlc_media_player_t
*
p_mi
);
int
(
*
libvlc_audio_get_mute
)
(
libvlc_media_player_t
*
p_mi
);
void
(
*
libvlc_audio_set_mute
)
(
libvlc_media_player_t
*
p_mi
,
int
status
);
int
(
*
libvlc_video_take_snapshot
)
(
libvlc_media_player_t
*
p_mi
,
unsigned
num
,
const
char
*
psz_filepath
,
unsigned
int
i_width
,
unsigned
int
i_height
);
void
(
*
libvlc_media_player_retain
)
(
libvlc_media_player_t
*
p_mi
);
libvlc_media_player_t
*
(
*
libvlc_media_player_new_from_media
)
(
libvlc_media_t
*
p_md
);
void
(
*
libvlc_media_player_release
)
(
libvlc_media_player_t
*
p_mi
);
int
(
*
libvlc_media_player_play
)
(
libvlc_media_player_t
*
p_mi
);
void
(
*
libvlc_media_player_pau
se
)
(
libvlc_media_player_t
*
p_mi
);
int
(
*
libvlc_media_player_is_playing
)
(
libvlc_media_player_t
*
p_mi
);
void
(
*
libvlc_media_player_stop
)
(
libvlc_media_player_t
*
p_mi
);
void
(
*
libvlc_media_player_set_time
)
(
libvlc_media_player_t
*
p_mi
,
libvlc_time_t
i_time
);
libvlc_time_t
(
*
libvlc_media_player_get_time
)
(
libvlc_media_player_t
*
p_mi
);
float
(
*
libvlc_media_player_get_rate
)(
libvlc_media_player_t
*
p_mi
);
int
(
*
libvlc_audio_set_volume
)
(
libvlc_media_player_t
*
p_mi
,
int
i_volume
);
int
(
*
libvlc_audio_get_volume
)
(
libvlc_media_player_t
*
p_mi
);
int
(
*
libvlc_audio_get_mute
)
(
libvlc_media_player_t
*
p_mi
);
void
(
*
libvlc_audio_set_mute
)
(
libvlc_media_player_t
*
p_mi
,
int
status
);
int
(
*
libvlc_video_take_snapshot
)
(
libvlc_media_player_t
*
p_mi
,
unsigned
num
,
const
char
*
psz_filepath
,
unsigned
int
i_width
,
unsigned
int
i_height
);
#if defined UNX
void
(
*
libvlc_media_player_set_xwindow
)
(
libvlc_media_player_t
*
p_mi
,
uint32_t
drawable
);
void
(
*
libvlc_media_player_set_xwindow
)
(
libvlc_media_player_t
*
p_mi
,
uint32_t
drawable
);
#elif defined MACOSX
void
(
*
libvlc_media_player_set_nsobject
)
(
libvlc_media_player_t
*
p_mi
,
void
*
drawable
);
void
(
*
libvlc_media_player_set_nsobject
)
(
libvlc_media_player_t
*
p_mi
,
void
*
drawable
);
#elif defined WNT
void
(
*
libvlc_media_player_set_hwnd
)
(
libvlc_media_player_t
*
p_mi
,
void
*
drawable
);
void
(
*
libvlc_media_player_set_hwnd
)
(
libvlc_media_player_t
*
p_mi
,
void
*
drawable
);
#else
#error unknown OS
#endif
unsigned
(
*
libvlc_media_player_has_vout
)
(
libvlc_media_player_t
*
p_mi
);
void
(
*
libvlc_video_set_mouse_input
)
(
libvlc_media_player_t
*
p_mi
,
unsigned
on
);
}
unsigned
(
*
libvlc_media_player_has_vout
)
(
libvlc_media_player_t
*
p_mi
);
void
(
*
libvlc_video_set_mouse_input
)
(
libvlc_media_player_t
*
p_mi
,
unsigned
on
);
}
namespace
avmedia
{
namespace
vlc
{
namespace
wrapper
{
bool
Player
::
LoadSymbols
()
{
ApiMap
VLC_PLAYER_API
[]
=
...
...
@@ -190,5 +197,7 @@ namespace VLC
return
libvlc_media_player_has_vout
(
mPlayer
);
}
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
avmedia/source/vlc/wrapper/Player.hxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -20,7 +20,11 @@ namespace rtl
class
OUString
;
}
namespace
VLC
namespace
avmedia
{
namespace
vlc
{
namespace
wrapper
{
class
Media
;
class
Player
...
...
@@ -63,6 +67,8 @@ namespace VLC
libvlc_media_player_t
*
mPlayer
;
};
}
}
}
#endif
...
...
avmedia/source/vlc/wrapper/SymbolLoader.hxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -19,6 +19,12 @@
#define SYM_MAP(a) { #a, (SymbolFunc *)&a }
namespace
avmedia
{
namespace
vlc
{
namespace
wrapper
{
typedef
void
(
*
SymbolFunc
)
(
void
);
struct
ApiMap
...
...
@@ -70,7 +76,7 @@ namespace
(
aModule
,
OUString
::
createFromAscii
(
pMap
[
i
].
symName
).
pData
);
if
(
!
aMethod
)
{
std
::
cerr
<<
"Cannot load method "
<<
pMap
[
i
].
symName
<<
std
::
endl
;
SAL_WARN
(
"avmedia"
,
"Cannot load method "
<<
pMap
[
i
].
symName
)
;
*
pMap
[
i
].
refValue
=
NULL
;
return
false
;
}
...
...
@@ -82,8 +88,6 @@ namespace
}
}
namespace
VLC
{
template
<
size_t
N
>
bool
InitApiMap
(
const
ApiMap
(
&
pMap
)[
N
]
)
{
...
...
@@ -98,7 +102,7 @@ namespace VLC
if
(
aModule
==
NULL
)
{
std
::
cerr
<<
"Cannot load libvlc"
<<
std
::
endl
;
SAL_WARN
(
"avmedia"
,
"Cannot load libvlc"
)
;
return
false
;
}
...
...
@@ -112,6 +116,8 @@ namespace VLC
return
false
;
}
}
}
}
#endif
...
...
avmedia/source/vlc/wrapper/ThreadsafeQueue.hxx
Dosyayı görüntüle @
6a9d3e7f
...
...
@@ -24,9 +24,12 @@
#include <osl/conditn.hxx>
#include <boost/noncopyable.hpp>
namespace
avmedia
{
namespace
vlc
{
namespace
avmedia
{
namespace
vlc
{
namespace
wrapper
{
template
<
class
T
>
class
ThreadsafeQueue
:
boost
::
noncopyable
{
...
...
@@ -70,7 +73,7 @@ void ThreadsafeQueue<T>::pop( T& data )
data
=
mQueue
.
front
();
mQueue
.
pop
();
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment