summaryrefslogtreecommitdiffstats
path: root/media/video/video_decode_accelerator.cc
blob: 0c6b2b98ad8746f4110bffceea84f7294154f4e6 (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
50
51
// 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/video/video_decode_accelerator.h"

#include <GLES2/gl2.h>
#include "base/logging.h"

namespace media {

void VideoDecodeAccelerator::Client::NotifyCdmAttached(bool success) {
  NOTREACHED() << "By default CDM is not supported.";
}

VideoDecodeAccelerator::~VideoDecodeAccelerator() {}

void VideoDecodeAccelerator::SetCdm(int cdm_id) {
  NOTREACHED() << "By default CDM is not supported.";
}

bool VideoDecodeAccelerator::CanDecodeOnIOThread() {
  // GPU process subclasses must override this.
  LOG(FATAL) << "This should only get called in the GPU process";
  return false;  // not reached
}

GLenum VideoDecodeAccelerator::GetSurfaceInternalFormat() const {
  return GL_RGBA;
}

VideoDecodeAccelerator::SupportedProfile::SupportedProfile()
    : profile(media::VIDEO_CODEC_PROFILE_UNKNOWN) {
}

VideoDecodeAccelerator::SupportedProfile::~SupportedProfile() {
}

} // namespace media

namespace base {

void DefaultDeleter<media::VideoDecodeAccelerator>::operator()(
    void* video_decode_accelerator) const {
  static_cast<media::VideoDecodeAccelerator*>(video_decode_accelerator)->
      Destroy();
}

}  // namespace base