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

Side by Side Diff: media/base/video_decoder_config.cc

Issue 2333663003: Add color metadata info to VideoDecoderConfig. (Closed)
Patch Set: buildfix Created 4 years, 3 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 "media/base/video_decoder_config.h" 5 #include "media/base/video_decoder_config.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "media/base/video_frame.h" 10 #include "media/base/video_frame.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const EncryptionScheme& encryption_scheme) { 60 const EncryptionScheme& encryption_scheme) {
61 Initialize(codec, profile, format, color_space, coded_size, visible_rect, 61 Initialize(codec, profile, format, color_space, coded_size, visible_rect,
62 natural_size, extra_data, encryption_scheme); 62 natural_size, extra_data, encryption_scheme);
63 } 63 }
64 64
65 VideoDecoderConfig::VideoDecoderConfig(const VideoDecoderConfig& other) = 65 VideoDecoderConfig::VideoDecoderConfig(const VideoDecoderConfig& other) =
66 default; 66 default;
67 67
68 VideoDecoderConfig::~VideoDecoderConfig() {} 68 VideoDecoderConfig::~VideoDecoderConfig() {}
69 69
70 void VideoDecoderConfig::SetColorMetadata(const ColorMetadata& color_metadata) {
71 color_metadata_ = color_metadata;
72 }
73
74 base::Optional<ColorMetadata> VideoDecoderConfig::GetColorMetadata() const {
75 return color_metadata_;
76 }
77
70 void VideoDecoderConfig::Initialize(VideoCodec codec, 78 void VideoDecoderConfig::Initialize(VideoCodec codec,
71 VideoCodecProfile profile, 79 VideoCodecProfile profile,
72 VideoPixelFormat format, 80 VideoPixelFormat format,
73 ColorSpace color_space, 81 ColorSpace color_space,
74 const gfx::Size& coded_size, 82 const gfx::Size& coded_size,
75 const gfx::Rect& visible_rect, 83 const gfx::Rect& visible_rect,
76 const gfx::Size& natural_size, 84 const gfx::Size& natural_size,
77 const std::vector<uint8_t>& extra_data, 85 const std::vector<uint8_t>& extra_data,
78 const EncryptionScheme& encryption_scheme) { 86 const EncryptionScheme& encryption_scheme) {
79 codec_ = codec; 87 codec_ = codec;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 << " visible rect: [" << visible_rect().x() << "," << visible_rect().y() 121 << " visible rect: [" << visible_rect().x() << "," << visible_rect().y()
114 << "," << visible_rect().width() << "," << visible_rect().height() << "]" 122 << "," << visible_rect().width() << "," << visible_rect().height() << "]"
115 << " natural size: [" << natural_size().width() << "," 123 << " natural size: [" << natural_size().width() << ","
116 << natural_size().height() << "]" 124 << natural_size().height() << "]"
117 << " has extra data? " << (extra_data().empty() ? "false" : "true") 125 << " has extra data? " << (extra_data().empty() ? "false" : "true")
118 << " encrypted? " << (is_encrypted() ? "true" : "false"); 126 << " encrypted? " << (is_encrypted() ? "true" : "false");
119 return s.str(); 127 return s.str();
120 } 128 }
121 129
122 } // namespace media 130 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698