Home
last modified time | relevance | path

Searched refs:format (Results 1 – 25 of 1119) sorted by relevance

12345678910>>...45

/cts/tests/tests/media/misc/src/android/media/misc/cts/
DMediaFormatTest.java46 MediaFormat format, String key, String type) { in assertGetByteBuffersThrowClassCastException() argument
48 ByteBuffer value = format.getByteBuffer(key); in assertGetByteBuffersThrowClassCastException()
54 ByteBuffer value = format.getByteBuffer(key, defaultByteBuffer); in assertGetByteBuffersThrowClassCastException()
61 MediaFormat format, String key, String type) { in assertGetFloatsThrowClassCastException() argument
63 float value = format.getFloat(key); in assertGetFloatsThrowClassCastException()
69 float value = format.getFloat(key, 321.f); in assertGetFloatsThrowClassCastException()
76 MediaFormat format, String key, String type) { in assertGetIntegersThrowClassCastException() argument
78 int value = format.getInteger(key); in assertGetIntegersThrowClassCastException()
84 int value = format.getInteger(key, 123); in assertGetIntegersThrowClassCastException()
91 MediaFormat format, String key, String type) { in assertGetLongsThrowClassCastException() argument
[all …]
DResourceManagerCodecActivity.java92 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) { in onOutputFormatChanged() argument
152 MediaFormat format = MediaFormat.createVideoFormat(mMime, mWidth, mHeight); in createVideoFormat() local
153 format.setInteger(MediaFormat.KEY_COLOR_FORMAT, caps.colorFormats[0]); in createVideoFormat()
154 format.setInteger(MediaFormat.KEY_BIT_RATE, mBitrate); in createVideoFormat()
155 format.setInteger(MediaFormat.KEY_FRAME_RATE, FRAME_RATE); in createVideoFormat()
156 format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, IFRAME_INTERVAL); in createVideoFormat()
158 return format; in createVideoFormat()
162 MediaFormat format = createVideoFormat(info); in createVideoEncoderFormat() local
163 format.setInteger("profile", 1); in createVideoEncoderFormat()
164 format.setInteger("level", 1); in createVideoEncoderFormat()
[all …]
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DRetryableException.java33 public RetryableException(String format, Object...args) { in RetryableException() argument
34 this((Timeout) null, String.format(format, args)); in RetryableException()
37 public RetryableException(Throwable cause, String format, Object...args) { in RetryableException() argument
38 this((Timeout) null, cause, String.format(format, args), cause); in RetryableException()
46 public RetryableException(@Nullable Timeout timeout, String format, Object...args) { in RetryableException() argument
47 super(String.format(format, args)); in RetryableException()
51 public RetryableException(@Nullable Timeout timeout, Throwable cause, String format, in RetryableException() argument
53 super(String.format(format, args), cause); in RetryableException()
/cts/tests/media/src/android/mediav2/cts/
DCodecUnitTest.java112 MediaFormat format = new MediaFormat(); in getSampleAudioFormat() local
114 format.setString(MediaFormat.KEY_MIME, mediaType); in getSampleAudioFormat()
115 format.setInteger(MediaFormat.KEY_BIT_RATE, 64000); in getSampleAudioFormat()
116 format.setInteger(MediaFormat.KEY_SAMPLE_RATE, 16000); in getSampleAudioFormat()
117 format.setInteger(MediaFormat.KEY_CHANNEL_COUNT, 1); in getSampleAudioFormat()
118 return format; in getSampleAudioFormat()
122 MediaFormat format = new MediaFormat(); in getSampleVideoFormat() local
124 format.setString(MediaFormat.KEY_MIME, mediaType); in getSampleVideoFormat()
125 format.setInteger(MediaFormat.KEY_BIT_RATE, 256000); in getSampleVideoFormat()
126 format.setInteger(MediaFormat.KEY_WIDTH, 352); in getSampleVideoFormat()
[all …]
DMuxerUnitTest.java224 MediaFormat format = new MediaFormat(); in testIfInvalidMediaFormatIsRejected() local
225 format.setString(MediaFormat.KEY_MIME, MediaFormat.MIMETYPE_TEXT_CEA_608); in testIfInvalidMediaFormatIsRejected()
226 muxer.addTrack(format); in testIfInvalidMediaFormatIsRejected()
246 MediaFormat format = new MediaFormat(); in testIfCorruptMediaFormatIsRejected() local
247 format.setString(MediaFormat.KEY_MIME, MediaFormat.MIMETYPE_AUDIO_AAC); in testIfCorruptMediaFormatIsRejected()
248 format.setInteger(MediaFormat.KEY_SAMPLE_RATE, -1); in testIfCorruptMediaFormatIsRejected()
249 muxer.addTrack(format); in testIfCorruptMediaFormatIsRejected()
264 MediaFormat format = new MediaFormat(); in testIfAddTrackSucceedsAfterStart() local
265 format.setString(MediaFormat.KEY_MIME, MediaFormat.MIMETYPE_TEXT_SUBRIP); in testIfAddTrackSucceedsAfterStart()
266 muxer.addTrack(format); in testIfAddTrackSucceedsAfterStart()
[all …]
DCodecDecoderSurfaceTest.java113 MediaFormat format = setUpSource(file); in decodeAndSavePts() local
114 configureCodec(format, false, true, false); in decodeAndSavePts()
132 MediaFormat format = setUpSource(mTestFile); in setUp() local
135 Log.i(LOG_TAG, "Android 10: skip checkFormatSupport() for format " + format); in setUp()
138 formatList.add(format); in setUp()
239 MediaFormat format = setUpSource(mTestFile); in testSimpleDecodeToSurface() local
242 mActivity.setScreenParams(getWidth(format), getHeight(format), true); in testSimpleDecodeToSurface()
246 configureCodec(format, isAsync, true, false); in testSimpleDecodeToSurface()
284 MediaFormat format = setUpSource(mTestFile); in testDetachAndReattachSurface() local
287 .getCapabilitiesForType(format.getString(MediaFormat.KEY_MIME)); in testDetachAndReattachSurface()
[all …]
DCodecDecoderTest.java316 assertTrue(String.format("%s rms error too high ref/exp/got %f/%f/%f \n", refFile, in verify()
324 String msg = String.format("Input test file format is not same as default format of" in doOutputFormatChecks()
333 msg = String.format("Configured input format and received output format are " in doOutputFormatChecks()
341 MediaFormat format = setUpSource(mTestFile); in setUp() local
344 formatList.add(format); in setUp()
374 MediaFormat format = setUpSource(mTestFile); in testSimpleDecode() local
393 configureCodec(format, isAsync, eosType, false); in testSimpleDecode()
395 if (isFormatSimilar(format, defFormat)) { in testSimpleDecode()
405 validateMetrics(mCodecName, format); in testSimpleDecode()
412 doOutputFormatChecks(defFormat, format); in testSimpleDecode()
[all …]
/cts/tests/tests/text/src/android/text/format/cts/
DDateFormatTest.java17 package android.text.format.cts;
32 import android.text.format.DateFormat;
138 assertEquals("D", DateFormat.format("MMMMM", c)); in test_format_M()
139 assertEquals("December", DateFormat.format("MMMM", c)); in test_format_M()
140 assertEquals("Dec", DateFormat.format("MMM", c)); in test_format_M()
141 assertEquals("12", DateFormat.format("MM", c)); in test_format_M()
142 assertEquals("12", DateFormat.format("M", c)); in test_format_M()
149 assertEquals("D", DateFormat.format("LLLLL", c)); in test_format_L()
150 assertEquals("December", DateFormat.format("LLLL", c)); in test_format_L()
151 assertEquals("Dec", DateFormat.format("LLL", c)); in test_format_L()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/car/
DGarageModeTestActivity.java145 resultsString = String.format("Waitng for Garage Mode to start.\n\n" in verifyStatus()
147 dateTime.format(initiateTime)); in verifyStatus()
149 resultsString = String.format("Test failed.\n" in verifyStatus()
152 dateTime.format(initiateTime)); in verifyStatus()
156 resultsString = String.format("Test %s.\n" in verifyStatus()
164 dateTime.format(initiateTime), dateTime.format(garageModeStart), in verifyStatus()
165 dateTime.format(garageModeEnd)); in verifyStatus()
168 resultsString = String.format("Test %s.\n" in verifyStatus()
178 dateTime.format(initiateTime), dateTime.format(garageModeStart), in verifyStatus()
179 dateTime.format(termination)); in verifyStatus()
[all …]
/cts/tests/media/jni/
DNativeMuxerUnitTest.cpp137 AMediaFormat* format = AMediaFormat_new(); in nativeTestIfInvalidMediaFormatIsRejected() local
139 if (AMediaMuxer_addTrack(muxer, format) >= 0) { in nativeTestIfInvalidMediaFormatIsRejected()
144 AMediaFormat_setString(format, AMEDIAFORMAT_KEY_MIME, "text/cea-608"); in nativeTestIfInvalidMediaFormatIsRejected()
145 if (AMediaMuxer_addTrack(muxer, format) >= 0) { in nativeTestIfInvalidMediaFormatIsRejected()
149 AMediaFormat_delete(format); in nativeTestIfInvalidMediaFormatIsRejected()
166 AMediaFormat* format = AMediaFormat_new(); in nativeTestIfCorruptMediaFormatIsRejected() local
167 AMediaFormat_setString(format, AMEDIAFORMAT_KEY_MIME, AMEDIA_MIMETYPE_AUDIO_AAC); in nativeTestIfCorruptMediaFormatIsRejected()
168 AMediaFormat_setInt32(format, AMEDIAFORMAT_KEY_SAMPLE_RATE, -1); in nativeTestIfCorruptMediaFormatIsRejected()
169 if (AMediaMuxer_addTrack(muxer, format) >= 0) { in nativeTestIfCorruptMediaFormatIsRejected()
173 AMediaFormat_delete(format); in nativeTestIfCorruptMediaFormatIsRejected()
[all …]
DNativeCodecEncoderTest.cpp53 bool configureCodec(AMediaFormat* format, bool isAsync, bool signalEOSWithLastFrame,
60 bool initFormat(AMediaFormat* format);
61 bool encodeToMemory(const char* file, const char* encoder, int frameLimit, AMediaFormat* format,
64 void forceSyncFrame(AMediaFormat* format);
65 void updateBitrate(AMediaFormat* format, int bitrate);
151 for (auto format : mFormats) AMediaFormat_delete(format); in deleteParams() local
155 bool CodecEncoderTest::configureCodec(AMediaFormat* format, bool isAsync, in configureCodec() argument
157 if (!initFormat(format)) return false; in configureCodec()
158 return CodecTestBase::configureCodec(format, isAsync, signalEOSWithLastFrame, isEncoder); in configureCodec()
324 bool CodecEncoderTest::initFormat(AMediaFormat* format) { in initFormat() argument
[all …]
/cts/tests/tests/media/audio/src/android/media/audio/cts/
DCallAudioInterceptionTest.java115 AudioFormat format = new AudioFormat.Builder().setSampleRate(16000) in testGetCallUplinkInjectionAudioTrackFail() local
120 AudioTrack track = mAudioManager.getCallUplinkInjectionAudioTrack(format); in testGetCallUplinkInjectionAudioTrackFail()
128 AudioTrack track = mAudioManager.getCallUplinkInjectionAudioTrack(format); in testGetCallUplinkInjectionAudioTrackFail()
145 format = new AudioFormat.Builder().setSampleRate(96000) in testGetCallUplinkInjectionAudioTrackFail()
148 AudioTrack track = mAudioManager.getCallUplinkInjectionAudioTrack(format); in testGetCallUplinkInjectionAudioTrackFail()
151 format = new AudioFormat.Builder().setSampleRate(16000) in testGetCallUplinkInjectionAudioTrackFail()
154 track = mAudioManager.getCallUplinkInjectionAudioTrack(format); in testGetCallUplinkInjectionAudioTrackFail()
157 format = new AudioFormat.Builder().setSampleRate(16000) in testGetCallUplinkInjectionAudioTrackFail()
160 track = mAudioManager.getCallUplinkInjectionAudioTrack(format); in testGetCallUplinkInjectionAudioTrackFail()
178 AudioFormat format = new AudioFormat.Builder().setSampleRate(16000) in testGetCallUplinkInjectionAudioTrackSuccess() local
[all …]
/cts/hostsidetests/appcompat/compatchanges/src/com/android/cts/appcompat/
DAppCompatOverridesServiceTest.java100 String.format(OVERRIDE_FORMAT, OVERRIDE_PKG, true)); in testPackageOverrideFlagPackageInstalledAfterFlagAdded()
103 String.format(OVERRIDE_FORMAT, OVERRIDE_PKG, true)); in testPackageOverrideFlagPackageInstalledAfterFlagAdded()
121 String.format(OVERRIDE_FORMAT, OVERRIDE_PKG, true)); in testPackageOverrideFlagForAllVersions()
124 String.format(OVERRIDE_FORMAT, OVERRIDE_PKG, true)); in testPackageOverrideFlagForAllVersions()
132 String.format(OVERRIDE_FORMAT, OVERRIDE_PKG, true)); in testPackageOverrideFlagForAllVersions()
135 String.format(OVERRIDE_FORMAT, OVERRIDE_PKG, true)); in testPackageOverrideFlagForAllVersions()
146 String.format(OVERRIDE_WITH_VERSIONS_FORMAT, OVERRIDE_PKG, 2, Long.MAX_VALUE, in testPackageOverrideFlagForNewerVersion()
156 String.format(OVERRIDE_WITH_VERSIONS_FORMAT, OVERRIDE_PKG, 2, Long.MAX_VALUE, in testPackageOverrideFlagForNewerVersion()
160 String.format(OVERRIDE_FORMAT, OVERRIDE_PKG, true)); in testPackageOverrideFlagForNewerVersion()
171 String.format(OVERRIDE_WITH_VERSIONS_FORMAT, OVERRIDE_PKG, Long.MIN_VALUE, 1, in testPackageOverrideFlagForOlderVersion()
[all …]
/cts/tests/camera/src/android/hardware/camera2/cts/
DMultiResolutionImageReaderTest.java129 for (int format : multiResolutionOutputFormats) { in testMultiResolutionCaptureCharacteristics()
133 if (format != ImageFormat.RAW_SENSOR && format != ImageFormat.RAW10 in testMultiResolutionCaptureCharacteristics()
134 && format != ImageFormat.RAW12 && format != ImageFormat.RAW_PRIVATE) { in testMultiResolutionCaptureCharacteristics()
135 assertTrue(String.format("Camera %s: multi-resolution output format %d " in testMultiResolutionCaptureCharacteristics()
136 + "isn't a supported format", id, format), in testMultiResolutionCaptureCharacteristics()
137 CameraTestUtils.contains(outputFormats, format)); in testMultiResolutionCaptureCharacteristics()
141 multiResolutionMap.getOutputInfo(format); in testMultiResolutionCaptureCharacteristics()
142 assertTrue(String.format("Camera %s supports %d multi-resolution " in testMultiResolutionCaptureCharacteristics()
162 Size[] sizes = CameraTestUtils.getSupportedSizeForFormat(format, in testMultiResolutionCaptureCharacteristics()
164 assertTrue(String.format("Camera %s must " in testMultiResolutionCaptureCharacteristics()
[all …]
/cts/tests/tests/media/common/src/android/media/cts/
DNdkMediaCodec.java116 public void configure(MediaFormat format, int flags) { in configure() argument
117 configure(format, flags, null /* surface */); in configure()
121 public void configure(MediaFormat format, int flags, Surface surface) { in configure() argument
123 int width = format.getInteger(MediaFormat.KEY_WIDTH, -1); in configure()
124 int height = format.getInteger(MediaFormat.KEY_HEIGHT, -1); in configure()
125 int colorFormat = format.getInteger(MediaFormat.KEY_COLOR_FORMAT, -1); in configure()
126 int bitRate = format.getInteger(MediaFormat.KEY_BIT_RATE, -1); in configure()
127 int frameRate = format.getInteger(MediaFormat.KEY_FRAME_RATE, -1); in configure()
128 int iFrameInterval = format.getInteger(MediaFormat.KEY_I_FRAME_INTERVAL, -1); in configure()
130 format.getInteger(MediaFormat.KEY_LOW_LATENCY, -1) : -1; in configure()
[all …]
/cts/tests/tests/graphics/jni/
Dandroid_graphics_cts_BitmapTest.cpp43 int32_t format = is565 ? ANDROID_BITMAP_FORMAT_RGB_565 : ANDROID_BITMAP_FORMAT_RGBA_8888; in validateBitmapInfo() local
44 ASSERT_EQ(format, info.format); in validateBitmapInfo()
64 ASSERT_EQ(AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM, description.format); in fillRgbaHardwareBuffer()
86 info.format = ANDROID_BITMAP_FORMAT_NONE; in getFormat()
93 return info.format; in getFormat()
148 ASSERT_EQ(androidBitmapFormat, info.format); in testInfo()
259 static jboolean compress(JNIEnv* env, jclass, jobject jbitmap, jint format, jint quality, in compress() argument
270 err = AndroidBitmap_compress(&info, AndroidBitmap_getDataSpace(env, jbitmap), pixels, format, in compress()
324 mBadInfo.format = ANDROID_BITMAP_FORMAT_NONE; in next()
327 mBadInfo.format = ANDROID_BITMAP_FORMAT_RGBA_4444; in next()
[all …]
/cts/tests/surfacecontrol/jni/
DjniAssert.h23 static void fail(JNIEnv *env, const char *format, ...) { in fail() argument
26 va_start(args, format); in fail()
28 vasprintf(&msg, format, args); in fail()
38 #define ASSERT(condition, format, args...) \ argument
40 fail(env, format, ##args); \
/cts/tests/tests/view/jni/
DjniAssert.h23 static void fail(JNIEnv *env, const char *format, ...) { in fail() argument
26 va_start(args, format); in fail()
28 vasprintf(&msg, format, args); in fail()
38 #define ASSERT(condition, format, args...) \ argument
40 fail(env, format, ##args); \
/cts/tests/media/common/src/android/mediav2/common/cts/
DEncoderConfigParams.java256 public static String serializeMediaFormat(MediaFormat format) { in serializeMediaFormat() argument
258 java.util.Set<String> keys = format.getKeys(); in serializeMediaFormat()
260 int valueTypeForKey = format.getValueTypeForKey(key); in serializeMediaFormat()
264 msg.append(format.getInteger(key)).append(TOKEN_SEPARATOR); in serializeMediaFormat()
266 msg.append(format.getFloat(key)).append(TOKEN_SEPARATOR); in serializeMediaFormat()
268 msg.append(format.getString(key)).append(TOKEN_SEPARATOR); in serializeMediaFormat()
282 mMsg.append(String.format("media type : %s, ", mMediaType)); in toString()
284 mMsg.append(String.format("Sample rate : %d, ", mSampleRate)); in toString()
285 mMsg.append(String.format("Channel count : %d, ", mChannelCount)); in toString()
287 mMsg.append(String.format("Compression level : %d, ", mCompressionLevel)); in toString()
[all …]
/cts/tests/tests/telecom-apps/Utils/src/android/telecom/cts/apps/
DBindUtils.java47 Log.i(TAG, String.format("printBoundTestApps: [%s] is currently bound", testAppName)); in printBoundTestApps()
62 Log.i(TAG, String.format("onServiceConnected: ComponentName=[%s]", name)); in onServiceConnected()
68 Log.i(TAG, String.format("onServiceDisconnected: ComponentName=[%s]", name)); in onServiceDisconnected()
86 Log.i(TAG, String.format("bindToApp: wait for %s to signal onBind is complete ", appName)); in bindToApp()
102 Log.i(TAG, String.format("bindToApp: %s took %d milliseconds signal it was bound", in bindToApp()
114 Log.i(TAG, String.format("unbindFromApplication: applicationName=[%s]", name)); in unbindFromApp()
116 fail(String.format("cannot find the service binder for application=[%s]", name)); in unbindFromApp()
122 Log.i(TAG, String.format("unbindFromApp: wait for %s to signal onUnbind is complete ", in unbindFromApp()
138 Log.i(TAG, String.format("unbindFromApp: %s took %d milliseconds to signal it was " in unbindFromApp()
143 Log.e(TAG, String.format("unbindFromApplication: app=[%s], e=[%s]", name, e)); in unbindFromApp()
[all …]
/cts/hostsidetests/multiuser/src/android/host/multiuser/
DDpcCommander.java72 private CommandResult runDpcCmd(String format, Object... args) in runDpcCmd() argument
75 String cmd = String.format(format, args); in runDpcCmd()
87 private CommandResult dumpDpc(String format, Object... args) in dumpDpc() argument
90 String.format(format, args)); in dumpDpc()
96 private CommandResult runShellCmd(String format, Object... args) in runShellCmd() argument
98 String command = String.format(format, args); in runShellCmd()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0470/
Dpoc.cpp56 AMediaFormat *format = AMediaFormat_new(); in main() local
57 if (!format) { in main()
62 AMediaFormat_setString(format, AMEDIAFORMAT_KEY_MIME, "video/av01"); in main()
63 AMediaFormat_setInt32(format, AMEDIAFORMAT_KEY_MAX_INPUT_SIZE, FILE_SIZE); in main()
64 AMediaFormat_setInt32(format, AMEDIAFORMAT_KEY_WIDTH, VIDEO_MAX_WIDTH); in main()
65 AMediaFormat_setInt32(format, AMEDIAFORMAT_KEY_HEIGHT, VIDEO_MAX_HEIGHT); in main()
66 AMediaCodec_configure(codec, format, nullptr, nullptr, isEncoder); in main()
124 AMediaFormat_delete(format); in main()
/cts/tests/tests/media/decoder/jni/
Dnative-media-jni.cpp145 AMediaFormat* format = mFormats.front(); in ~CallbackData() local
147 AMediaFormat_delete(format); in ~CallbackData()
176 void addOutputFormat(AMediaFormat *format) { in addOutputFormat() argument
179 mFormats.push(format); in addOutputFormat()
183 int32_t getOutput(AMediaCodecBufferInfo *bufferInfo, AMediaFormat **format) { in getOutput() argument
194 *format = mFormats.front(); in getOutput()
227 AMediaFormat *format) { in OnFormatChangedCB() argument
228 ALOGV("OnFormatChangedCB: format(%s)", AMediaFormat_toString(format)); in OnFormatChangedCB()
230 callbackData->addOutputFormat(format); in OnFormatChangedCB()
257 static int checksum(const uint8_t *in, int len, AMediaFormat *format) { in checksum() argument
[all …]
/cts/tests/tests/media/decoder/src/android/media/decoder/cts/
DHDRDecoderTest.java190 MediaFormat format = new MediaFormat(); in prepareParamList() local
191 format.setString(MediaFormat.KEY_MIME, mediaType); in prepareParamList()
192 format.setInteger(MediaFormat.KEY_PROFILE, getHdrProfile(mediaType, dynamic)); in prepareParamList()
194 String[] decoderNames = MediaUtils.getDecoderNames(format); in prepareParamList()
269 MediaFormat format = null; in testHdrMetadata() local
272 format = mExtractor.getTrackFormat(i); in testHdrMetadata()
273 if (format.getString(MediaFormat.KEY_MIME).startsWith("video/")) { in testHdrMetadata()
280 format != null && trackIndex >= 0); in testHdrMetadata()
282 verifyHdrStaticInfo("Extractor failed to extract static info", format, in testHdrMetadata()
287 Log.v(TAG, "format " + format); in testHdrMetadata()
[all …]
/cts/tools/cts-media-preparer-app/src/android/mediastress/cts/preconditions/app/
DMediaPreparerAppTest.java82 return String.format("%dx%d", width, height); in toString()
101 for (MediaFormat format : stringsToFormats(config.getValues(key))) { in testGetResolutions()
103 width = Math.max(width, format.getInteger(MediaFormat.KEY_WIDTH)); in testGetResolutions()
104 height = Math.max(height, format.getInteger(MediaFormat.KEY_HEIGHT)); in testGetResolutions()
114 for (MediaFormat format : stringsToFormats(config.getValues(key))) { in testGetResolutions()
115 supported &= MediaUtils.checkDecoderForFormat(format); in testGetResolutions()
152 MediaFormat format = new MediaFormat(); in parseTrackFormat() local
153 format.setString(MediaFormat.KEY_MIME, ""); in parseTrackFormat()
162 format.setInteger(k, Integer.parseInt(v)); in parseTrackFormat()
164 format.setString(k, v); in parseTrackFormat()
[all …]

12345678910>>...45