summaryrefslogtreecommitdiff
path: root/avmedia
diff options
context:
space:
mode:
authorMinh Ngo <nlminhtl@gmail.com>2013-10-07 10:23:04 +0300
committerMinh Ngo <nlminhtl@gmail.com>2013-10-07 10:26:44 +0300
commitbc43c1ca942c4c111aa7f45b268e13ab03c7f613 (patch)
tree4154ba1db47983607787e8cff877cc35d28fbe2f /avmedia
parent8de1f54e19b68194b79a642750b9d3a4c8707d7b (diff)
Avmedia/VLC: Fixing some errors when creating libvlc_instance_t.
condition wait is temporary only for non-windows system. Looks like there is some hang. Must be investigate later... Change-Id: Ia20227503f70244d33411164d4af95ba69e86509
Diffstat (limited to 'avmedia')
-rw-r--r--avmedia/source/vlc/vlcframegrabber.cxx13
-rw-r--r--avmedia/source/vlc/vlcmanager.cxx10
-rw-r--r--avmedia/source/vlc/vlcplayer.cxx6
3 files changed, 25 insertions, 4 deletions
diff --git a/avmedia/source/vlc/vlcframegrabber.cxx b/avmedia/source/vlc/vlcframegrabber.cxx
index f5b709163f76..7a742e976e1e 100644
--- a/avmedia/source/vlc/vlcframegrabber.cxx
+++ b/avmedia/source/vlc/vlcframegrabber.cxx
@@ -28,10 +28,15 @@ namespace
const char * const VLC_ARGS[] = {
"-Vdummy",
+ // "--ignore-config"
+ "--demux",
+ "ffmpeg",
"--snapshot-format=png",
- "--ffmpeg-threads",
+ "--ffmpeg-threads", /* Is deprecated in 2.1.0 */
"--verbose=2",
- "--no-audio"
+ "--no-audio"//,
+ //"--file-logging",
+ //"--logfile=C:/home/dev/log/vlc_log"
};
}
@@ -64,7 +69,11 @@ VLCFrameGrabber::VLCFrameGrabber( wrapper::EventHandler& eh, const rtl::OUString
mPlayer.pause();
const TimeValue timeout = {2, 0};
+
+ //TODO: Fix this hang on Windows
+#ifndef WNT
condition.wait(&timeout);
+#endif
if ( !mPlayer.hasVout() )
{
diff --git a/avmedia/source/vlc/vlcmanager.cxx b/avmedia/source/vlc/vlcmanager.cxx
index 8453bb4764e5..370505d225b1 100644
--- a/avmedia/source/vlc/vlcmanager.cxx
+++ b/avmedia/source/vlc/vlcmanager.cxx
@@ -30,7 +30,13 @@ namespace
const char * const VLC_ARGS[] = {
"-Vdummy",
- "--verbose=2"
+#ifdef WNT
+ "--demux",
+ "ffmpeg",
+#endif
+ "--verbose=2"//,
+ //"--file-logging",
+ //"--logfile=C:/home/dev/log/vlc_log"
};
}
@@ -69,7 +75,9 @@ Manager::Manager( const uno::Reference< lang::XMultiServiceFactory >& rxMgr )
SAL_WARN("avmedia", "Cannot load symbols");
if (m_is_vlc_found)
+ {
mEventHandler.create();
+ }
}
Manager::~Manager()
diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index a1fef95d8613..8d546725d153 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -50,7 +50,10 @@ unsigned VLCPlayer::getHeight() const
void SAL_CALL VLCPlayer::start() throw ( ::com::sun::star::uno::RuntimeException )
{
::osl::MutexGuard aGuard(m_aMutex);
- mPlayer.play();
+ if (!mPlayer.play())
+ {
+ // TODO: Error
+ }
}
void SAL_CALL VLCPlayer::stop() throw ( ::com::sun::star::uno::RuntimeException )
@@ -226,6 +229,7 @@ uno::Reference< css::media::XFrameGrabber > SAL_CALL VLCPlayer::createFrameGrabb
throw ( ::com::sun::star::uno::RuntimeException )
{
::osl::MutexGuard aGuard(m_aMutex);
+
if ( !mrFrameGrabber.is() )
{
VLCFrameGrabber *frameGrabber = new VLCFrameGrabber( mEventHandler, mUrl );