Fix videos app bandwidth accounting for streaming over 4G

Attribute traffic on socket descriptors to UID of videos app

Multi-repository commit, see also changes in frameworks/base/media.

Includes Widevine library version 4.5.0.6153

Change-Id: I5ddf1b7b758edc82d48a788fc30616d90cab4bd0
related-to-bug: 5434244
This commit is contained in:
Jeff Tinker
2012-03-06 17:36:46 -08:00
parent 8f4420fcea
commit 835420c31d
9 changed files with 62 additions and 12 deletions

View File

@@ -133,6 +133,11 @@ class WVSession;
//
typedef void (*WVDecryptCallback)(WVEsSelector esType, void* input, void* output, size_t length, int key);
// Provide info on socket open/close operations for bandwidth attribution
// status: {0=open, 1=close}
typedef void (*WVSocketInfoCallback)(int fd, int status, void *context);
struct WVCallbacks {
void (*pushData)(unsigned short port, void *buffer, size_t length);
void (*response)(WVSession *session, const std::string &response);
@@ -144,6 +149,9 @@ struct WVCallbacks {
int (*getKeyboxPath)(char* path, size_t size);
WVDecryptCallback decrypt;
// publish info about descriptors used for streaming for accounting purposes
WVSocketInfoCallback socketInfo;
};
//
@@ -425,16 +433,16 @@ WV_CheckBandwidth(const std::string &url, unsigned long *bandwidth, const WVProx
//This form is deprecated and may be removed in a future release
CLIENT_API WVStatus
WV_Setup(WVSession *&session, const std::string &url,
const std::string &transport, WVCredentials &credentials,
WVOutputFormat outputFormat = WV_OutputFormat_PS,
unsigned long bufferSize = 10 * 1024 * 1024);
const std::string &transport, WVCredentials &credentials,
WVOutputFormat outputFormat = WV_OutputFormat_PS,
unsigned long bufferSize = 10 * 1024 * 1024, void *context = NULL);
// Setup using a proxy
CLIENT_API WVStatus
WV_Setup(WVSession *&session, const std::string &url,
const std::string &transport, WVCredentials &credentials,
WVProxySettings &proxy, WVOutputFormat outputFormat = WV_OutputFormat_PS,
unsigned long bufferSize = 10 * 1024 * 1024);
const std::string &transport, WVCredentials &credentials,
WVProxySettings &proxy, WVOutputFormat outputFormat = WV_OutputFormat_PS,
unsigned long bufferSize = 10 * 1024 * 1024, void *context = NULL);
//
// An alternate form of WV_Setup that receives data from a file source instead of accessing