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

Side by Side Diff: media/base/android/ndk_media_codec_bridge.h

Issue 2114473002: Remove usage of MediaCodec.getName(), use proxy instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build. Created 4 years, 5 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 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 #ifndef MEDIA_BASE_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_
7 7
8 #include <media/NdkMediaCodec.h> 8 #include <media/NdkMediaCodec.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 bool* end_of_stream, 56 bool* end_of_stream,
57 bool* key_frame) override; 57 bool* key_frame) override;
58 void ReleaseOutputBuffer(int index, bool render) override; 58 void ReleaseOutputBuffer(int index, bool render) override;
59 MediaCodecStatus GetInputBuffer(int input_buffer_index, 59 MediaCodecStatus GetInputBuffer(int input_buffer_index,
60 uint8_t** data, 60 uint8_t** data,
61 size_t* capacity) override; 61 size_t* capacity) override;
62 MediaCodecStatus GetOutputBufferAddress(int index, 62 MediaCodecStatus GetOutputBufferAddress(int index,
63 size_t offset, 63 size_t offset,
64 const uint8_t** addr, 64 const uint8_t** addr,
65 size_t* capacity) override; 65 size_t* capacity) override;
66 bool IsSoftwareCodec() override;
67 66
68 protected: 67 protected:
69 NdkMediaCodecBridge(const std::string& mime, 68 NdkMediaCodecBridge(const std::string& mime,
70 bool is_secure, 69 bool is_secure,
71 MediaCodecDirection direction); 70 MediaCodecDirection direction);
72 71
73 private: 72 private:
74 struct AMediaCodecDeleter { 73 struct AMediaCodecDeleter {
75 inline void operator()(AMediaCodec* ptr) const { AMediaCodec_delete(ptr); } 74 inline void operator()(AMediaCodec* ptr) const { AMediaCodec_delete(ptr); }
76 }; 75 };
77 76
78 std::unique_ptr<AMediaCodec, AMediaCodecDeleter> media_codec_; 77 std::unique_ptr<AMediaCodec, AMediaCodecDeleter> media_codec_;
79 78
80 DISALLOW_COPY_AND_ASSIGN(NdkMediaCodecBridge); 79 DISALLOW_COPY_AND_ASSIGN(NdkMediaCodecBridge);
81 }; 80 };
82 81
83 } // namespace media 82 } // namespace media
84 83
85 #endif // MEDIA_BASE_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_ 84 #endif // MEDIA_BASE_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698