Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / media / base / audio_video_metadata_extractor.h
index 7ea73e2..7590515 100644 (file)
@@ -5,7 +5,9 @@
 #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"
@@ -20,6 +22,17 @@ class DataSource;
 // 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();
 
@@ -51,8 +64,11 @@ class MEDIA_EXPORT 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_;
 
@@ -74,6 +90,8 @@ class MEDIA_EXPORT AudioVideoMetadataExtractor {
   std::string title_;
   int track_;
 
+  StreamInfoVector stream_infos_;
+
   DISALLOW_COPY_AND_ASSIGN(AudioVideoMetadataExtractor);
 };