blob: 6251bae0d7409d2f7f61c9fc681ff4c2b9b12422 [file] [log] [blame]
// Copyright (c) 2016 The WebM project authors. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.
#ifndef SRC_SKIP_PARSER_H_
#define SRC_SKIP_PARSER_H_
#include <cstdint>
#include "src/element_parser.h"
#include "webm/callback.h"
#include "webm/reader.h"
#include "webm/status.h"
namespace webm {
// A simple parser that merely skips (via Reader::Skip) ahead in the stream
// until the element has been fully skipped.
class SkipParser : public ElementParser {
public:
Status Init(const ElementMetadata& metadata, std::uint64_t max_size) override;
Status Feed(Callback* callback, Reader* reader,
std::uint64_t* num_bytes_read) override;
private:
std::uint64_t num_bytes_remaining_;
};
} // namespace webm
#endif // SRC_SKIP_PARSER_H_