OLD | NEW |
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/mp4/track_run_iterator.h" | 5 #include "media/mp4/track_run_iterator.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "media/base/buffers.h" | 9 #include "media/base/buffers.h" |
10 #include "media/base/stream_parser_buffer.h" | 10 #include "media/base/stream_parser_buffer.h" |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 total_size != static_cast<size_t>(sample_size()))) { | 444 total_size != static_cast<size_t>(sample_size()))) { |
445 MEDIA_LOG(log_cb_) << "Incorrect CENC subsample size."; | 445 MEDIA_LOG(log_cb_) << "Incorrect CENC subsample size."; |
446 return scoped_ptr<DecryptConfig>(); | 446 return scoped_ptr<DecryptConfig>(); |
447 } | 447 } |
448 | 448 |
449 const std::vector<uint8>& kid = track_encryption().default_kid; | 449 const std::vector<uint8>& kid = track_encryption().default_kid; |
450 return scoped_ptr<DecryptConfig>(new DecryptConfig( | 450 return scoped_ptr<DecryptConfig>(new DecryptConfig( |
451 std::string(reinterpret_cast<const char*>(&kid[0]), kid.size()), | 451 std::string(reinterpret_cast<const char*>(&kid[0]), kid.size()), |
452 std::string(reinterpret_cast<const char*>(cenc_info.iv), | 452 std::string(reinterpret_cast<const char*>(cenc_info.iv), |
453 arraysize(cenc_info.iv)), | 453 arraysize(cenc_info.iv)), |
454 0, // No offset to start of media data in MP4 using CENC. | |
455 cenc_info.subsamples)); | 454 cenc_info.subsamples)); |
456 } | 455 } |
457 | 456 |
458 } // namespace mp4 | 457 } // namespace mp4 |
459 } // namespace media | 458 } // namespace media |
OLD | NEW |