2014-02-14 23:21:05 +00:00
|
|
|
// Copyright 2014 Google Inc. All rights reserved.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
2013-11-12 20:37:58 +00:00
|
|
|
|
|
|
|
#ifndef MEDIA_BASE_MUXER_OPTIONS_H_
|
|
|
|
#define MEDIA_BASE_MUXER_OPTIONS_H_
|
|
|
|
|
2014-09-30 23:52:58 +00:00
|
|
|
#include <stdint.h>
|
2014-06-26 01:33:09 +00:00
|
|
|
|
2013-11-12 20:37:58 +00:00
|
|
|
#include <string>
|
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
namespace shaka {
|
2013-11-12 20:37:58 +00:00
|
|
|
namespace media {
|
|
|
|
|
2014-01-24 18:46:46 +00:00
|
|
|
/// This structure contains the list of configuration options for Muxer.
|
2013-11-12 20:37:58 +00:00
|
|
|
struct MuxerOptions {
|
2014-01-16 00:52:07 +00:00
|
|
|
MuxerOptions();
|
|
|
|
~MuxerOptions();
|
|
|
|
|
2014-01-24 18:46:46 +00:00
|
|
|
/// For ISO BMFF only.
|
|
|
|
/// Set the number of subsegments in each SIDX box. If 0, a single SIDX box
|
|
|
|
/// is used per segment. If -1, no SIDX box is used. Otherwise, the Muxer
|
|
|
|
/// will pack N subsegments in the root SIDX of the segment, with
|
|
|
|
/// segment_duration/N/fragment_duration fragments per subsegment.
|
2017-01-07 02:40:37 +00:00
|
|
|
int num_subsegments_per_sidx = 0;
|
2013-11-12 20:37:58 +00:00
|
|
|
|
2016-07-12 20:48:28 +00:00
|
|
|
/// For ISO BMFF only.
|
|
|
|
/// Set the flag use_decoding_timestamp_in_timeline, which if set to true, use
|
|
|
|
/// decoding timestamp instead of presentation timestamp in media timeline,
|
|
|
|
/// which is needed to workaround a Chromium bug that decoding timestamp is
|
|
|
|
/// used in buffered range, https://crbug.com/398130.
|
2017-01-07 02:40:37 +00:00
|
|
|
bool mp4_use_decoding_timestamp_in_timeline = false;
|
2016-07-12 20:48:28 +00:00
|
|
|
|
2014-01-24 18:46:46 +00:00
|
|
|
/// Output file name. If segment_template is not specified, the Muxer
|
|
|
|
/// generates this single output file with all segments concatenated;
|
|
|
|
/// Otherwise, it specifies the init segment name.
|
2013-11-12 20:37:58 +00:00
|
|
|
std::string output_file_name;
|
|
|
|
|
2014-01-24 18:46:46 +00:00
|
|
|
/// Specify output segment name pattern for generated segments. It can
|
|
|
|
/// furthermore be configured by using a subset of the SegmentTemplate
|
|
|
|
/// identifiers: $RepresentationID$, $Number$, $Bandwidth$ and $Time.
|
|
|
|
/// Optional.
|
2013-11-12 20:37:58 +00:00
|
|
|
std::string segment_template;
|
|
|
|
|
2014-05-08 21:02:36 +00:00
|
|
|
/// Specify temporary directory for intermediate files.
|
|
|
|
std::string temp_dir;
|
2014-06-27 23:07:36 +00:00
|
|
|
|
2014-06-26 01:33:09 +00:00
|
|
|
/// User-specified bit rate for the media stream. If zero, the muxer will
|
|
|
|
/// attempt to estimate.
|
2017-01-07 02:40:37 +00:00
|
|
|
uint32_t bandwidth = 0;
|
2017-03-15 19:42:00 +00:00
|
|
|
|
|
|
|
// MP4 only: include pssh in the encrypted stream. CMAF recommends carrying
|
|
|
|
// license acquisition information in the manifest and not duplicate the
|
|
|
|
// information in the stream. (This is not a hard requirement so we are still
|
|
|
|
// CMAF compatible even if pssh is included in the stream.)
|
|
|
|
bool mp4_include_pssh_in_stream = true;
|
2013-11-12 20:37:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace media
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|
2013-11-12 20:37:58 +00:00
|
|
|
|
|
|
|
#endif // MEDIA_BASE_MUXER_OPTIONS_H_
|