Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1408)

Side by Side Diff: content/renderer/pepper/content_decryptor_delegate.cc

Issue 418193003: Using PROFILE_ANY for vp8 and vp9 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/pepper/content_decryptor_delegate.h" 5 #include "content/renderer/pepper/content_decryptor_delegate.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 case media::kCodecVP9: 154 case media::kCodecVP9:
155 return PP_VIDEOCODEC_VP9; 155 return PP_VIDEOCODEC_VP9;
156 default: 156 default:
157 return PP_VIDEOCODEC_UNKNOWN; 157 return PP_VIDEOCODEC_UNKNOWN;
158 } 158 }
159 } 159 }
160 160
161 PP_VideoCodecProfile MediaVideoCodecProfileToPpVideoCodecProfile( 161 PP_VideoCodecProfile MediaVideoCodecProfileToPpVideoCodecProfile(
162 media::VideoCodecProfile profile) { 162 media::VideoCodecProfile profile) {
163 switch (profile) { 163 switch (profile) {
164 // TODO(xhwang): VP8 and VP9 do not have profiles. Clean up 164 case media::VP8PROFILE_ANY:
165 // media::VideoCodecProfile and remove these two cases. 165 case media::VP9PROFILE_ANY:
166 case media::VP8PROFILE_MAIN:
167 case media::VP9PROFILE_MAIN:
168 return PP_VIDEOCODECPROFILE_NOT_NEEDED; 166 return PP_VIDEOCODECPROFILE_NOT_NEEDED;
169 case media::H264PROFILE_BASELINE: 167 case media::H264PROFILE_BASELINE:
170 return PP_VIDEOCODECPROFILE_H264_BASELINE; 168 return PP_VIDEOCODECPROFILE_H264_BASELINE;
171 case media::H264PROFILE_MAIN: 169 case media::H264PROFILE_MAIN:
172 return PP_VIDEOCODECPROFILE_H264_MAIN; 170 return PP_VIDEOCODECPROFILE_H264_MAIN;
173 case media::H264PROFILE_EXTENDED: 171 case media::H264PROFILE_EXTENDED:
174 return PP_VIDEOCODECPROFILE_H264_EXTENDED; 172 return PP_VIDEOCODECPROFILE_H264_EXTENDED;
175 case media::H264PROFILE_HIGH: 173 case media::H264PROFILE_HIGH:
176 return PP_VIDEOCODECPROFILE_H264_HIGH; 174 return PP_VIDEOCODECPROFILE_H264_HIGH;
177 case media::H264PROFILE_HIGH10PROFILE: 175 case media::H264PROFILE_HIGH10PROFILE:
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 1174
1177 scoped_ptr<CdmPromise> ContentDecryptorDelegate::TakePromise( 1175 scoped_ptr<CdmPromise> ContentDecryptorDelegate::TakePromise(
1178 uint32_t promise_id) { 1176 uint32_t promise_id) {
1179 PromiseMap::iterator it = promises_.find(promise_id); 1177 PromiseMap::iterator it = promises_.find(promise_id);
1180 if (it == promises_.end()) 1178 if (it == promises_.end())
1181 return scoped_ptr<CdmPromise>(); 1179 return scoped_ptr<CdmPromise>();
1182 return promises_.take_and_erase(it); 1180 return promises_.take_and_erase(it);
1183 } 1181 }
1184 1182
1185 } // namespace content 1183 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_video_encoder_factory.cc ('k') | content/renderer/pepper/pepper_video_decoder_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698