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

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

Issue 231283005: Add live mode detection in WebM MediaSource parser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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) 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 // Constructs an initialized object. It is acceptable to pass in NULL for 75 // Constructs an initialized object. It is acceptable to pass in NULL for
76 // |extra_data|, otherwise the memory is copied. 76 // |extra_data|, otherwise the memory is copied.
77 VideoDecoderConfig(VideoCodec codec, 77 VideoDecoderConfig(VideoCodec codec,
78 VideoCodecProfile profile, 78 VideoCodecProfile profile,
79 VideoFrame::Format format, 79 VideoFrame::Format format,
80 const gfx::Size& coded_size, 80 const gfx::Size& coded_size,
81 const gfx::Rect& visible_rect, 81 const gfx::Rect& visible_rect,
82 const gfx::Size& natural_size, 82 const gfx::Size& natural_size,
83 const uint8* extra_data, size_t extra_data_size, 83 const uint8* extra_data, size_t extra_data_size,
84 bool is_encrypted); 84 bool is_encrypted,
85 bool live_mode);
85 86
86 ~VideoDecoderConfig(); 87 ~VideoDecoderConfig();
87 88
88 // Resets the internal state of this object. 89 // Resets the internal state of this object.
89 void Initialize(VideoCodec codec, 90 void Initialize(VideoCodec codec,
90 VideoCodecProfile profile, 91 VideoCodecProfile profile,
91 VideoFrame::Format format, 92 VideoFrame::Format format,
92 const gfx::Size& coded_size, 93 const gfx::Size& coded_size,
93 const gfx::Rect& visible_rect, 94 const gfx::Rect& visible_rect,
94 const gfx::Size& natural_size, 95 const gfx::Size& natural_size,
95 const uint8* extra_data, size_t extra_data_size, 96 const uint8* extra_data, size_t extra_data_size,
96 bool is_encrypted, 97 bool is_encrypted,
98 bool live_mode,
97 bool record_stats); 99 bool record_stats);
98 100
99 // Returns true if this object has appropriate configuration values, false 101 // Returns true if this object has appropriate configuration values, false
100 // otherwise. 102 // otherwise.
101 bool IsValidConfig() const; 103 bool IsValidConfig() const;
102 104
103 // Returns true if all fields in |config| match this config. 105 // Returns true if all fields in |config| match this config.
104 // Note: The contents of |extra_data_| are compared not the raw pointers. 106 // Note: The contents of |extra_data_| are compared not the raw pointers.
105 bool Matches(const VideoDecoderConfig& config) const; 107 bool Matches(const VideoDecoderConfig& config) const;
106 108
(...skipping 21 matching lines...) Expand all
128 // Optional byte data required to initialize video decoders, such as H.264 130 // Optional byte data required to initialize video decoders, such as H.264
129 // AAVC data. 131 // AAVC data.
130 const uint8* extra_data() const; 132 const uint8* extra_data() const;
131 size_t extra_data_size() const; 133 size_t extra_data_size() const;
132 134
133 // Whether the video stream is potentially encrypted. 135 // Whether the video stream is potentially encrypted.
134 // Note that in a potentially encrypted video stream, individual buffers 136 // Note that in a potentially encrypted video stream, individual buffers
135 // can be encrypted or not encrypted. 137 // can be encrypted or not encrypted.
136 bool is_encrypted() const; 138 bool is_encrypted() const;
137 139
140 // Returns true if the decoder should try to minimize decoding latency.
scherkus (not reviewing) 2014/04/10 21:11:49 compare "live_mode()" to the documentation that di
Sergey Ulanov 2014/04/10 23:10:07 Done.
141 bool live_mode() const;
142
138 private: 143 private:
139 VideoCodec codec_; 144 VideoCodec codec_;
140 VideoCodecProfile profile_; 145 VideoCodecProfile profile_;
141 146
142 VideoFrame::Format format_; 147 VideoFrame::Format format_;
143 148
144 gfx::Size coded_size_; 149 gfx::Size coded_size_;
145 gfx::Rect visible_rect_; 150 gfx::Rect visible_rect_;
146 gfx::Size natural_size_; 151 gfx::Size natural_size_;
147 152
148 std::vector<uint8> extra_data_; 153 std::vector<uint8> extra_data_;
149 154
150 bool is_encrypted_; 155 bool is_encrypted_;
151 156
157 bool live_mode_;
158
152 // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler 159 // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler
153 // generated copy constructor and assignment operator. Since the extra data is 160 // generated copy constructor and assignment operator. Since the extra data is
154 // typically small, the performance impact is minimal. 161 // typically small, the performance impact is minimal.
155 }; 162 };
156 163
157 } // namespace media 164 } // namespace media
158 165
159 #endif // MEDIA_BASE_VIDEO_DECODER_CONFIG_H_ 166 #endif // MEDIA_BASE_VIDEO_DECODER_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698