#ifndef MEDIA_FORMATS_WEBM_WEBM_INFO_PARSER_H_
#define MEDIA_FORMATS_WEBM_WEBM_INFO_PARSER_H_
#include "base/compiler_specific.h"
#include "media/base/media_export.h"
#include "media/formats/webm/webm_parser.h"
namespace media {
class MEDIA_EXPORT WebMInfoParser : public WebMParserClient {
public:
WebMInfoParser();
virtual ~WebMInfoParser();
int Parse(const uint8* buf, int size);
int64 timecode_scale() const { return timecode_scale_; }
double duration() const { return duration_; }
private:
virtual WebMParserClient* OnListStart(int id) OVERRIDE;
virtual bool OnListEnd(int id) OVERRIDE;
virtual bool OnUInt(int id, int64 val) OVERRIDE;
virtual bool OnFloat(int id, double val) OVERRIDE;
virtual bool OnBinary(int id, const uint8* data, int size) OVERRIDE;
virtual bool OnString(int id, const std::string& str) OVERRIDE;
int64 timecode_scale_;
double duration_;
DISALLOW_COPY_AND_ASSIGN(WebMInfoParser);
};
}
#endif