Shaka Packager SDK
Loading...
Searching...
No Matches
sync_sample_iterator.h
1// Copyright 2014 Google LLC. All rights reserved.
2//
3// Use of this source code is governed by a BSD-style
4// license that can be found in the LICENSE file or at
5// https://developers.google.com/open-source/licenses/bsd
6
7#ifndef PACKAGER_MEDIA_FORMATS_MP4_SYNC_SAMPLE_ITERATOR_H_
8#define PACKAGER_MEDIA_FORMATS_MP4_SYNC_SAMPLE_ITERATOR_H_
9
10#include <cstdint>
11#include <vector>
12
13#include <packager/macros/classes.h>
14#include <packager/media/formats/mp4/box_definitions.h>
15
16namespace shaka {
17namespace media {
18namespace mp4 {
19
23 public:
25 explicit SyncSampleIterator(const SyncSample& sync_sample);
27
30 bool AdvanceSample();
31
33 bool IsSyncSample() const;
34
36 bool IsSyncSample(uint32_t sample) const;
37
38 private:
39 uint32_t sample_number_;
40 const std::vector<uint32_t>& sync_sample_vector_;
41 std::vector<uint32_t>::const_iterator iterator_;
42 bool is_empty_;
43
44 DISALLOW_COPY_AND_ASSIGN(SyncSampleIterator);
45};
46
47} // namespace mp4
48} // namespace media
49} // namespace shaka
50
51#endif // PACKAGER_MEDIA_FORMATS_MP4_SYNC_SAMPLE_ITERATOR_H_
All the methods that are virtual are virtual for mocking.