Shaka Packager SDK
muxer_factory.h
1 // Copyright 2017 Google Inc. 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/media/public/mp4_output_params.h"
15 
16 namespace base {
17 class Clock;
18 } // namespace base
19 
20 namespace shaka {
21 struct PackagingParams;
22 struct StreamDescriptor;
23 
24 namespace media {
25 
26 class Muxer;
27 class MuxerListener;
28 
32 class MuxerFactory {
33  public:
34  MuxerFactory(const PackagingParams& packaging_params);
35 
38  std::shared_ptr<Muxer> CreateMuxer(MediaContainerName output_format,
39  const StreamDescriptor& stream);
40 
43  void OverrideClock(base::Clock* clock);
44 
45  private:
46  MuxerFactory(const MuxerFactory&) = delete;
47  MuxerFactory& operator=(const MuxerFactory&) = delete;
48 
49  const Mp4OutputParams mp4_params_;
50  const uint32_t transport_stream_timestamp_offset_ms_ = 0;
51  const std::string temp_dir_;
52  base::Clock* clock_ = nullptr;
53 };
54 
55 } // namespace media
56 } // namespace shaka
57 
58 #endif // PACKAGER_APP_MUXER_FACTORY_H_
Defines a single input/output stream.
Definition: packager.h:73
All the methods that are virtual are virtual for mocking.
MP4 (ISO-BMFF) output related parameters.
Packaging parameters.
Definition: packager.h:38