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

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

Issue 1932093002: Reland: Use actual audio channel count in Spitzer audio decoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bug607024
Patch Set: Fix the use of out.offset: decoded data size does not depend on it. Created 4 years, 7 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
« no previous file with comments | « media/base/android/media_codec_bridge.cc ('k') | media/base/android/ndk_media_codec_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 int* index, 52 int* index,
53 size_t* offset, 53 size_t* offset,
54 size_t* size, 54 size_t* size,
55 base::TimeDelta* presentation_time, 55 base::TimeDelta* presentation_time,
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 CopyFromOutputBuffer(int index, 62 MediaCodecStatus GetOutputBufferAddress(int index,
63 size_t offset, 63 size_t offset,
64 void* dst, 64 const uint8_t** addr,
65 size_t num) override; 65 size_t* capacity) override;
66 66
67 protected: 67 protected:
68 NdkMediaCodecBridge(const std::string& mime, 68 NdkMediaCodecBridge(const std::string& mime,
69 bool is_secure, 69 bool is_secure,
70 MediaCodecDirection direction); 70 MediaCodecDirection direction);
71 71
72 private: 72 private:
73 struct AMediaCodecDeleter { 73 struct AMediaCodecDeleter {
74 inline void operator()(AMediaCodec* ptr) const { AMediaCodec_delete(ptr); } 74 inline void operator()(AMediaCodec* ptr) const { AMediaCodec_delete(ptr); }
75 }; 75 };
76 76
77 std::unique_ptr<AMediaCodec, AMediaCodecDeleter> media_codec_; 77 std::unique_ptr<AMediaCodec, AMediaCodecDeleter> media_codec_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(NdkMediaCodecBridge); 79 DISALLOW_COPY_AND_ASSIGN(NdkMediaCodecBridge);
80 }; 80 };
81 81
82 } // namespace media 82 } // namespace media
83 83
84 #endif // MEDIA_BASE_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_ 84 #endif // MEDIA_BASE_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_
OLDNEW
« no previous file with comments | « media/base/android/media_codec_bridge.cc ('k') | media/base/android/ndk_media_codec_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698