#ifndef MEDIA_BASE_AUDIO_VIDEO_METADATA_EXTRACTOR_H_
#define MEDIA_BASE_AUDIO_VIDEO_METADATA_EXTRACTOR_H_
#include <map>
#include <string>
#include "base/basictypes.h"
#include "media/base/media_export.h"
struct AVDictionary;
namespace media {
class DataSource;
class MEDIA_EXPORT AudioVideoMetadataExtractor {
public:
AudioVideoMetadataExtractor();
~AudioVideoMetadataExtractor();
bool Extract(DataSource* source);
double duration() const;
int width() const;
int height() const;
int rotation() const;
const std::string& album() const;
const std::string& artist() const;
const std::string& comment() const;
const std::string& copyright() const;
const std::string& date() const;
int disc() const;
const std::string& encoder() const;
const std::string& encoded_by() const;
const std::string& genre() const;
const std::string& language() const;
const std::string& title() const;
int track() const;
const std::map<std::string, std::string>& raw_tags() const;
private:
void ExtractDictionary(AVDictionary* metadata);
bool extracted_;
int duration_;
int width_;
int height_;
std::string album_;
std::string artist_;
std::string comment_;
std::string copyright_;
std::string date_;
int disc_;
std::string encoder_;
std::string encoded_by_;
std::string genre_;
std::string language_;
int rotation_;
std::string title_;
int track_;
std::map<std::string, std::string> raw_tags_;
DISALLOW_COPY_AND_ASSIGN(AudioVideoMetadataExtractor);
};
}
#endif