Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 // MediaCodecBridge. | 155 // MediaCodecBridge. |
| 156 class MEDIA_EXPORT VideoCodecBridge : public SdkMediaCodecBridge { | 156 class MEDIA_EXPORT VideoCodecBridge : public SdkMediaCodecBridge { |
| 157 public: | 157 public: |
| 158 // See MediaCodecUtil::IsKnownUnaccelerated(). | 158 // See MediaCodecUtil::IsKnownUnaccelerated(). |
| 159 static bool IsKnownUnaccelerated(const VideoCodec& codec, | 159 static bool IsKnownUnaccelerated(const VideoCodec& codec, |
| 160 MediaCodecDirection direction); | 160 MediaCodecDirection direction); |
| 161 | 161 |
| 162 // Create, start, and return a VideoCodecBridge decoder or NULL on failure. | 162 // Create, start, and return a VideoCodecBridge decoder or NULL on failure. |
| 163 static VideoCodecBridge* CreateDecoder( | 163 static VideoCodecBridge* CreateDecoder( |
| 164 const VideoCodec& codec, // e.g. media::kCodecVP8 | 164 const VideoCodec& codec, // e.g. media::kCodecVP8 |
| 165 bool is_secure, | 165 bool is_secure, // Will be used with encrypted content. |
| 166 const gfx::Size& size, // Output frame size. | 166 const gfx::Size& size, // Output frame size. |
| 167 jobject surface, // Output surface, optional. | 167 jobject surface, // Output surface, optional. |
| 168 jobject media_crypto); // MediaCrypto object, optional. | 168 jobject media_crypto, // MediaCrypto object, optional. |
| 169 bool allow_adaptive_playback = | |
| 170 true); // Should adaptive playback be allowed if | |
| 171 // supported. | |
|
qinmin
2016/02/23 23:29:22
nit: this fits into the previous line.
DaleCurtis
2016/02/23 23:31:28
Done.
| |
| 169 | 172 |
| 170 // Create, start, and return a VideoCodecBridge encoder or NULL on failure. | 173 // Create, start, and return a VideoCodecBridge encoder or NULL on failure. |
| 171 static VideoCodecBridge* CreateEncoder( | 174 static VideoCodecBridge* CreateEncoder( |
| 172 const VideoCodec& codec, // e.g. media::kCodecVP8 | 175 const VideoCodec& codec, // e.g. media::kCodecVP8 |
| 173 const gfx::Size& size, // input frame size | 176 const gfx::Size& size, // input frame size |
| 174 int bit_rate, // bits/second | 177 int bit_rate, // bits/second |
| 175 int frame_rate, // frames/second | 178 int frame_rate, // frames/second |
| 176 int i_frame_interval, // count | 179 int i_frame_interval, // count |
| 177 int color_format); // MediaCodecInfo.CodecCapabilities. | 180 int color_format); // MediaCodecInfo.CodecCapabilities. |
| 178 | 181 |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 197 VideoCodecBridge(const std::string& mime, | 200 VideoCodecBridge(const std::string& mime, |
| 198 bool is_secure, | 201 bool is_secure, |
| 199 MediaCodecDirection direction); | 202 MediaCodecDirection direction); |
| 200 | 203 |
| 201 int adaptive_playback_supported_for_testing_; | 204 int adaptive_playback_supported_for_testing_; |
| 202 }; | 205 }; |
| 203 | 206 |
| 204 } // namespace media | 207 } // namespace media |
| 205 | 208 |
| 206 #endif // MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_ | 209 #endif // MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_ |
| OLD | NEW |