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-06-26 01:33:09 +00:00
|
|
|
#include "base/basictypes.h"
|
|
|
|
|
2013-11-12 20:37:58 +00:00
|
|
|
#include <string>
|
|
|
|
|
2014-06-27 23:07:36 +00:00
|
|
|
#include "base/basictypes.h"
|
|
|
|
|
2014-09-19 20:41:13 +00:00
|
|
|
namespace edash_packager {
|
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
|
|
|
/// Generate a single segment for each media presentation. This option
|
|
|
|
/// should be set for on demand profile.
|
2013-11-12 20:37:58 +00:00
|
|
|
bool single_segment;
|
|
|
|
|
2014-01-24 18:46:46 +00:00
|
|
|
/// Segment duration in seconds. If single_segment is specified, this
|
|
|
|
/// parameter sets the duration of a subsegment; otherwise, this parameter
|
|
|
|
/// sets the duration of a segment. A segment can contain one or many
|
|
|
|
/// fragments.
|
2013-11-12 20:37:58 +00:00
|
|
|
double segment_duration;
|
|
|
|
|
2014-01-24 18:46:46 +00:00
|
|
|
/// Fragment duration in seconds. Should not be larger than the segment
|
|
|
|
/// duration.
|
2013-11-12 20:37:58 +00:00
|
|
|
double fragment_duration;
|
|
|
|
|
2014-01-24 18:46:46 +00:00
|
|
|
/// Force segments to begin with stream access points. Segment duration may
|
|
|
|
/// not be exactly what specified by segment_duration.
|
2013-11-12 20:37:58 +00:00
|
|
|
bool segment_sap_aligned;
|
|
|
|
|
2014-01-24 18:46:46 +00:00
|
|
|
/// Force fragments to begin with stream access points. Fragment duration
|
|
|
|
/// may not be exactly what specified by segment_duration. Setting to true
|
|
|
|
/// implies that segment_sap_aligned is true as well.
|
2013-11-12 20:37:58 +00:00
|
|
|
bool fragment_sap_aligned;
|
|
|
|
|
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.
|
2013-11-12 20:37:58 +00:00
|
|
|
int num_subsegments_per_sidx;
|
|
|
|
|
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.
|
2014-09-30 21:52:21 +00:00
|
|
|
uint32_t bandwidth;
|
2013-11-12 20:37:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace media
|
2014-09-19 20:41:13 +00:00
|
|
|
} // namespace edash_packager
|
2013-11-12 20:37:58 +00:00
|
|
|
|
|
|
|
#endif // MEDIA_BASE_MUXER_OPTIONS_H_
|