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

Unified Diff: media/base/android/media_codec_bridge.cc

Issue 2672313006: media: Remove the unused NdkMediaCodecBridge (Closed)
Patch Set: rebase past conflict Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/android/media_codec_bridge.h ('k') | media/base/android/media_codec_bridge_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_codec_bridge.cc
diff --git a/media/base/android/media_codec_bridge.cc b/media/base/android/media_codec_bridge.cc
deleted file mode 100644
index 0231c00777d6197d778c13bf451f7e547169fe07..0000000000000000000000000000000000000000
--- a/media/base/android/media_codec_bridge.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/base/android/media_codec_bridge.h"
-
-#include <algorithm>
-#include <limits>
-
-#include "base/logging.h"
-#include "base/strings/string_util.h"
-#include "media/base/subsample_entry.h"
-
-namespace media {
-
-MediaCodecBridge::MediaCodecBridge() {}
-
-MediaCodecBridge::~MediaCodecBridge() {}
-
-MediaCodecStatus MediaCodecBridge::QueueSecureInputBuffer(
- int index,
- const uint8_t* data,
- size_t data_size,
- const std::string& key_id,
- const std::string& iv,
- const std::vector<SubsampleEntry>& subsamples,
- const EncryptionScheme& encryption_scheme,
- base::TimeDelta presentation_time) {
- const std::vector<char> key_vec(key_id.begin(), key_id.end());
- const std::vector<char> iv_vec(iv.begin(), iv.end());
- return QueueSecureInputBuffer(index, data, data_size, key_vec, iv_vec,
- subsamples.empty() ? nullptr : &subsamples[0],
- (int)subsamples.size(), encryption_scheme,
- presentation_time);
-}
-
-MediaCodecStatus MediaCodecBridge::CopyFromOutputBuffer(int index,
- size_t offset,
- void* dst,
- size_t num) {
- const uint8_t* src_data = nullptr;
- size_t src_capacity = 0;
- MediaCodecStatus status =
- GetOutputBufferAddress(index, offset, &src_data, &src_capacity);
- if (status == MEDIA_CODEC_OK) {
- CHECK_GE(src_capacity, num);
- memcpy(dst, src_data, num);
- }
- return status;
-}
-
-bool MediaCodecBridge::FillInputBuffer(int index,
- const uint8_t* data,
- size_t size) {
- uint8_t* dst = nullptr;
- size_t capacity = 0;
- if (GetInputBuffer(index, &dst, &capacity) != MEDIA_CODEC_OK) {
- LOG(ERROR) << "GetInputBuffer failed";
- return false;
- }
- CHECK(dst);
-
- if (size > capacity) {
- LOG(ERROR) << "Input buffer size " << size
- << " exceeds MediaCodec input buffer capacity: " << capacity;
- return false;
- }
-
- memcpy(dst, data, size);
- return true;
-}
-
-} // namespace media
« no previous file with comments | « media/base/android/media_codec_bridge.h ('k') | media/base/android/media_codec_bridge_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698