Commit 052632e4 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

MetadataService: Don't require a boolean return value

...since it's unused.
parent dad28e09
......@@ -41,7 +41,7 @@ class IMetadataService
virtual ~IMetadataService() = default;
virtual bool initialize( IMetadataServiceCb* callback, MediaLibrary* ml ) = 0;
virtual unsigned int priority() const = 0;
virtual bool run( std::shared_ptr<Media> file, void* data ) = 0;
virtual void run( std::shared_ptr<Media> file, void* data ) = 0;
};
#endif // IMETADATASERVICE_H
......@@ -50,7 +50,7 @@ unsigned int VLCMetadataService::priority() const
return 100;
}
bool VLCMetadataService::run( std::shared_ptr<Media> file, void* data )
void VLCMetadataService::run( std::shared_ptr<Media> file, void* data )
{
LOG_INFO( "Parsing ", file->mrl() );
......
......@@ -48,7 +48,7 @@ class VLCMetadataService : public IMetadataService
virtual bool initialize( IMetadataServiceCb *callback, MediaLibrary* ml ) override;
virtual unsigned int priority() const override;
virtual bool run( std::shared_ptr<Media> file, void *data ) override;
virtual void run( std::shared_ptr<Media> file, void *data ) override;
private:
ServiceStatus handleMediaMeta(std::shared_ptr<Media> file , VLC::Media &media) const;
......
......@@ -50,7 +50,7 @@ unsigned int VLCThumbnailer::priority() const
return 50;
}
bool VLCThumbnailer::run(std::shared_ptr<Media> file, void *data )
void VLCThumbnailer::run(std::shared_ptr<Media> file, void *data )
{
if ( file->type() == IMedia::Type::UnknownType )
{
......@@ -58,13 +58,13 @@ bool VLCThumbnailer::run(std::shared_ptr<Media> file, void *data )
// since this should run after file type deduction, and not run in case
// that step fails.
m_cb->done( file, StatusError, data );
return false;
return;
}
else if ( file->type() != IMedia::Type::VideoType )
{
// There's no point in generating a thumbnail for a non-video file.
m_cb->done( file, StatusSuccess, data );
return true;
return;
}
VLC::Media media( m_instance, file->mrl(), VLC::Media::FromPath );
......@@ -74,15 +74,13 @@ bool VLCThumbnailer::run(std::shared_ptr<Media> file, void *data )
setupVout( mp );
if ( startPlayback( file, mp, data ) == false )
return false;
return;
// Seek ahead to have a significant preview
if ( seekAhead( file, mp, data ) == false )
return false;
return;
if ( takeSnapshot( file, mp, data ) == false )
return false;
return true;
takeSnapshot( file, mp, data );
}
bool VLCThumbnailer::startPlayback(std::shared_ptr<Media> file, VLC::MediaPlayer &mp, void* data )
......
......@@ -34,7 +34,7 @@ public:
VLCThumbnailer( const VLC::Instance& vlc );
virtual bool initialize(IMetadataServiceCb *callback, MediaLibrary *ml) override;
virtual unsigned int priority() const override;
virtual bool run(std::shared_ptr<Media> file, void *data) override;
virtual void run(std::shared_ptr<Media> file, void *data) override;
private:
bool startPlayback( std::shared_ptr<Media> file, VLC::MediaPlayer& mp, void *data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment