summaryrefslogtreecommitdiff
path: root/chromium/media/base/demuxer_stream.cc
blob: 9fad473f2db2b1f0d5bc02b1d9bf7596f2950778 (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
43
44
45
46
47
48
49
// Copyright (c) 2011 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/demuxer_stream.h"

namespace media {

// static
const char* DemuxerStream::GetTypeName(Type type) {
  switch (type) {
    case DemuxerStream::AUDIO:
      return "audio";
    case DemuxerStream::VIDEO:
      return "video";
    case DemuxerStream::TEXT:
      return "text";
    case DemuxerStream::UNKNOWN:
      return "unknown";
  }
}

// static
const char* DemuxerStream::GetStatusName(Status status) {
  switch (status) {
    case DemuxerStream::kOk:
      return "okay";
    case DemuxerStream::kAborted:
      return "aborted";
    case DemuxerStream::kConfigChanged:
      return "config_changed";
    case DemuxerStream::kError:
      return "error";
  }
}

DemuxerStream::~DemuxerStream() = default;

// Most DemuxerStream implementations don't specify liveness. Returns unknown
// liveness by default.
DemuxerStream::Liveness DemuxerStream::liveness() const {
  return DemuxerStream::LIVENESS_UNKNOWN;
}

// Most DemuxerStream implementations don't need to convert bit stream.
// Do nothing by default.
void DemuxerStream::EnableBitstreamConverter() {}

}  // namespace media