diff options
| author | LarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b> | 2005-10-06 12:44:24 +0000 |
|---|---|---|
| committer | LarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b> | 2005-10-06 12:44:24 +0000 |
| commit | 4b0f7c5b42c95714e62a31bf7aff44d42e9ddc16 (patch) | |
| tree | 149d871591345fd3e45d059843c7158791f41b2c | |
| parent | b32b5e5c224447e86b674e1fb068f672902b3e87 (diff) | |
| download | vdr-plugin-muggle-4b0f7c5b42c95714e62a31bf7aff44d42e9ddc16.tar.gz vdr-plugin-muggle-4b0f7c5b42c95714e62a31bf7aff44d42e9ddc16.tar.bz2 | |
Removed unnecessary function for default image
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@844 e10066b5-e1e2-0310-b819-94efdf66514b
| -rw-r--r-- | mg_image_provider.c | 21 | ||||
| -rw-r--r-- | mg_image_provider.h | 4 |
2 files changed, 12 insertions, 13 deletions
diff --git a/mg_image_provider.c b/mg_image_provider.c index 462e17d..2f48c22 100644 --- a/mg_image_provider.c +++ b/mg_image_provider.c @@ -112,6 +112,8 @@ void mgImageProvider::updateItem( mgItemGd *item ) if( m_mode == IM_ITEM_DIR ) { + // do not try to acquire new images when we are playing back a separate directory + m_image_list.clear(); // clear temporary image directory @@ -125,7 +127,11 @@ void mgImageProvider::updateItem( mgItemGd *item ) // finally put all image filenames here fillImageList( dir ); + + // think of something, when there are no images here, either: + // simply go up one step in the directory hierarchy, until we reach top level directory + // start a thread to convert all images in 'dir into .mpg format in the background Start(); @@ -188,9 +194,8 @@ void mgImageProvider::fillImageList( string dir ) for ( int i=0; i < count; i++ ) { string fname = dir + "/" + string( files[i]->d_name ); - cout << "Adding to image list " << fname << endl << flush; m_image_list.push_back( fname ); - + free( files[i] ); } free( files ); @@ -216,7 +221,7 @@ void writeImage( TagLib::ByteVector &image, int num, string &image_cache ) free( buf ); } -string treatFrameList( TagLib::ID3v2::FrameList &l, string &image_cache ) +string treatFrameList( TagLib::ID3v2::FrameList &l, string &image_cache ) { string result; @@ -251,7 +256,7 @@ string mgImageProvider::extractImagesFromTag( string f ) const char *filename = f.c_str(); string image_cache = string( the_setup.ImageCacheDir ); string dir = ""; - + if( !strcasecmp(extension(filename), "flac") ) { TagLib::FLAC::File f(filename); @@ -266,16 +271,14 @@ string mgImageProvider::extractImagesFromTag( string f ) } else if( !strcasecmp(extension(filename), "ogg") ) { + // what to do here? + TagLib::Vorbis::File f(filename); // l = f.ID3v2Tag()->frameListMap()["APIC"]; - dir = treatFrameList( l, image_cache ); + // dir = treatFrameList( l, image_cache ); } // returns empty if no images were found in tags return dir; } -string mgImageProvider::getDefaultImage() -{ - return string(the_setup.ToplevelDir) + "/cover.jpg"; -} diff --git a/mg_image_provider.h b/mg_image_provider.h index 8830274..9f9fcc0 100644 --- a/mg_image_provider.h +++ b/mg_image_provider.h @@ -36,10 +36,6 @@ class mgImageProvider : public cThread */ virtual void Action(); - /*! \brief Obtain a default image in case no other can be found - */ - std::string getDefaultImage(); - private: mgImageProvider( std::string dir ); |
