From ed5d5a7bec931314779486a0ced74aa5d1ffd9ba Mon Sep 17 00:00:00 2001 From: Hangyu Kuang Date: Thu, 30 May 2019 18:11:41 -0700 Subject: [ECOService]: Handle output width/height from encoder. Bug: 117877984 Test: Camera recording. Change-Id: I36a655dd905c1e14aec052f95af17f9b4e771910 --- media/eco/ECOSession.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'media/eco/ECOSession.cpp') diff --git a/media/eco/ECOSession.cpp b/media/eco/ECOSession.cpp index 811e874..a7b919f 100644 --- a/media/eco/ECOSession.cpp +++ b/media/eco/ECOSession.cpp @@ -209,13 +209,25 @@ void ECOSession::processSessionStats(const ECOData& stats) { if (width != mWidth) { ECOLOGW("Codec width: %d, expected: %d", width, mWidth); } - ECOLOGV("codec width is %d", width); + ECOLOGV("codec input width is %d", width); } else if (!key.compare(ENCODER_INPUT_HEIGHT)) { int32_t height = std::get(value); if (height != mHeight) { ECOLOGW("Codec height: %d, expected: %d", height, mHeight); } - ECOLOGV("codec height is %d", height); + ECOLOGV("codec input height is %d", height); + } else if (!key.compare(ENCODER_OUTPUT_WIDTH)) { + mOutputWidth = std::get(value); + if (mOutputWidth != mWidth) { + ECOLOGW("Codec output width: %d, expected: %d", mOutputWidth, mWidth); + } + ECOLOGV("codec output width is %d", mOutputWidth); + } else if (!key.compare(ENCODER_OUTPUT_HEIGHT)) { + mOutputHeight = std::get(value); + if (mOutputHeight != mHeight) { + ECOLOGW("Codec output height: %d, expected: %d", mOutputHeight, mHeight); + } + ECOLOGV("codec output height is %d", mOutputHeight); } else { ECOLOGW("Unknown session stats key %s from provider.", key.c_str()); continue; -- cgit v1.2.3