#ifndef MEDIA_BASE_AUDIO_VIDEO_METADATA_EXTRACTOR_H_
#define MEDIA_BASE_AUDIO_VIDEO_METADATA_EXTRACTOR_H_
+#include <map>
#include <string>
+#include <vector>
#include "base/basictypes.h"
#include "media/base/media_export.h"
// files. It also provides the format name.
class MEDIA_EXPORT AudioVideoMetadataExtractor {
public:
+ typedef std::map<std::string, std::string> TagDictionary;
+
+ struct StreamInfo {
+ StreamInfo();
+ ~StreamInfo();
+ std::string type;
+ TagDictionary tags;
+ };
+
+ typedef std::vector<StreamInfo> StreamInfoVector;
+
AudioVideoMetadataExtractor();
~AudioVideoMetadataExtractor();
const std::string& title() const;
int track() const;
+ // First element is the container. Subsequent elements are the child streams.
+ const StreamInfoVector& stream_infos() const;
+
private:
- void ExtractDictionary(AVDictionary* metadata);
+ void ExtractDictionary(AVDictionary* metadata, TagDictionary* raw_tags);
bool extracted_;
std::string title_;
int track_;
+ StreamInfoVector stream_infos_;
+
DISALLOW_COPY_AND_ASSIGN(AudioVideoMetadataExtractor);
};