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

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

Issue 16114009: Add AAC codec specific data for MSE on android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing comments Created 7 years, 6 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 | Annotate | Revision Log
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 <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 bool Start(const AudioCodec codec, int sample_rate, int channel_count, 113 bool Start(const AudioCodec codec, int sample_rate, int channel_count,
114 const uint8* extra_data, size_t extra_data_size, 114 const uint8* extra_data, size_t extra_data_size,
115 bool play_audio); 115 bool play_audio);
116 116
117 // Play the output buffer. This call must be called after 117 // Play the output buffer. This call must be called after
118 // DequeueOutputBuffer() and before ReleaseOutputBuffer. 118 // DequeueOutputBuffer() and before ReleaseOutputBuffer.
119 void PlayOutputBuffer(int index, size_t size); 119 void PlayOutputBuffer(int index, size_t size);
120 120
121 private: 121 private:
122 explicit AudioCodecBridge(const char* mime); 122 explicit AudioCodecBridge(const char* mime);
123
124 // Configure the java MediaFormat object with the extra codec data passed in.
125 bool ConfigureMediaFormat(jobject j_format, const AudioCodec codec,
126 const uint8* extra_data, size_t extra_data_size);
123 }; 127 };
124 128
125 class VideoCodecBridge : public MediaCodecBridge { 129 class VideoCodecBridge : public MediaCodecBridge {
126 public: 130 public:
127 // Returns an VideoCodecBridge instance if |codec| is supported, or a NULL 131 // Returns an VideoCodecBridge instance if |codec| is supported, or a NULL
128 // pointer otherwise. 132 // pointer otherwise.
129 static VideoCodecBridge* Create(const VideoCodec codec); 133 static VideoCodecBridge* Create(const VideoCodec codec);
130 134
131 // Start the video codec bridge. 135 // Start the video codec bridge.
132 // TODO(qinmin): Pass codec specific data if available. 136 // TODO(qinmin): Pass codec specific data if available.
133 bool Start( 137 bool Start(
134 const VideoCodec codec, const gfx::Size& size, jobject surface); 138 const VideoCodec codec, const gfx::Size& size, jobject surface);
135 139
136 private: 140 private:
137 explicit VideoCodecBridge(const char* mime); 141 explicit VideoCodecBridge(const char* mime);
138 }; 142 };
139 143
140 } // namespace media 144 } // namespace media
141 145
142 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_ 146 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
143 147
OLDNEW
« no previous file with comments | « media/base/android/java/src/org/chromium/media/MediaCodecBridge.java ('k') | media/base/android/media_codec_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698