mkvmuxer: Turn off estimate_file_duration_ by default

Users who want this feature can explicitly turn it on. Since it
involves estimating, it should be off by default.

Change-Id: I3e934169d19b68a276c21d694179350c5b315a5a
This commit is contained in:
Vignesh Venkatasubramanian 2017-03-23 12:23:10 -07:00
parent 5a418303e3
commit 35a3c88728
2 changed files with 2 additions and 15 deletions

View File

@ -3053,7 +3053,7 @@ Segment::Segment()
output_cues_(true),
accurate_cluster_duration_(false),
fixed_size_cluster_timecode_(false),
estimate_file_duration_(true),
estimate_file_duration_(false),
payload_pos_(0),
size_position_(0),
doc_type_version_(kDefaultDocTypeVersion),

View File

@ -198,7 +198,6 @@ TEST_F(MuxerTest, AddChapters) {
TEST_F(MuxerTest, SimpleBlock) {
EXPECT_TRUE(SegmentInit(false, false, false));
segment_.set_estimate_file_duration(false);
AddVideoTrack();
// Valid Frame
@ -227,7 +226,6 @@ TEST_F(MuxerTest, SimpleBlock) {
TEST_F(MuxerTest, SimpleBlockWithAddGenericFrame) {
EXPECT_TRUE(SegmentInit(false, false, false));
segment_.set_estimate_file_duration(false);
AddVideoTrack();
Frame frame;
@ -311,7 +309,6 @@ TEST_F(MuxerTest, TrackType) {
TEST_F(MuxerTest, BlockWithAdditional) {
EXPECT_TRUE(SegmentInit(false, false, false));
segment_.set_estimate_file_duration(false);
AddVideoTrack();
// Valid Frame
@ -353,7 +350,6 @@ TEST_F(MuxerTest, BlockWithAdditional) {
TEST_F(MuxerTest, BlockAdditionalWithAddGenericFrame) {
EXPECT_TRUE(SegmentInit(false, false, false));
segment_.set_estimate_file_duration(false);
AddVideoTrack();
Frame frame;
@ -433,7 +429,6 @@ TEST_F(MuxerTest, SetSegmentDuration) {
TEST_F(MuxerTest, ForceNewCluster) {
EXPECT_TRUE(SegmentInit(false, false, false));
segment_.set_estimate_file_duration(false);
AddVideoTrack();
EXPECT_TRUE(segment_.AddFrame(dummy_data_, kFrameLength, kVideoTrackNumber, 0,
@ -456,7 +451,6 @@ TEST_F(MuxerTest, ForceNewCluster) {
TEST_F(MuxerTest, OutputCues) {
EXPECT_TRUE(SegmentInit(true, false, false));
segment_.set_estimate_file_duration(false);
AddVideoTrack();
EXPECT_TRUE(
@ -477,7 +471,6 @@ TEST_F(MuxerTest, OutputCues) {
TEST_F(MuxerTest, CuesBeforeClusters) {
EXPECT_TRUE(SegmentInit(true, false, false));
segment_.set_estimate_file_duration(false);
AddVideoTrack();
EXPECT_TRUE(
@ -518,7 +511,6 @@ TEST_F(MuxerTest, CuesBeforeClusters) {
TEST_F(MuxerTest, MaxClusterSize) {
EXPECT_TRUE(SegmentInit(false, false, false));
segment_.set_estimate_file_duration(false);
AddVideoTrack();
const uint64_t kMaxClusterSize = 20;
segment_.set_max_cluster_size(kMaxClusterSize);
@ -544,7 +536,6 @@ TEST_F(MuxerTest, MaxClusterSize) {
TEST_F(MuxerTest, MaxClusterDuration) {
EXPECT_TRUE(SegmentInit(false, false, false));
segment_.set_estimate_file_duration(false);
AddVideoTrack();
const uint64_t kMaxClusterDuration = 4000000;
segment_.set_max_cluster_duration(kMaxClusterDuration);
@ -602,7 +593,6 @@ TEST_F(MuxerTest, SetCuesTrackNumber) {
TEST_F(MuxerTest, BlockWithDiscardPadding) {
EXPECT_TRUE(SegmentInit(false, false, false));
segment_.set_estimate_file_duration(false);
AddAudioTrack();
int timecode = 1000;
@ -626,7 +616,6 @@ TEST_F(MuxerTest, BlockWithDiscardPadding) {
TEST_F(MuxerTest, AccurateClusterDuration) {
EXPECT_TRUE(SegmentInit(false, true, false));
segment_.set_estimate_file_duration(false);
AddVideoTrack();
Frame frame;
@ -761,7 +750,6 @@ TEST_F(MuxerTest, AccurateClusterDurationWithoutFinalizingCluster) {
TEST_F(MuxerTest, UseFixedSizeClusterTimecode) {
EXPECT_TRUE(SegmentInit(false, false, true));
segment_.set_estimate_file_duration(false);
AddVideoTrack();
Frame frame;
@ -954,6 +942,7 @@ TEST_F(MuxerTest, Projection) {
TEST_F(MuxerTest, EstimateDuration) {
EXPECT_TRUE(SegmentInit(false, false, false));
segment_.set_estimate_file_duration(true);
AddVideoTrack();
EXPECT_TRUE(segment_.AddFrame(dummy_data_, kFrameLength, kVideoTrackNumber, 0,
false));
@ -977,7 +966,6 @@ TEST_F(MuxerTest, EstimateDuration) {
TEST_F(MuxerTest, SetPixelWidthPixelHeight) {
EXPECT_TRUE(SegmentInit(false, false, false));
segment_.set_estimate_file_duration(false);
AddVideoTrack();
VideoTrack* const video_track =
static_cast<VideoTrack*>(segment_.GetTrackByNumber(kVideoTrackNumber));
@ -999,7 +987,6 @@ TEST_F(MuxerTest, SetPixelWidthPixelHeight) {
TEST_F(MuxerTest, LongTagString) {
EXPECT_TRUE(SegmentInit(false, false, false));
segment_.set_estimate_file_duration(false);
AddVideoTrack();
Tag* const tag = segment_.AddTag();
// 160 needs two bytes when varint encoded.