Shaka Packager SDK
Loading...
Searching...
No Matches
muxer_factory.h
1// Copyright 2017 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_APP_MUXER_FACTORY_H_
8#define PACKAGER_APP_MUXER_FACTORY_H_
9
10#include <cstdint>
11#include <memory>
12#include <string>
13
14#include <packager/media/base/container_names.h>
15#include <packager/mp4_output_params.h>
16#include <packager/utils/clock.h>
17
18namespace shaka {
19struct PackagingParams;
20struct StreamDescriptor;
21
22namespace media {
23
24class Muxer;
25class MuxerListener;
26
31 public:
32 MuxerFactory(const PackagingParams& packaging_params);
33
36 std::shared_ptr<Muxer> CreateMuxer(MediaContainerName output_format,
37 const StreamDescriptor& stream);
38
41 void OverrideClock(std::shared_ptr<Clock> clock);
42
43 void SetTsStreamOffset(int32_t offset_ms) {
44 transport_stream_timestamp_offset_ms_ = offset_ms;
45 }
46
47 private:
48 MuxerFactory(const MuxerFactory&) = delete;
49 MuxerFactory& operator=(const MuxerFactory&) = delete;
50
51 const Mp4OutputParams mp4_params_;
52 const std::string temp_dir_;
53 int32_t transport_stream_timestamp_offset_ms_ = 0;
54 std::shared_ptr<Clock> clock_ = nullptr;
55};
56
57} // namespace media
58} // namespace shaka
59
60#endif // PACKAGER_APP_MUXER_FACTORY_H_
std::shared_ptr< Muxer > CreateMuxer(MediaContainerName output_format, const StreamDescriptor &stream)
void OverrideClock(std::shared_ptr< Clock > clock)
All the methods that are virtual are virtual for mocking.