mirror of
https://github.com/taglib/taglib.git
synced 2025-07-20 22:14:22 -04:00
Make the toString() method virtual
This commit is contained in:
@ -26,17 +26,11 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <fileref.h>
|
||||
#include <mp4file.h>
|
||||
#include <tfile.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace TagLib;
|
||||
|
||||
#define MAYBE_PRINT_DESC(_Type) \
|
||||
if(dynamic_cast<_Type *>(f.file())) { \
|
||||
cout << dynamic_cast<_Type *>(f.file())->toString().to8Bit(true) << endl; \
|
||||
found = 1; \
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// process the command line args
|
||||
@ -46,15 +40,8 @@ int main(int argc, char *argv[])
|
||||
cout << "******************** \"" << argv[i] << "\"********************" << endl;
|
||||
|
||||
FileRef f(argv[i]);
|
||||
|
||||
bool found = 0;
|
||||
if(!f.isNull() && f.file()) {
|
||||
MAYBE_PRINT_DESC(MP4::File);
|
||||
MAYBE_PRINT_DESC(File);
|
||||
}
|
||||
|
||||
if(!found) {
|
||||
cout << "could not find any information about the file" << endl;
|
||||
cout << f.file()->toString().to8Bit(true) << endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user