OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/formats/webm/webm_content_encodings_client.h" | 5 #include "media/formats/webm/webm_content_encodings_client.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "media/formats/webm/webm_constants.h" | 8 #include "media/formats/webm/webm_constants.h" |
9 | 9 |
10 namespace media { | 10 namespace media { |
11 | 11 |
12 WebMContentEncodingsClient::WebMContentEncodingsClient( | 12 WebMContentEncodingsClient::WebMContentEncodingsClient(MediaLog* media_log) |
13 const scoped_refptr<MediaLog>& media_log) | |
14 : media_log_(media_log), | 13 : media_log_(media_log), |
15 content_encryption_encountered_(false), | 14 content_encryption_encountered_(false), |
16 content_encodings_ready_(false) { | 15 content_encodings_ready_(false) {} |
17 } | |
18 | 16 |
19 WebMContentEncodingsClient::~WebMContentEncodingsClient() { | 17 WebMContentEncodingsClient::~WebMContentEncodingsClient() { |
20 } | 18 } |
21 | 19 |
22 const ContentEncodings& WebMContentEncodingsClient::content_encodings() const { | 20 const ContentEncodings& WebMContentEncodingsClient::content_encodings() const { |
23 DCHECK(content_encodings_ready_); | 21 DCHECK(content_encodings_ready_); |
24 return content_encodings_; | 22 return content_encodings_; |
25 } | 23 } |
26 | 24 |
27 WebMParserClient* WebMContentEncodingsClient::OnListStart(int id) { | 25 WebMParserClient* WebMContentEncodingsClient::OnListStart(int id) { |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 cur_content_encoding_->SetEncryptionKeyId(data, size); | 263 cur_content_encoding_->SetEncryptionKeyId(data, size); |
266 return true; | 264 return true; |
267 } | 265 } |
268 | 266 |
269 // This should not happen if WebMListParser is working properly. | 267 // This should not happen if WebMListParser is working properly. |
270 DCHECK(false); | 268 DCHECK(false); |
271 return false; | 269 return false; |
272 } | 270 } |
273 | 271 |
274 } // namespace media | 272 } // namespace media |
OLD | NEW |