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

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

Issue 1918623002: Use the MediaCodec flush workaround in more cases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TargetApi annotation Created 4 years, 5 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.h ('k') | media/base/android/media_codec_util.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_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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "media/base/media_export.h" 15 #include "media/base/media_export.h"
16 16
17 class GURL; 17 class GURL;
18 18
19 namespace media { 19 namespace media {
20 20
21 class MediaCodecBridge;
22
21 // Helper macro to skip the test if MediaCodecBridge isn't available. 23 // Helper macro to skip the test if MediaCodecBridge isn't available.
22 #define SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE() \ 24 #define SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE() \
23 do { \ 25 do { \
24 if (!MediaCodecUtil::IsMediaCodecAvailable()) { \ 26 if (!MediaCodecUtil::IsMediaCodecAvailable()) { \
25 VLOG(0) << "Could not run test - not supported on device."; \ 27 VLOG(0) << "Could not run test - not supported on device."; \
26 return; \ 28 return; \
27 } \ 29 } \
28 } while (0) 30 } while (0)
29 31
30 // Helper macro to skip the test if VP8 decoding isn't supported. 32 // Helper macro to skip the test if VP8 decoding isn't supported.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 79
78 // Indicates if the vp8 decoder or encoder is available on this device. 80 // Indicates if the vp8 decoder or encoder is available on this device.
79 static bool IsVp8DecoderAvailable(); 81 static bool IsVp8DecoderAvailable();
80 static bool IsVp8EncoderAvailable(); 82 static bool IsVp8EncoderAvailable();
81 83
82 // Indicates if the vp9 decoder is available on this device. 84 // Indicates if the vp9 decoder is available on this device.
83 static bool IsVp9DecoderAvailable(); 85 static bool IsVp9DecoderAvailable();
84 86
85 // Indicates if SurfaceView and MediaCodec work well together on this device. 87 // Indicates if SurfaceView and MediaCodec work well together on this device.
86 static bool IsSurfaceViewOutputSupported(); 88 static bool IsSurfaceViewOutputSupported();
89
90 // Indicates if the decoder is known to fail when flushed. (b/8125974,
91 // b/8347958)
92 // When true, the client should work around the issue by releasing the
93 // decoder and instantiating a new one rather than flushing the current one.
94 static bool CodecNeedsFlushWorkaround(MediaCodecBridge* codec);
87 }; 95 };
88 96
89 } // namespace media 97 } // namespace media
90 98
91 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_ 99 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_
OLDNEW
« no previous file with comments | « media/base/android/media_codec_bridge.h ('k') | media/base/android/media_codec_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698