Shaka Packager SDK
Loading...
Searching...
No Matches
segment_coordinator.h
1// Copyright 2025 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_CHUNKING_SEGMENT_COORDINATOR_H_
8#define PACKAGER_MEDIA_CHUNKING_SEGMENT_COORDINATOR_H_
9
10#include <optional>
11#include <set>
12
13#include <packager/media/base/media_handler.h>
14
15namespace shaka {
16namespace media {
17
47 public:
49 ~SegmentCoordinator() override = default;
50
54 void MarkAsTeletextStream(size_t input_stream_index);
55
56 protected:
59 Status InitializeInternal() override;
60 Status Process(std::unique_ptr<StreamData> stream_data) override;
62
63 private:
65 SegmentCoordinator& operator=(const SegmentCoordinator&) = delete;
66
73 Status OnSegmentInfo(size_t input_stream_index,
74 std::shared_ptr<const SegmentInfo> info);
75
79 bool IsTeletextStream(size_t input_stream_index) const;
80
83 int64_t latest_segment_boundary_ = 0;
84
87 std::set<size_t> teletext_stream_indices_;
88
94 std::optional<size_t> sync_source_stream_index_;
95};
96
97} // namespace media
98} // namespace shaka
99
100#endif // PACKAGER_MEDIA_CHUNKING_SEGMENT_COORDINATOR_H_
Status Process(std::unique_ptr< StreamData > stream_data) override
void MarkAsTeletextStream(size_t input_stream_index)
All the methods that are virtual are virtual for mocking.