34std::shared_ptr<Muxer> MuxerFactory::CreateMuxer(
35 MediaContainerName output_format,
36 const StreamDescriptor& stream) {
39 options.transport_stream_timestamp_offset_ms =
40 transport_stream_timestamp_offset_ms_;
46 std::shared_ptr<Muxer> muxer;
48 switch (output_format) {
53 muxer = std::make_shared<PackedAudioWriter>(options);
56 muxer = std::make_shared<webm::WebMMuxer>(options);
59 muxer = std::make_shared<ttml::TtmlMuxer>(options);
61 case CONTAINER_WEBVTT:
62 muxer = std::make_shared<webvtt::WebVttMuxer>(options);
64 case CONTAINER_MPEG2TS:
65 muxer = std::make_shared<mp2t::TsMuxer>(options);
68 muxer = std::make_shared<mp4::MP4Muxer>(options);
71 LOG(ERROR) <<
"Cannot support muxing to " << output_format;
82 muxer->set_clock(clock_);