[vlmc-devel] commit: Metadata: Force a default length to images. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Sun Oct 31 20:07:47 CET 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Oct 31 20:06:56 2010 +0100| [a9066275e7285d91c99cfb9e0c13db77f21163ae] | committer: Hugo Beauzée-Luyssen
Metadata: Force a default length to images.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=a9066275e7285d91c99cfb9e0c13db77f21163ae
---
src/LibVLCpp/VLCMediaPlayer.h | 3 +++
src/Metadata/MetaDataWorker.cpp | 5 ++++-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/LibVLCpp/VLCMediaPlayer.h b/src/LibVLCpp/VLCMediaPlayer.h
index 5c95953..07c7b26 100644
--- a/src/LibVLCpp/VLCMediaPlayer.h
+++ b/src/LibVLCpp/VLCMediaPlayer.h
@@ -53,6 +53,9 @@ namespace LibVLCpp
void setTime( qint64 time );
float getPosition();
void setPosition( float pos );
+ /**
+ \return The length, in milliseconds.
+ */
qint64 getLength();
void takeSnapshot( const char* outputFile, unsigned int width, unsigned int heigth );
bool isPlaying();
diff --git a/src/Metadata/MetaDataWorker.cpp b/src/Metadata/MetaDataWorker.cpp
index 7236d51..e3415a3 100644
--- a/src/Metadata/MetaDataWorker.cpp
+++ b/src/Metadata/MetaDataWorker.cpp
@@ -139,7 +139,10 @@ MetaDataWorker::metaDataAvailable()
double fps = VLMC_PROJECT_GET_DOUBLE( "video/VLMCOutputFPS" );
m_media->setFps( fps );
}
- m_media->setLength( m_mediaPlayer->getLength() );
+ if ( m_media->fileType() == Media::Image )
+ m_media->setLength( 10000 );
+ else
+ m_media->setLength( m_mediaPlayer->getLength() );
m_media->setNbAudioTrack( m_mediaPlayer->getNbAudioTrack() );
m_media->setNbVideoTrack( m_mediaPlayer->getNbVideoTrack() );
More information about the Vlmc-devel
mailing list