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
ba9357b8
Kaydet (Commit)
ba9357b8
authored
May 16, 2014
tarafından
Zolnai Tamás
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
OGLPlayer: set a timer which call redrawing to show animation
Change-Id: I7c98ba61be0510e9f86cb80fda73d18f7f7957cf
üst
0ab5802e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
oglplayer.cxx
avmedia/source/opengl/oglplayer.cxx
+19
-2
oglplayer.hxx
avmedia/source/opengl/oglplayer.hxx
+7
-0
No files found.
avmedia/source/opengl/oglplayer.cxx
Dosyayı görüntüle @
ba9357b8
...
@@ -103,6 +103,10 @@ bool OGLPlayer::create( const OUString& rURL )
...
@@ -103,6 +103,10 @@ bool OGLPlayer::create( const OUString& rURL )
}
}
}
}
}
}
// Set timer
m_aTimer
.
SetTimeout
(
10
);
m_aTimer
.
SetTimeoutHdl
(
LINK
(
this
,
OGLPlayer
,
TimerHandler
));
return
true
;
return
true
;
}
}
...
@@ -110,12 +114,14 @@ void SAL_CALL OGLPlayer::start() throw ( uno::RuntimeException, std::exception )
...
@@ -110,12 +114,14 @@ void SAL_CALL OGLPlayer::start() throw ( uno::RuntimeException, std::exception )
{
{
osl
::
MutexGuard
aGuard
(
m_aMutex
);
osl
::
MutexGuard
aGuard
(
m_aMutex
);
gltf_animation_start
(
m_pHandle
);
gltf_animation_start
(
m_pHandle
);
m_aTimer
.
Start
();
}
}
void
SAL_CALL
OGLPlayer
::
stop
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OGLPlayer
::
stop
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
osl
::
MutexGuard
aGuard
(
m_aMutex
);
osl
::
MutexGuard
aGuard
(
m_aMutex
);
gltf_animation_stop
(
m_pHandle
);
gltf_animation_stop
(
m_pHandle
);
m_aTimer
.
Stop
();
}
}
sal_Bool
SAL_CALL
OGLPlayer
::
isPlaying
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
sal_Bool
SAL_CALL
OGLPlayer
::
isPlaying
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
...
@@ -212,8 +218,8 @@ uno::Reference< media::XPlayerWindow > SAL_CALL OGLPlayer::createPlayerWindow( c
...
@@ -212,8 +218,8 @@ uno::Reference< media::XPlayerWindow > SAL_CALL OGLPlayer::createPlayerWindow( c
m_pHandle
->
viewport
.
width
=
aSize
.
Width
();
m_pHandle
->
viewport
.
width
=
aSize
.
Width
();
m_pHandle
->
viewport
.
height
=
aSize
.
Height
();
m_pHandle
->
viewport
.
height
=
aSize
.
Height
();
gltf_renderer_set_content
(
m_pHandle
);
gltf_renderer_set_content
(
m_pHandle
);
OGLWindow
*
p
Window
=
new
OGLWindow
(
m_pHandle
,
&
m_aContext
,
pChildWindow
);
m_pOGL
Window
=
new
OGLWindow
(
m_pHandle
,
&
m_aContext
,
pChildWindow
);
return
uno
::
Reference
<
media
::
XPlayerWindow
>
(
p
Window
);
return
uno
::
Reference
<
media
::
XPlayerWindow
>
(
m_pOGL
Window
);
}
}
uno
::
Reference
<
media
::
XFrameGrabber
>
SAL_CALL
OGLPlayer
::
createFrameGrabber
()
uno
::
Reference
<
media
::
XFrameGrabber
>
SAL_CALL
OGLPlayer
::
createFrameGrabber
()
...
@@ -256,6 +262,17 @@ uno::Sequence< OUString > SAL_CALL OGLPlayer::getSupportedServiceNames()
...
@@ -256,6 +262,17 @@ uno::Sequence< OUString > SAL_CALL OGLPlayer::getSupportedServiceNames()
return
aRet
;
return
aRet
;
}
}
IMPL_LINK
(
OGLPlayer
,
TimerHandler
,
Timer
*
,
pTimer
)
{
if
(
pTimer
==
&
m_aTimer
)
{
m_pOGLWindow
->
update
();
m_aTimer
.
Start
();
}
return
0
;
}
}
// namespace ogl
}
// namespace ogl
}
// namespace avmedia
}
// namespace avmedia
...
...
avmedia/source/opengl/oglplayer.hxx
Dosyayı görüntüle @
ba9357b8
...
@@ -16,9 +16,12 @@
...
@@ -16,9 +16,12 @@
#include <com/sun/star/media/XPlayer.hpp>
#include <com/sun/star/media/XPlayer.hpp>
#include <libgltf.h>
#include <libgltf.h>
#include <vcl/opengl/OpenGLContext.hxx>
#include <vcl/opengl/OpenGLContext.hxx>
#include <vcl/timer.hxx>
namespace
avmedia
{
namespace
ogl
{
namespace
avmedia
{
namespace
ogl
{
class
OGLWindow
;
typedef
::
cppu
::
WeakComponentImplHelper2
<
com
::
sun
::
star
::
media
::
XPlayer
,
typedef
::
cppu
::
WeakComponentImplHelper2
<
com
::
sun
::
star
::
media
::
XPlayer
,
com
::
sun
::
star
::
lang
::
XServiceInfo
>
Player_BASE
;
com
::
sun
::
star
::
lang
::
XServiceInfo
>
Player_BASE
;
...
@@ -55,9 +58,13 @@ public:
...
@@ -55,9 +58,13 @@ public:
virtual
com
::
sun
::
star
::
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
com
::
sun
::
star
::
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
private
:
private
:
DECL_LINK
(
TimerHandler
,
Timer
*
);
OUString
m_sURL
;
OUString
m_sURL
;
glTFHandle
*
m_pHandle
;
glTFHandle
*
m_pHandle
;
OpenGLContext
m_aContext
;
OpenGLContext
m_aContext
;
Timer
m_aTimer
;
OGLWindow
*
m_pOGLWindow
;
};
};
}
// namespace ogl
}
// namespace ogl
...
...
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