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

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

Issue 1975013002: Disable various MediaSourcePlayerTests on unsupported devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | media/base/android/media_source_player_unittest.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 // Helper macro to skip the test if MediaCodecBridge isn't available. 21 // Helper macro to skip the test if MediaCodecBridge isn't available.
22 #define SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE() \ 22 #define SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE() \
23 do { \ 23 do { \
24 if (!MediaCodecUtil::IsMediaCodecAvailable()) { \ 24 if (!MediaCodecUtil::IsMediaCodecAvailable()) { \
25 VLOG(0) << "Could not run test - not supported on device."; \ 25 VLOG(0) << "Could not run test - not supported on device."; \
26 return; \ 26 return; \
27 } \ 27 } \
28 } while (0) 28 } while (0)
29 29
30 // Helper macro to skip the test if VP8 decoding isn't supported.
31 #define SKIP_TEST_IF_VP8_DECODER_IS_NOT_SUPPORTED() \
32 do { \
33 if (!MediaCodecUtil::IsVp8DecoderAvailable()) { \
34 VLOG(0) << "Could not run test - not supported on device."; \
35 return; \
36 } \
37 } while (0)
38
30 // Codec direction. Keep this in sync with MediaCodecUtil.java. 39 // Codec direction. Keep this in sync with MediaCodecUtil.java.
31 enum MediaCodecDirection { 40 enum MediaCodecDirection {
32 MEDIA_CODEC_DECODER, 41 MEDIA_CODEC_DECODER,
33 MEDIA_CODEC_ENCODER, 42 MEDIA_CODEC_ENCODER,
34 }; 43 };
35 44
36 class MEDIA_EXPORT MediaCodecUtil { 45 class MEDIA_EXPORT MediaCodecUtil {
37 public: 46 public:
38 // Returns true if MediaCodec is available on the device. 47 // Returns true if MediaCodec is available on the device.
39 // All other static methods check IsAvailable() internally. There's no need 48 // All other static methods check IsAvailable() internally. There's no need
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Indicates if the vp9 decoder is available on this device. 82 // Indicates if the vp9 decoder is available on this device.
74 static bool IsVp9DecoderAvailable(); 83 static bool IsVp9DecoderAvailable();
75 84
76 // Indicates if SurfaceView and MediaCodec work well together on this device. 85 // Indicates if SurfaceView and MediaCodec work well together on this device.
77 static bool IsSurfaceViewOutputSupported(); 86 static bool IsSurfaceViewOutputSupported();
78 }; 87 };
79 88
80 } // namespace media 89 } // namespace media
81 90
82 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_ 91 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/android/media_source_player_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698