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
793eaa8b
Kaydet (Commit)
793eaa8b
authored
Eyl 14, 2013
tarafından
Minh Ngo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Mute sound when grabbing a frame.
Change-Id: I8190d6c9a93183d48076c95a7cd0b978a2954afb
üst
5480482b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
21 deletions
+27
-21
vlcframegrabber.cxx
avmedia/source/vlc/vlcframegrabber.cxx
+14
-13
vlcframegrabber.hxx
avmedia/source/vlc/vlcframegrabber.hxx
+5
-4
vlcmanager.cxx
avmedia/source/vlc/vlcmanager.cxx
+0
-2
vlcplayer.cxx
avmedia/source/vlc/vlcplayer.cxx
+7
-2
vlcplayer.hxx
avmedia/source/vlc/vlcplayer.hxx
+1
-0
No files found.
avmedia/source/vlc/vlcframegrabber.cxx
Dosyayı görüntüle @
793eaa8b
...
...
@@ -25,15 +25,23 @@ namespace
const
::
rtl
::
OUString
AVMEDIA_VLC_GRABBER_IMPLEMENTATIONNAME
=
"com.sun.star.comp.avmedia.VLCFrameGrabber_VLC"
;
const
::
rtl
::
OUString
AVMEDIA_VLC_GRABBER_SERVICENAME
=
"com.sun.star.media.VLCFrameGrabber_VLC"
;
const
int
MSEC_IN_SEC
=
1000
;
const
char
*
const
VLC_ARGS
[]
=
{
"-Vdummy"
,
"--snapshot-format=png"
,
"--ffmpeg-threads"
,
"--verbose=-1"
,
"--no-audio"
};
}
VLCFrameGrabber
::
VLCFrameGrabber
(
VLC
::
Player
&
player
,
VLC
::
EventHandler
&
eh
,
const
rtl
::
OUString
&
url
)
VLCFrameGrabber
::
VLCFrameGrabber
(
VLC
::
EventHandler
&
eh
,
const
rtl
::
OUString
&
url
)
:
FrameGrabber_BASE
()
,
mPlayer
(
player
)
,
mUrl
(
url
)
,
mInstance
(
sizeof
(
VLC_ARGS
)
/
sizeof
(
VLC_ARGS
[
0
]
),
VLC_ARGS
)
,
mMedia
(
url
,
mInstance
)
,
mPlayer
(
mMedia
)
,
mEventHandler
(
eh
)
{
std
::
cout
<<
"URL: "
<<
url
<<
std
::
endl
;
}
::
uno
::
Reference
<
css
::
graphic
::
XGraphic
>
SAL_CALL
VLCFrameGrabber
::
grabFrame
(
double
fMediaTime
)
...
...
@@ -46,8 +54,6 @@ VLCFrameGrabber::VLCFrameGrabber( VLC::Player& player, VLC::EventHandler& eh, co
VLC
::
EventManager
manager
(
mPlayer
,
mEventHandler
);
manager
.
onPaused
(
boost
::
bind
(
&
osl
::
Condition
::
set
,
&
condition
));
mPlayer
.
setMute
(
true
);
if
(
!
mPlayer
.
play
()
)
{
std
::
cerr
<<
"Couldn't play when trying to grab frame"
<<
std
::
endl
;
...
...
@@ -60,19 +66,14 @@ VLCFrameGrabber::VLCFrameGrabber( VLC::Player& player, VLC::EventHandler& eh, co
const
TimeValue
timeout
=
{
2
,
0
};
condition
.
wait
(
&
timeout
);
if
(
mUrl
.
isEmpty
()
||
!
mPlayer
.
hasVout
()
)
if
(
!
mPlayer
.
hasVout
()
)
{
std
::
cerr
<<
"Couldn't grab frame"
<<
std
::
endl
;
mPlayer
.
setMute
(
false
);
manager
.
onPaused
();
return
::
uno
::
Reference
<
css
::
graphic
::
XGraphic
>
();
}
std
::
cout
<<
"Take snapshot "
<<
fileName
<<
std
::
endl
;
std
::
cout
<<
mPlayer
.
takeSnapshot
(
fileName
)
<<
std
::
endl
;
mPlayer
.
setMute
(
false
);
mPlayer
.
takeSnapshot
(
fileName
);
mPlayer
.
stop
();
manager
.
onPaused
();
...
...
avmedia/source/vlc/vlcframegrabber.hxx
Dosyayı görüntüle @
793eaa8b
...
...
@@ -24,10 +24,10 @@
#include <com/sun/star/media/XFrameGrabber.hpp>
#include <cppuhelper/implbase2.hxx>
#include "vlccommon.hxx"
#include "wrapper/Wrapper.hxx"
namespace
VLC
{
class
Player
;
class
EventHandler
;
}
...
...
@@ -39,11 +39,12 @@ typedef ::cppu::WeakImplHelper2< ::com::sun::star::media::XFrameGrabber,
class
VLCFrameGrabber
:
public
FrameGrabber_BASE
{
VLC
::
Player
&
mPlayer
;
const
rtl
::
OUString
&
mUrl
;
VLC
::
Instance
mInstance
;
VLC
::
Media
mMedia
;
VLC
::
Player
mPlayer
;
VLC
::
EventHandler
&
mEventHandler
;
public
:
VLCFrameGrabber
(
VLC
::
Player
&
player
,
VLC
::
EventHandler
&
eh
,
const
rtl
::
OUString
&
url
);
VLCFrameGrabber
(
VLC
::
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
);
...
...
avmedia/source/vlc/vlcmanager.cxx
Dosyayı görüntüle @
793eaa8b
...
...
@@ -29,8 +29,6 @@ namespace
const
char
*
const
VLC_ARGS
[]
=
{
"-Vdummy"
,
"--snapshot-format=png"
,
"--ffmpeg-threads"
,
"--verbose=-1"
};
}
...
...
avmedia/source/vlc/vlcplayer.cxx
Dosyayı görüntüle @
793eaa8b
...
...
@@ -189,8 +189,13 @@ uno::Reference< css::media::XFrameGrabber > SAL_CALL VLCPlayer::createFrameGrabb
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
VLCFrameGrabber
*
frameGrabber
=
new
VLCFrameGrabber
(
mPlayer
,
mEventHandler
,
mUrl
);
return
uno
::
Reference
<
css
::
media
::
XFrameGrabber
>
(
frameGrabber
);
if
(
!
mrFrameGrabber
.
is
()
)
{
VLCFrameGrabber
*
frameGrabber
=
new
VLCFrameGrabber
(
mEventHandler
,
mUrl
);
mrFrameGrabber
=
uno
::
Reference
<
css
::
media
::
XFrameGrabber
>
(
frameGrabber
);
}
return
mrFrameGrabber
;
}
::
rtl
::
OUString
SAL_CALL
VLCPlayer
::
getImplementationName
()
...
...
avmedia/source/vlc/vlcplayer.hxx
Dosyayı görüntüle @
793eaa8b
...
...
@@ -50,6 +50,7 @@ class VLCPlayer : public ::cppu::BaseMutex,
VLC
::
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
,
...
...
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