Adds support for GetPropertyByteArray to return a serialized set of metrics to the caller. This should be the last part of the widevine plugin changes that fix the referenced bug. More changes are coming on the MediaDrm side. This is a merge of wvgerrit/28422 I intend to submit 2048751, 2048750, and 2048509 together. Bug: 36217927 Test: Added additional unit tests for affected code. Change-Id: I2618c2be48d7d780127e35f237e2276efd080879
33 lines
662 B
C++
33 lines
662 B
C++
// Copyright 2017 Google Inc. All Rights Reserved.
|
|
|
|
#ifndef CDM_AMI_ADAPTER_H_
|
|
#define CDM_AMI_ADAPTER_H_
|
|
|
|
#include <stdint.h>
|
|
#include <string>
|
|
|
|
#include <media/MediaAnalyticsItem.h>
|
|
|
|
namespace wvcdm {
|
|
|
|
class AmiAdapter {
|
|
|
|
public:
|
|
AmiAdapter();
|
|
AmiAdapter(int64_t parent);
|
|
~AmiAdapter();
|
|
|
|
void UpdateString(const std::string& metric_id, const std::string& value);
|
|
void UpdateInt32(const std::string& metric_id, int32_t value);
|
|
void UpdateInt64(const std::string& metric_id, int64_t value);
|
|
void UpdateDouble(const std::string& metric_id, double value);
|
|
|
|
private:
|
|
android::MediaAnalyticsItem analytics_item_;
|
|
|
|
};
|
|
|
|
} // namespace wvcdm
|
|
|
|
#endif
|