| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/android/media_codec_decoder.h" | 5 #include "media/base/android/media_codec_decoder.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 status = media_codec_bridge_->QueueInputBuffer( | 731 status = media_codec_bridge_->QueueInputBuffer( |
| 732 index, &unit->data[0], unit->data.size(), unit->timestamp); | 732 index, &unit->data[0], unit->data.size(), unit->timestamp); |
| 733 } else { | 733 } else { |
| 734 DVLOG(2) << class_name() << "::" << __FUNCTION__ | 734 DVLOG(2) << class_name() << "::" << __FUNCTION__ |
| 735 << ": QueueSecureInputBuffer pts:" << unit->timestamp | 735 << ": QueueSecureInputBuffer pts:" << unit->timestamp |
| 736 << " key_id size:" << unit->key_id.size() | 736 << " key_id size:" << unit->key_id.size() |
| 737 << " iv size:" << unit->iv.size() | 737 << " iv size:" << unit->iv.size() |
| 738 << " subsamples size:" << unit->subsamples.size(); | 738 << " subsamples size:" << unit->subsamples.size(); |
| 739 | 739 |
| 740 status = media_codec_bridge_->QueueSecureInputBuffer( | 740 status = media_codec_bridge_->QueueSecureInputBuffer( |
| 741 index, &unit->data[0], unit->data.size(), | 741 index, &unit->data[0], unit->data.size(), unit->key_id, unit->iv, |
| 742 reinterpret_cast<const uint8_t*>(&unit->key_id[0]), unit->key_id.size(), | |
| 743 reinterpret_cast<const uint8_t*>(&unit->iv[0]), unit->iv.size(), | |
| 744 unit->subsamples.empty() ? nullptr : &unit->subsamples[0], | 742 unit->subsamples.empty() ? nullptr : &unit->subsamples[0], |
| 745 unit->subsamples.size(), unit->timestamp); | 743 unit->subsamples.size(), unit->timestamp); |
| 746 } | 744 } |
| 747 | 745 |
| 748 switch (status) { | 746 switch (status) { |
| 749 case MEDIA_CODEC_OK: | 747 case MEDIA_CODEC_OK: |
| 750 break; | 748 break; |
| 751 | 749 |
| 752 case MEDIA_CODEC_ERROR: | 750 case MEDIA_CODEC_ERROR: |
| 753 DVLOG(0) << class_name() << "::" << __FUNCTION__ | 751 DVLOG(0) << class_name() << "::" << __FUNCTION__ |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 RETURN_STRING(kStopping); | 960 RETURN_STRING(kStopping); |
| 963 RETURN_STRING(kInEmergencyStop); | 961 RETURN_STRING(kInEmergencyStop); |
| 964 RETURN_STRING(kError); | 962 RETURN_STRING(kError); |
| 965 } | 963 } |
| 966 return nullptr; // crash early | 964 return nullptr; // crash early |
| 967 } | 965 } |
| 968 | 966 |
| 969 #undef RETURN_STRING | 967 #undef RETURN_STRING |
| 970 | 968 |
| 971 } // namespace media | 969 } // namespace media |
| OLD | NEW |