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

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

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 #ifndef MEDIA_BASE_VIDEO_DECODER_CONFIG_H_ 5 #ifndef MEDIA_BASE_VIDEO_DECODER_CONFIG_H_
6 #define MEDIA_BASE_VIDEO_DECODER_CONFIG_H_ 6 #define MEDIA_BASE_VIDEO_DECODER_CONFIG_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/optional.h"
14 #include "media/base/encryption_scheme.h" 15 #include "media/base/encryption_scheme.h"
16 #include "media/base/hdr_metadata.h"
15 #include "media/base/media_export.h" 17 #include "media/base/media_export.h"
16 #include "media/base/video_codecs.h" 18 #include "media/base/video_codecs.h"
17 #include "media/base/video_types.h" 19 #include "media/base/video_types.h"
18 #include "ui/gfx/geometry/rect.h" 20 #include "ui/gfx/geometry/rect.h"
19 #include "ui/gfx/geometry/size.h" 21 #include "ui/gfx/geometry/size.h"
20 22
21 namespace media { 23 namespace media {
22 24
23 MEDIA_EXPORT VideoCodec 25 MEDIA_EXPORT VideoCodec
24 VideoCodecProfileToVideoCodec(VideoCodecProfile profile); 26 VideoCodecProfileToVideoCodec(VideoCodecProfile profile);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // Whether the video stream is potentially encrypted. 103 // Whether the video stream is potentially encrypted.
102 // Note that in a potentially encrypted video stream, individual buffers 104 // Note that in a potentially encrypted video stream, individual buffers
103 // can be encrypted or not encrypted. 105 // can be encrypted or not encrypted.
104 bool is_encrypted() const { return encryption_scheme_.is_encrypted(); } 106 bool is_encrypted() const { return encryption_scheme_.is_encrypted(); }
105 107
106 // Encryption scheme used for encrypted buffers. 108 // Encryption scheme used for encrypted buffers.
107 const EncryptionScheme& encryption_scheme() const { 109 const EncryptionScheme& encryption_scheme() const {
108 return encryption_scheme_; 110 return encryption_scheme_;
109 } 111 }
110 112
113 // Extended color metadata, including HDR metadata.
114 void SetColorMetadata(const ColorMetadata& color_metadata);
115 base::Optional<ColorMetadata> GetColorMetadata() const;
116
111 private: 117 private:
112 VideoCodec codec_; 118 VideoCodec codec_;
113 VideoCodecProfile profile_; 119 VideoCodecProfile profile_;
114 120
115 VideoPixelFormat format_; 121 VideoPixelFormat format_;
116 ColorSpace color_space_; 122 ColorSpace color_space_;
117 123
118 gfx::Size coded_size_; 124 gfx::Size coded_size_;
119 gfx::Rect visible_rect_; 125 gfx::Rect visible_rect_;
120 gfx::Size natural_size_; 126 gfx::Size natural_size_;
121 127
122 std::vector<uint8_t> extra_data_; 128 std::vector<uint8_t> extra_data_;
123 129
124 EncryptionScheme encryption_scheme_; 130 EncryptionScheme encryption_scheme_;
125 131
132 base::Optional<ColorMetadata> color_metadata_;
133
126 // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler 134 // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler
127 // generated copy constructor and assignment operator. Since the extra data is 135 // generated copy constructor and assignment operator. Since the extra data is
128 // typically small, the performance impact is minimal. 136 // typically small, the performance impact is minimal.
129 }; 137 };
130 138
131 } // namespace media 139 } // namespace media
132 140
133 #endif // MEDIA_BASE_VIDEO_DECODER_CONFIG_H_ 141 #endif // MEDIA_BASE_VIDEO_DECODER_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698