OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/media/webrtc/webrtc_video_frame_adapter.h" | 5 #include "content/renderer/media/webrtc/webrtc_video_frame_adapter.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 namespace { | 10 namespace { |
(...skipping 25 matching lines...) Expand all Loading... |
36 } | 36 } |
37 | 37 |
38 int WebRtcVideoFrameAdapter::height() const { | 38 int WebRtcVideoFrameAdapter::height() const { |
39 return frame_->visible_rect().height(); | 39 return frame_->visible_rect().height(); |
40 } | 40 } |
41 | 41 |
42 const uint8_t* WebRtcVideoFrameAdapter::data(webrtc::PlaneType type) const { | 42 const uint8_t* WebRtcVideoFrameAdapter::data(webrtc::PlaneType type) const { |
43 return frame_->visible_data(WebRtcToMediaPlaneType(type)); | 43 return frame_->visible_data(WebRtcToMediaPlaneType(type)); |
44 } | 44 } |
45 | 45 |
46 uint8_t* WebRtcVideoFrameAdapter::data(webrtc::PlaneType type) { | |
47 NOTREACHED(); | |
48 return nullptr; | |
49 } | |
50 | |
51 int WebRtcVideoFrameAdapter::stride(webrtc::PlaneType type) const { | 46 int WebRtcVideoFrameAdapter::stride(webrtc::PlaneType type) const { |
52 return frame_->stride(WebRtcToMediaPlaneType(type)); | 47 return frame_->stride(WebRtcToMediaPlaneType(type)); |
53 } | 48 } |
54 | 49 |
55 void* WebRtcVideoFrameAdapter::native_handle() const { | 50 void* WebRtcVideoFrameAdapter::native_handle() const { |
56 return frame_->HasTextures() ? frame_.get() : nullptr; | 51 return frame_->HasTextures() ? frame_.get() : nullptr; |
57 } | 52 } |
58 | 53 |
59 rtc::scoped_refptr<webrtc::VideoFrameBuffer> | 54 rtc::scoped_refptr<webrtc::VideoFrameBuffer> |
60 WebRtcVideoFrameAdapter::NativeToI420Buffer() { | 55 WebRtcVideoFrameAdapter::NativeToI420Buffer() { |
61 NOTREACHED(); | 56 NOTREACHED(); |
62 return nullptr; | 57 return nullptr; |
63 } | 58 } |
64 | 59 |
65 } // namespace content | 60 } // namespace content |
OLD | NEW |