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

Side by Side Diff: media/base/android/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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_MEDIA_CODEC_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 // Copies |num| bytes from output buffer |index|'s |offset| into the memory 168 // Copies |num| bytes from output buffer |index|'s |offset| into the memory
169 // region pointed to by |dst|. To avoid overflows, the size of both source 169 // region pointed to by |dst|. To avoid overflows, the size of both source
170 // and destination must be at least |num| bytes, and should not overlap. 170 // and destination must be at least |num| bytes, and should not overlap.
171 // Returns MEDIA_CODEC_ERROR if an error occurs, or MEDIA_CODEC_OK otherwise. 171 // Returns MEDIA_CODEC_ERROR if an error occurs, or MEDIA_CODEC_OK otherwise.
172 MediaCodecStatus CopyFromOutputBuffer(int index, 172 MediaCodecStatus CopyFromOutputBuffer(int index,
173 size_t offset, 173 size_t offset,
174 void* dst, 174 void* dst,
175 size_t num); 175 size_t num);
176 176
177 // Returns true if and only if this is a software codec.
178 virtual bool IsSoftwareCodec() = 0;
179
180 protected: 177 protected:
181 MediaCodecBridge(); 178 MediaCodecBridge();
182 179
183 // Fills a particular input buffer; returns false if |data_size| exceeds the 180 // Fills a particular input buffer; returns false if |data_size| exceeds the
184 // input buffer's capacity (and doesn't touch the input buffer in that case). 181 // input buffer's capacity (and doesn't touch the input buffer in that case).
185 bool FillInputBuffer(int index, 182 bool FillInputBuffer(int index,
186 const uint8_t* data, 183 const uint8_t* data,
187 size_t data_size) WARN_UNUSED_RESULT; 184 size_t data_size) WARN_UNUSED_RESULT;
188 185
189 DISALLOW_COPY_AND_ASSIGN(MediaCodecBridge); 186 DISALLOW_COPY_AND_ASSIGN(MediaCodecBridge);
190 }; 187 };
191 188
192 } // namespace media 189 } // namespace media
193 190
194 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_ 191 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698