diff options
author | Hangyu Kuang <hkuang@google.com> | 2019-05-30 18:11:41 -0700 |
---|---|---|
committer | Hangyu Kuang <hkuang@google.com> | 2019-05-30 19:35:27 -0700 |
commit | ed5d5a7bec931314779486a0ced74aa5d1ffd9ba (patch) | |
tree | 7eb5a1ea9d78a51a18daa85c45432f3f3d7ed374 /media/eco/ECOSession.cpp | |
parent | f1b2c7d04956b98feeae4365c63f5b2e23816bcd (diff) | |
download | av-ed5d5a7bec931314779486a0ced74aa5d1ffd9ba.tar.gz |
[ECOService]: Handle output width/height from encoder.
Bug: 117877984
Test: Camera recording.
Change-Id: I36a655dd905c1e14aec052f95af17f9b4e771910
Diffstat (limited to 'media/eco/ECOSession.cpp')
-rw-r--r-- | media/eco/ECOSession.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
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<int32_t>(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<int32_t>(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<int32_t>(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; |