summaryrefslogtreecommitdiff
path: root/chromium/media/base/encryption_scheme.cc
blob: 12728f71c89a8daada2ad1ca2819b3dbb2e308b1 (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
// Copyright 2015 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/encryption_scheme.h"

#include <ostream>


namespace media {

std::string GetEncryptionSchemeName(EncryptionScheme encryption_scheme) {
  switch (encryption_scheme) {
    case EncryptionScheme::kUnencrypted:
      return "Unencrypted";
    case EncryptionScheme::kCenc:
      return "CENC";
    case EncryptionScheme::kCbcs:
      return "CBCS";
    default:
      return "Unknown";
  }
}

std::ostream& operator<<(std::ostream& os, EncryptionScheme encryption_scheme) {
  return os << GetEncryptionSchemeName(encryption_scheme);
}

}  // namespace media