Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/gpu/rtc_video_decoder.h" | 5 #include "content/renderer/media/gpu/rtc_video_decoder.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 DLOG(ERROR) << "H264 HW decoding on Win7 is not supported."; | 103 DLOG(ERROR) << "H264 HW decoding on Win7 is not supported."; |
| 104 return decoder; | 104 return decoder; |
| 105 } | 105 } |
| 106 #endif // defined(OS_WIN) | 106 #endif // defined(OS_WIN) |
| 107 // Convert WebRTC codec type to media codec profile. | 107 // Convert WebRTC codec type to media codec profile. |
| 108 media::VideoCodecProfile profile; | 108 media::VideoCodecProfile profile; |
| 109 switch (type) { | 109 switch (type) { |
| 110 case webrtc::kVideoCodecVP8: | 110 case webrtc::kVideoCodecVP8: |
| 111 profile = media::VP8PROFILE_ANY; | 111 profile = media::VP8PROFILE_ANY; |
| 112 break; | 112 break; |
| 113 case webrtc::kVideoCodecVP9: | |
| 114 profile = media::VP9PROFILE_MIN; | |
|
Pawel Osciak
2017/02/02 00:48:13
Would VP9PROFILE_PROFILE0 be better here perhaps?
emircan
2017/02/03 18:11:30
They are the same enum value. I can change again i
| |
| 115 break; | |
| 113 case webrtc::kVideoCodecH264: | 116 case webrtc::kVideoCodecH264: |
| 114 profile = media::H264PROFILE_MAIN; | 117 profile = media::H264PROFILE_MAIN; |
| 115 break; | 118 break; |
| 116 default: | 119 default: |
| 117 DVLOG(2) << "Video codec not supported:" << type; | 120 DVLOG(2) << "Video codec not supported:" << type; |
| 118 return decoder; | 121 return decoder; |
| 119 } | 122 } |
| 120 | 123 |
| 121 base::WaitableEvent waiter(base::WaitableEvent::ResetPolicy::MANUAL, | 124 base::WaitableEvent waiter(base::WaitableEvent::ResetPolicy::MANUAL, |
| 122 base::WaitableEvent::InitialState::NOT_SIGNALED); | 125 base::WaitableEvent::InitialState::NOT_SIGNALED); |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 893 } | 896 } |
| 894 | 897 |
| 895 void RTCVideoDecoder::ClearPendingBuffers() { | 898 void RTCVideoDecoder::ClearPendingBuffers() { |
| 896 // Delete WebRTC input buffers. | 899 // Delete WebRTC input buffers. |
| 897 for (const auto& pending_buffer : pending_buffers_) | 900 for (const auto& pending_buffer : pending_buffers_) |
| 898 delete[] pending_buffer.first._buffer; | 901 delete[] pending_buffer.first._buffer; |
| 899 pending_buffers_.clear(); | 902 pending_buffers_.clear(); |
| 900 } | 903 } |
| 901 | 904 |
| 902 } // namespace content | 905 } // namespace content |
| OLD | NEW |