diff options
author | Hangyu Kuang <hkuang@google.com> | 2019-04-29 18:12:16 -0700 |
---|---|---|
committer | Hangyu Kuang <hkuang@google.com> | 2019-05-01 13:27:35 -0700 |
commit | b8dc3b162832602c976629291f26d8a2374d6280 (patch) | |
tree | d96d046ef6a235b713eb14b656ca87be87471444 /media/eco/ECOSession.cpp | |
parent | 546bfe07fce6fa9712edb2fbfa6a983cd34021b1 (diff) | |
download | av-b8dc3b162832602c976629291f26d8a2374d6280.tar.gz |
[ECOService] Add debugString functionality to ECOData.
The ECOData could now be dumped to a std::string. Sample output:
processSessionStats ECOData(type = Stats) = {
int32_t encoder-target-bitrate-bps = 22000000, int32_t encoder-level = 65536, float encoder-framerate-fps = 30.000000, int32_t encoder-profile = 8, int32_t encoder-kfi-frames = 30, int32_t encoder-type = 1, string stats-type = stats-type-session}
Bug: 117877984
Test: Unit test.
Change-Id: Ia6e018f2b46b64d4f8a1e00b1c4e41d123061ddb
Diffstat (limited to 'media/eco/ECOSession.cpp')
-rw-r--r-- | media/eco/ECOSession.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/media/eco/ECOSession.cpp b/media/eco/ECOSession.cpp index 319bac5..eefc3d6 100644 --- a/media/eco/ECOSession.cpp +++ b/media/eco/ECOSession.cpp @@ -114,6 +114,8 @@ void ECOSession::run() { } bool ECOSession::processStats(const ECOData& stats) { + ECOLOGV("%s: receive stats: %s", __FUNCTION__, stats.debugString().c_str()); + if (stats.getDataType() != ECOData::DATA_TYPE_STATS) { ECOLOGE("Invalid stats. ECOData with type: %s", stats.getDataTypeString().c_str()); return false; @@ -191,6 +193,7 @@ bool ECOSession::processSessionStats(const ECOData& stats) { } if (mListener != nullptr) { + ECOLOGV("%s: publish info: %s", __FUNCTION__, info.debugString().c_str()); mListener->onNewInfo(info); } |