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

Side by Side Diff: media/webm/webm_video_client.cc

Issue 13652011: media: Support VP9 in media source. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "media/webm/webm_video_client.h" 5 #include "media/webm/webm_video_client.h"
6 6
7 #include "media/base/video_decoder_config.h" 7 #include "media/base/video_decoder_config.h"
8 #include "media/webm/webm_constants.h" 8 #include "media/webm/webm_constants.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 21 matching lines...) Expand all
32 bool WebMVideoClient::InitializeConfig( 32 bool WebMVideoClient::InitializeConfig(
33 const std::string& codec_id, const std::vector<uint8>& codec_private, 33 const std::string& codec_id, const std::vector<uint8>& codec_private,
34 bool is_encrypted, VideoDecoderConfig* config) { 34 bool is_encrypted, VideoDecoderConfig* config) {
35 DCHECK(config); 35 DCHECK(config);
36 36
37 VideoCodec video_codec = kUnknownVideoCodec; 37 VideoCodec video_codec = kUnknownVideoCodec;
38 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; 38 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN;
39 if (codec_id == "V_VP8") { 39 if (codec_id == "V_VP8") {
40 video_codec = kCodecVP8; 40 video_codec = kCodecVP8;
41 profile = VP8PROFILE_MAIN; 41 profile = VP8PROFILE_MAIN;
42 } else if (codec_id == "V_VP9") {
43 video_codec = kCodecVP9;
44 profile = VP9PROFILE_MAIN;
42 } else { 45 } else {
43 MEDIA_LOG(log_cb_) << "Unsupported video codec_id " << codec_id; 46 MEDIA_LOG(log_cb_) << "Unsupported video codec_id " << codec_id;
44 return false; 47 return false;
45 } 48 }
46 49
47 if (pixel_width_ <= 0 || pixel_height_ <= 0) 50 if (pixel_width_ <= 0 || pixel_height_ <= 0)
48 return false; 51 return false;
49 52
50 // Set crop and display unit defaults if these elements are not present. 53 // Set crop and display unit defaults if these elements are not present.
51 if (crop_bottom_ == -1) 54 if (crop_bottom_ == -1)
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Accept binary fields we don't care about for now. 148 // Accept binary fields we don't care about for now.
146 return true; 149 return true;
147 } 150 }
148 151
149 bool WebMVideoClient::OnFloat(int id, double val) { 152 bool WebMVideoClient::OnFloat(int id, double val) {
150 // Accept float fields we don't care about for now. 153 // Accept float fields we don't care about for now.
151 return true; 154 return true;
152 } 155 }
153 156
154 } // namespace media 157 } // namespace media
OLDNEW
« media/filters/stream_parser_factory.cc ('K') | « media/filters/stream_parser_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698