Shaka Packager SDK
Loading...
Searching...
No Matches
ts_packet_writer_util.h
1// Copyright 2016 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// This file contains utility functions that help write TS packets to buffer.
8
9#ifndef PACKAGER_MEDIA_FORMATS_MP2T_TS_WRITER_UTIL_H_
10#define PACKAGER_MEDIA_FORMATS_MP2T_TS_WRITER_UTIL_H_
11
12#include <cstddef>
13#include <cstdint>
14
15namespace shaka {
16namespace media {
17
18class BufferWriter;
19
20namespace mp2t {
21
22class ContinuityCounter;
23
34void WritePayloadToBufferWriter(const uint8_t* payload,
35 size_t payload_size,
36 bool payload_unit_start_indicator,
37 int pid,
38 bool has_pcr,
39 uint64_t pcr_base,
40 ContinuityCounter* continuity_counter,
41 BufferWriter* output);
42
43} // namespace mp2t
44} // namespace media
45} // namespace shaka
46
47#endif // PACKAGER_MEDIA_FORMATS_MP2T_TS_WRITER_UTIL_H_
All the methods that are virtual are virtual for mocking.