| Index: media/base/media_content_type.cc
|
| diff --git a/media/base/media_content_type.cc b/media/base/media_content_type.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d8b0cd9d787ce302df4c5ee186814ffcf796b904
|
| --- /dev/null
|
| +++ b/media/base/media_content_type.cc
|
| @@ -0,0 +1,16 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "media/base/media_content_type.h"
|
| +
|
| +namespace media {
|
| +
|
| +MediaContentType DurationToMediaContentType(base::TimeDelta duration) {
|
| + const int kMinimumContentDurationSecs = 5;
|
| + return (duration.is_zero() ||
|
| + duration > base::TimeDelta::FromSeconds(kMinimumContentDurationSecs))
|
| + ? MediaContentType::Content
|
| + : MediaContentType::Transient;
|
| +}
|
| +}
|
|
|