Lines Matching refs:format

53     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
326 RETURN_IF_FALSE(AMediaFormat_getInt32(format, AMEDIAFORMAT_KEY_SAMPLE_RATE, &mSampleRate), in initFormat()
328 RETURN_IF_FALSE(AMediaFormat_getInt32(format, AMEDIAFORMAT_KEY_CHANNEL_COUNT, &mChannels), in initFormat()
331 RETURN_IF_FALSE(AMediaFormat_getInt32(format, AMEDIAFORMAT_KEY_WIDTH, &mWidth), in initFormat()
333 RETURN_IF_FALSE(AMediaFormat_getInt32(format, AMEDIAFORMAT_KEY_HEIGHT, &mHeight), in initFormat()
338 RETURN_IF_FALSE(AMediaFormat_getInt32(format, AMEDIAFORMAT_KEY_MAX_B_FRAMES, in initFormat()
343 RETURN_IF_FALSE(AMediaFormat_getInt32(format, COMPATIBLE_AMEDIAFORMAT_KEY_MAX_B_FRAMES, in initFormat()
348 RETURN_IF_FALSE(AMediaFormat_getInt32(format, AMEDIAFORMAT_KEY_FRAME_RATE, &mDefFrameRate), in initFormat()
350 RETURN_IF_FALSE(AMediaFormat_getInt32(format, AMEDIAFORMAT_KEY_COLOR_FORMAT, &mColorFormat), in initFormat()
357 AMediaFormat* format, OutputManager* ref) { in encodeToMemory() argument
366 if (!configureCodec(format, false, true, true)) return false; in encodeToMemory()
378 void CodecEncoderTest::forceSyncFrame(AMediaFormat* format) { in forceSyncFrame() argument
379 AMediaFormat_setInt32(format, TBD_AMEDIACODEC_PARAMETER_KEY_REQUEST_SYNC_FRAME, 0); in forceSyncFrame()
381 AMediaCodec_setParameters(mCodec, format); in forceSyncFrame()
384 void CodecEncoderTest::updateBitrate(AMediaFormat* format, int bitrate) { in updateBitrate() argument
385 AMediaFormat_setInt32(format, TBD_AMEDIACODEC_PARAMETER_KEY_VIDEO_BITRATE, bitrate); in updateBitrate()
387 AMediaCodec_setParameters(mCodec, format); in updateBitrate()
399 for (auto format : mFormats) { in testSimpleEncode() local
400 RETURN_IF_NULL(format, in testSimpleEncode()
419 if (!configureCodec(format, isAsync, eosType, true)) return false; in testSimpleEncode()
442 auto format = mFormats[1]; in testReconfigure() local
443 RETURN_IF_NULL(format, in testReconfigure()
445 RETURN_IF_FALSE(encodeToMemory(srcPath, encoder, INT32_MAX, format, configRef), in testReconfigure()
447 srcPath, encoder, AMediaFormat_toString(format))) in testReconfigure()
449 auto format = mFormats[0]; in testReconfigure() local
450 RETURN_IF_NULL(format, std::string{"encountered error during deserialization of media format"}) in testReconfigure()
452 RETURN_IF_FALSE(encodeToMemory(srcPath, encoder, INT32_MAX, format, ref), in testReconfigure()
454 srcPath, encoder, AMediaFormat_toString(format))) in testReconfigure()
465 if (!configureCodec(format, isAsync, true, true)) return false; in testReconfigure()
467 if (!reConfigureCodec(format, !isAsync, false, true)) return false; in testReconfigure()
471 if (!reConfigureCodec(format, !isAsync, false, true)) return false; in testReconfigure()
476 if (!reConfigureCodec(format, isAsync, true, true)) return false; in testReconfigure()
492 if (!reConfigureCodec(format, !isAsync, false, true)) return false; in testReconfigure()
530 AMediaFormat* format = mFormats[0]; in testOnlyEos() local
531 RETURN_IF_NULL(format, std::string{"encountered error during deserialization of media format"}) in testOnlyEos()
541 if (!configureCodec(format, isAsync, false, true)) return false; in testOnlyEos()
559 AMediaFormat* format = mFormats[0]; in testSetForceSyncFrame()
560 RETURN_IF_NULL(format, std::string{"encountered error during deserialization of media format"}) in testSetForceSyncFrame()
561 RETURN_IF_FALSE(AMediaFormat_getInt32(format, AMEDIAFORMAT_KEY_FRAME_RATE, &mDefFrameRate), in testSetForceSyncFrame()
579 if (!configureCodec(format, isAsync, false, true)) return false; in testSetForceSyncFrame()
622 AMediaFormat* format = mFormats[0]; in testAdaptiveBitRate()
623 RETURN_IF_NULL(format, std::string{"encountered error during deserialization of media format"}) in testAdaptiveBitRate()
624 RETURN_IF_FALSE(AMediaFormat_getInt32(format, AMEDIAFORMAT_KEY_FRAME_RATE, &mDefFrameRate), in testAdaptiveBitRate()
643 if (!configureCodec(format, isAsync, false, true)) return false; in testAdaptiveBitRate()
647 RETURN_IF_FALSE(AMediaFormat_getInt32(format, AMEDIAFORMAT_KEY_BIT_RATE, &bitrate), in testAdaptiveBitRate()