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

Side by Side Diff: media/base/android/media_codec_decoder.cc

Issue 1525003002: Revert of Refactor MediaCodecBridge to add support for NDK APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix rebase errors Created 5 years 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 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
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(), unit->key_id, unit->iv, 741 index, &unit->data[0], unit->data.size(),
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(),
742 unit->subsamples.empty() ? nullptr : &unit->subsamples[0], 744 unit->subsamples.empty() ? nullptr : &unit->subsamples[0],
743 unit->subsamples.size(), unit->timestamp); 745 unit->subsamples.size(), unit->timestamp);
744 } 746 }
745 747
746 switch (status) { 748 switch (status) {
747 case MEDIA_CODEC_OK: 749 case MEDIA_CODEC_OK:
748 break; 750 break;
749 751
750 case MEDIA_CODEC_ERROR: 752 case MEDIA_CODEC_ERROR:
751 DVLOG(0) << class_name() << "::" << __FUNCTION__ 753 DVLOG(0) << class_name() << "::" << __FUNCTION__
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 RETURN_STRING(kStopping); 962 RETURN_STRING(kStopping);
961 RETURN_STRING(kInEmergencyStop); 963 RETURN_STRING(kInEmergencyStop);
962 RETURN_STRING(kError); 964 RETURN_STRING(kError);
963 } 965 }
964 return nullptr; // crash early 966 return nullptr; // crash early
965 } 967 }
966 968
967 #undef RETURN_STRING 969 #undef RETURN_STRING
968 970
969 } // namespace media 971 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_codec_bridge_unittest.cc ('k') | media/base/android/media_codec_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698