• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2016 The WebM project authors. All Rights Reserved.
2 //
3 // Use of this source code is governed by a BSD-style license
4 // that can be found in the LICENSE file in the root of the source
5 // tree. An additional intellectual property rights grant can be found
6 // in the file PATENTS.  All contributing project authors may
7 // be found in the AUTHORS file in the root of the source tree.
8 #ifndef SRC_CUE_TRACK_POSITIONS_PARSER_H_
9 #define SRC_CUE_TRACK_POSITIONS_PARSER_H_
10 
11 #include "src/int_parser.h"
12 #include "src/master_value_parser.h"
13 #include "webm/dom_types.h"
14 #include "webm/id.h"
15 
16 namespace webm {
17 
18 // Spec reference:
19 // http://matroska.org/technical/specs/index.html#CueTrackPositions
20 // http://www.webmproject.org/docs/container/#CueTrackPositions
21 class CueTrackPositionsParser : public MasterValueParser<CueTrackPositions> {
22  public:
CueTrackPositionsParser()23   CueTrackPositionsParser()
24       : MasterValueParser<CueTrackPositions>(
25             MakeChild<UnsignedIntParser>(Id::kCueTrack,
26                                          &CueTrackPositions::track),
27             MakeChild<UnsignedIntParser>(Id::kCueClusterPosition,
28                                          &CueTrackPositions::cluster_position),
29             MakeChild<UnsignedIntParser>(Id::kCueRelativePosition,
30                                          &CueTrackPositions::relative_position),
31             MakeChild<UnsignedIntParser>(Id::kCueDuration,
32                                          &CueTrackPositions::duration),
33             MakeChild<UnsignedIntParser>(Id::kCueBlockNumber,
34                                          &CueTrackPositions::block_number)) {}
35 };
36 
37 }  // namespace webm
38 
39 #endif  // SRC_CUE_TRACK_POSITIONS_PARSER_H_
40