#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/formats/webm/webm_tracks_parser.h"
#include <memory>
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "media/base/media_util.h"
#include "media/base/timestamp_constants.h"
#include "media/formats/webm/webm_constants.h"
#include "media/formats/webm/webm_content_encodings.h"
namespace media {
WebMTracksParser::WebMTracksParser(MediaLog* media_log)
: … { … }
WebMTracksParser::~WebMTracksParser() = default;
base::TimeDelta WebMTracksParser::PrecisionCappedDefaultDuration(
const int64_t timecode_scale_in_ns,
const int64_t duration_in_ns) const { … }
void WebMTracksParser::Reset() { … }
void WebMTracksParser::ResetTrackEntry() { … }
int WebMTracksParser::Parse(const uint8_t* buf, int size) { … }
base::TimeDelta WebMTracksParser::GetAudioDefaultDuration(
const int64_t timecode_scale_in_ns) const { … }
base::TimeDelta WebMTracksParser::GetVideoDefaultDuration(
const int64_t timecode_scale_in_ns) const { … }
WebMParserClient* WebMTracksParser::OnListStart(int id) { … }
bool WebMTracksParser::OnListEnd(int id) { … }
bool WebMTracksParser::OnUInt(int id, int64_t val) { … }
bool WebMTracksParser::OnFloat(int id, double val) { … }
bool WebMTracksParser::OnBinary(int id, const uint8_t* data, int size) { … }
bool WebMTracksParser::OnString(int id, const std::string& str) { … }
}