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 <memory>
11#include <string>
12
13#include <packager/media/base/container_names.h>
14#include <packager/mp4_output_params.h>
15#include <packager/mpd/base/mpd_builder.h>
16
17namespace shaka {
18struct PackagingParams;
19struct StreamDescriptor;
20
21namespace media {
22
23class Muxer;
24class MuxerListener;
25
30 public:
31 MuxerFactory(const PackagingParams& packaging_params);
32
35 std::shared_ptr<Muxer> CreateMuxer(MediaContainerName output_format,
36 const StreamDescriptor& stream);
37
40 void OverrideClock(std::shared_ptr<Clock> clock);
41
42 void SetTsStreamOffset(int32_t offset_ms) {
43 transport_stream_timestamp_offset_ms_ = offset_ms;
44 }
45
46 private:
47 MuxerFactory(const MuxerFactory&) = delete;
48 MuxerFactory& operator=(const MuxerFactory&) = delete;
49
50 const Mp4OutputParams mp4_params_;
51 const std::string temp_dir_;
52 int32_t transport_stream_timestamp_offset_ms_ = 0;
53 std::shared_ptr<Clock> clock_ = nullptr;
54};
55
56} // namespace media
57} // namespace shaka
58
59#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.