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

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

Issue 1918623002: Use the MediaCodec flush workaround in more cases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TargetApi annotation 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 // Gets the component name. Before API level 18 this returns an empty string.
178 virtual std::string GetName() = 0;
179
177 protected: 180 protected:
178 MediaCodecBridge(); 181 MediaCodecBridge();
179 182
180 // Fills a particular input buffer; returns false if |data_size| exceeds the 183 // Fills a particular input buffer; returns false if |data_size| exceeds the
181 // input buffer's capacity (and doesn't touch the input buffer in that case). 184 // input buffer's capacity (and doesn't touch the input buffer in that case).
182 bool FillInputBuffer(int index, 185 bool FillInputBuffer(int index,
183 const uint8_t* data, 186 const uint8_t* data,
184 size_t data_size) WARN_UNUSED_RESULT; 187 size_t data_size) WARN_UNUSED_RESULT;
185 188
186 DISALLOW_COPY_AND_ASSIGN(MediaCodecBridge); 189 DISALLOW_COPY_AND_ASSIGN(MediaCodecBridge);
187 }; 190 };
188 191
189 } // namespace media 192 } // namespace media
190 193
191 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_ 194 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
OLDNEW
« no previous file with comments | « media/base/android/java/src/org/chromium/media/MediaCodecBridge.java ('k') | media/base/android/media_codec_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698