blob: b21b045d4d408c95610659c784dc7e0174364993 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// Copyright 2012 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/mime_util.h"
#include "media/base/mime_util_internal.h"
namespace media {
// This variable is Leaky because it is accessed from WorkerPool threads.
static internal::MimeUtil* GetMimeUtil() {
static internal::MimeUtil* mime_util = new internal::MimeUtil();
return mime_util;
}
bool IsSupportedMediaMimeType(const std::string& mime_type) {
return GetMimeUtil()->IsSupportedMediaMimeType(mime_type);
}
SupportsType IsSupportedMediaFormat(const std::string& mime_type,
const std::vector<std::string>& codecs) {
return GetMimeUtil()->IsSupportedMediaFormat(mime_type, codecs, false);
}
SupportsType IsSupportedEncryptedMediaFormat(
const std::string& mime_type,
const std::vector<std::string>& codecs) {
return GetMimeUtil()->IsSupportedMediaFormat(mime_type, codecs, true);
}
void SplitCodecsToVector(const std::string& codecs,
std::vector<std::string>* codecs_out,
bool strip) {
GetMimeUtil()->SplitCodecsToVector(codecs, codecs_out, strip);
}
void RemoveProprietaryMediaTypesAndCodecsForTests() {
GetMimeUtil()->RemoveProprietaryMediaTypesAndCodecs();
}
} // namespace media
|