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

Side by Side Diff: media/base/android/sdk_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: Created 4 years, 8 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_SDK_MEDIA_CODEC_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool* end_of_stream, 60 bool* end_of_stream,
61 bool* key_frame) override; 61 bool* key_frame) override;
62 void ReleaseOutputBuffer(int index, bool render) override; 62 void ReleaseOutputBuffer(int index, bool render) override;
63 MediaCodecStatus GetInputBuffer(int input_buffer_index, 63 MediaCodecStatus GetInputBuffer(int input_buffer_index,
64 uint8_t** data, 64 uint8_t** data,
65 size_t* capacity) override; 65 size_t* capacity) override;
66 MediaCodecStatus CopyFromOutputBuffer(int index, 66 MediaCodecStatus CopyFromOutputBuffer(int index,
67 size_t offset, 67 size_t offset,
68 void* dst, 68 void* dst,
69 size_t num) override; 69 size_t num) override;
70 std::string GetName() override;
70 71
71 static bool RegisterSdkMediaCodecBridge(JNIEnv* env); 72 static bool RegisterSdkMediaCodecBridge(JNIEnv* env);
72 73
73 protected: 74 protected:
74 SdkMediaCodecBridge(const std::string& mime, 75 SdkMediaCodecBridge(const std::string& mime,
75 bool is_secure, 76 bool is_secure,
76 MediaCodecDirection direction); 77 MediaCodecDirection direction);
77 78
78 // Called to get the buffer address given the output buffer index and offset. 79 // Called to get the buffer address given the output buffer index and offset.
79 // The size of available data to read is written to |*capacity| and the 80 // The size of available data to read is written to |*capacity| and the
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 VideoCodecBridge(const std::string& mime, 206 VideoCodecBridge(const std::string& mime,
206 bool is_secure, 207 bool is_secure,
207 MediaCodecDirection direction); 208 MediaCodecDirection direction);
208 209
209 int adaptive_playback_supported_for_testing_; 210 int adaptive_playback_supported_for_testing_;
210 }; 211 };
211 212
212 } // namespace media 213 } // namespace media
213 214
214 #endif // MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_ 215 #endif // MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698