OLD | NEW |
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_MEDIA_CODEC_UTIL_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_ |
6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 // Indicates if the h264 encoder is available on this device. | 78 // Indicates if the h264 encoder is available on this device. |
79 static bool IsH264EncoderAvailable(); | 79 static bool IsH264EncoderAvailable(); |
80 | 80 |
81 // Indicates if SurfaceView and MediaCodec work well together on this device. | 81 // Indicates if SurfaceView and MediaCodec work well together on this device. |
82 static bool IsSurfaceViewOutputSupported(); | 82 static bool IsSurfaceViewOutputSupported(); |
83 | 83 |
84 // Indicates if MediaCodec.setOutputSurface() works on this device. | 84 // Indicates if MediaCodec.setOutputSurface() works on this device. |
85 static bool IsSetOutputSurfaceSupported(); | 85 static bool IsSetOutputSurfaceSupported(); |
86 | 86 |
| 87 // Return true if the compressed audio |codec| will pass through the media |
| 88 // pipelines without decompression. |
| 89 static bool IsPassthroughAudioFormat(AudioCodec codec); |
| 90 |
87 // Indicates if the decoder is known to fail when flushed. (b/8125974, | 91 // Indicates if the decoder is known to fail when flushed. (b/8125974, |
88 // b/8347958) | 92 // b/8347958) |
89 // When true, the client should work around the issue by releasing the | 93 // When true, the client should work around the issue by releasing the |
90 // decoder and instantiating a new one rather than flushing the current one. | 94 // decoder and instantiating a new one rather than flushing the current one. |
91 static bool CodecNeedsFlushWorkaround(MediaCodecBridge* codec); | 95 static bool CodecNeedsFlushWorkaround(MediaCodecBridge* codec); |
92 | 96 |
93 private: | 97 private: |
94 static bool CanDecodeInternal(const std::string& mime, bool is_secure); | 98 static bool CanDecodeInternal(const std::string& mime, bool is_secure); |
95 }; | 99 }; |
96 | 100 |
97 } // namespace media | 101 } // namespace media |
98 | 102 |
99 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_ | 103 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_ |
OLD | NEW |