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
057b2b6b
Kaydet (Commit)
057b2b6b
authored
Tem 10, 2013
tarafından
Minh Ngo
Kaydeden (comit)
Michael Meeks
Tem 26, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixing get/set time methods (correctly converts ms into sec).
Change-Id: I64c7ddb5336a7ea255500c21ee1550eb32cbf27b
üst
5b67ee9c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
vlcframegrabber.cxx
avmedia/source/vlc/vlcframegrabber.cxx
+1
-0
vlcframegrabber.hxx
avmedia/source/vlc/vlcframegrabber.hxx
+2
-1
vlcplayer.cxx
avmedia/source/vlc/vlcplayer.cxx
+5
-3
No files found.
avmedia/source/vlc/vlcframegrabber.cxx
Dosyayı görüntüle @
057b2b6b
...
@@ -10,6 +10,7 @@ const ::rtl::OUString AVMEDIA_VLC_GRABBER_IMPLEMENTATIONNAME = "com.sun.star.com
...
@@ -10,6 +10,7 @@ const ::rtl::OUString AVMEDIA_VLC_GRABBER_IMPLEMENTATIONNAME = "com.sun.star.com
const
::
rtl
::
OUString
AVMEDIA_VLC_GRABBER_SERVICENAME
=
"com.sun.star.media.VLCFrameGrabber_VLC"
;
const
::
rtl
::
OUString
AVMEDIA_VLC_GRABBER_SERVICENAME
=
"com.sun.star.media.VLCFrameGrabber_VLC"
;
SAL_CALL
VLCFrameGrabber
::
VLCFrameGrabber
()
SAL_CALL
VLCFrameGrabber
::
VLCFrameGrabber
()
:
FrameGrabber_BASE
()
{
{
}
}
...
...
avmedia/source/vlc/vlcframegrabber.hxx
Dosyayı görüntüle @
057b2b6b
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#define _VLCFRAMEGRABBER_HXX
#define _VLCFRAMEGRABBER_HXX
#include "vlccommon.hxx"
#include "vlccommon.hxx"
#include <boost/noncopyable.hpp>
#include <com/sun/star/media/XFrameGrabber.hpp>
#include <com/sun/star/media/XFrameGrabber.hpp>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase2.hxx>
...
@@ -30,7 +31,7 @@ namespace vlc {
...
@@ -30,7 +31,7 @@ namespace vlc {
typedef
::
cppu
::
WeakImplHelper2
<
::
com
::
sun
::
star
::
media
::
XFrameGrabber
,
typedef
::
cppu
::
WeakImplHelper2
<
::
com
::
sun
::
star
::
media
::
XFrameGrabber
,
::
com
::
sun
::
star
::
lang
::
XServiceInfo
>
FrameGrabber_BASE
;
::
com
::
sun
::
star
::
lang
::
XServiceInfo
>
FrameGrabber_BASE
;
class
VLCFrameGrabber
:
public
FrameGrabber_BASE
class
VLCFrameGrabber
:
public
FrameGrabber_BASE
,
boost
::
noncopyable
{
{
public
:
public
:
SAL_CALL
VLCFrameGrabber
();
SAL_CALL
VLCFrameGrabber
();
...
...
avmedia/source/vlc/vlcplayer.cxx
Dosyayı görüntüle @
057b2b6b
...
@@ -18,6 +18,8 @@ const char * const VLC_ARGS[] = {
...
@@ -18,6 +18,8 @@ const char * const VLC_ARGS[] = {
"--quiet"
"--quiet"
};
};
const
int
MS_IN_SEC
=
1000
;
// Millisec in sec
namespace
namespace
{
{
libvlc_media_t
*
initMedia
(
const
rtl
::
OUString
&
url
,
boost
::
shared_ptr
<
libvlc_instance_t
>&
instance
)
libvlc_media_t
*
initMedia
(
const
rtl
::
OUString
&
url
,
boost
::
shared_ptr
<
libvlc_instance_t
>&
instance
)
...
@@ -58,19 +60,19 @@ void SAL_CALL VLCPlayer::stop()
...
@@ -58,19 +60,19 @@ void SAL_CALL VLCPlayer::stop()
double
SAL_CALL
VLCPlayer
::
getDuration
()
double
SAL_CALL
VLCPlayer
::
getDuration
()
{
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
return
libvlc_media_get_duration
(
mMedia
.
get
()
)
;
return
static_cast
<
double
>
(
libvlc_media_get_duration
(
mMedia
.
get
()
)
)
/
MS_IN_SEC
;
}
}
void
SAL_CALL
VLCPlayer
::
setMediaTime
(
double
fTime
)
void
SAL_CALL
VLCPlayer
::
setMediaTime
(
double
fTime
)
{
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
libvlc_media_player_set_time
(
mPlayer
.
get
(),
fTime
);
libvlc_media_player_set_time
(
mPlayer
.
get
(),
fTime
*
MS_IN_SEC
);
}
}
double
SAL_CALL
VLCPlayer
::
getMediaTime
()
double
SAL_CALL
VLCPlayer
::
getMediaTime
()
{
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
return
libvlc_media_player_get_time
(
mPlayer
.
get
()
)
;
return
static_cast
<
double
>
(
libvlc_media_player_get_time
(
mPlayer
.
get
()
)
)
/
MS_IN_SEC
;
}
}
double
SAL_CALL
VLCPlayer
::
getRate
()
double
SAL_CALL
VLCPlayer
::
getRate
()
...
...
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