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

Side by Side Diff: media/cdm/cdm_adapter.cc

Issue 1769593002: Add 4 VP9 profiles to the media::VideoCodecProfile enum. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hevc-codec-7
Patch Set: Added some comments and dchecks Created 4 years, 8 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
« no previous file with comments | « media/base/video_decoder_config.cc ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "media/cdm/cdm_adapter.h" 5 #include "media/cdm/cdm_adapter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 default: 146 default:
147 DVLOG(1) << "Unsupported VideoCodec " << codec; 147 DVLOG(1) << "Unsupported VideoCodec " << codec;
148 return cdm::VideoDecoderConfig::kUnknownVideoCodec; 148 return cdm::VideoDecoderConfig::kUnknownVideoCodec;
149 } 149 }
150 } 150 }
151 151
152 cdm::VideoDecoderConfig::VideoCodecProfile ToCdmVideoCodecProfile( 152 cdm::VideoDecoderConfig::VideoCodecProfile ToCdmVideoCodecProfile(
153 VideoCodecProfile profile) { 153 VideoCodecProfile profile) {
154 switch (profile) { 154 switch (profile) {
155 case VP8PROFILE_ANY: 155 case VP8PROFILE_ANY:
156 case VP9PROFILE_ANY: 156 // TODO(servolk): See crbug.com/592074. We'll need to update this code to
157 // handle different VP9 profiles properly after adding VP9 profiles in
158 // media/cdm/api/content_decryption_module.h in a separate CL.
159 // For now return kProfileNotNeeded to avoid breaking unit tests.
160 case VP9PROFILE_PROFILE0:
161 case VP9PROFILE_PROFILE1:
162 case VP9PROFILE_PROFILE2:
163 case VP9PROFILE_PROFILE3:
157 return cdm::VideoDecoderConfig::kProfileNotNeeded; 164 return cdm::VideoDecoderConfig::kProfileNotNeeded;
158 case H264PROFILE_BASELINE: 165 case H264PROFILE_BASELINE:
159 return cdm::VideoDecoderConfig::kH264ProfileBaseline; 166 return cdm::VideoDecoderConfig::kH264ProfileBaseline;
160 case H264PROFILE_MAIN: 167 case H264PROFILE_MAIN:
161 return cdm::VideoDecoderConfig::kH264ProfileMain; 168 return cdm::VideoDecoderConfig::kH264ProfileMain;
162 case H264PROFILE_EXTENDED: 169 case H264PROFILE_EXTENDED:
163 return cdm::VideoDecoderConfig::kH264ProfileExtended; 170 return cdm::VideoDecoderConfig::kH264ProfileExtended;
164 case H264PROFILE_HIGH: 171 case H264PROFILE_HIGH:
165 return cdm::VideoDecoderConfig::kH264ProfileHigh; 172 return cdm::VideoDecoderConfig::kH264ProfileHigh;
166 case H264PROFILE_HIGH10PROFILE: 173 case H264PROFILE_HIGH10PROFILE:
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 result_frames->push_back(frame); 953 result_frames->push_back(frame);
947 954
948 data += frame_size; 955 data += frame_size;
949 bytes_left -= frame_size; 956 bytes_left -= frame_size;
950 } while (bytes_left > 0); 957 } while (bytes_left > 0);
951 958
952 return true; 959 return true;
953 } 960 }
954 961
955 } // namespace media 962 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_decoder_config.cc ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698