Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ad23f7d authored by Jeff Tinker's avatar Jeff Tinker
Browse files

Fix videos app bandwidth accounting for 4G streaming

Register the app uid with the WV extractor so it can
attribute bandwidth usage to the proper process.

Multi-repository commit, also changes in vendor/widevine

Change-Id: I42395fd08bf0bfc7e224745f820a714400066456
related-to-bug: 5434244
parent d7c845c3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2111,6 +2111,8 @@ status_t AwesomePlayer::finishSetDataSource_l() {

        mWVMExtractor = new WVMExtractor(dataSource);
        mWVMExtractor->setAdaptiveStreamingMode(true);
        if (mUIDValid)
            mWVMExtractor->setUID(mUID);
        extractor = mWVMExtractor;
    } else {
        extractor = MediaExtractor::Create(
+6 −0
Original line number Diff line number Diff line
@@ -123,6 +123,12 @@ void WVMExtractor::setAdaptiveStreamingMode(bool adaptive) {
    }
}

void WVMExtractor::setUID(uid_t uid) {
    if (mImpl != NULL) {
        mImpl->setUID(uid);
    }
}

bool SniffWVM(
    const sp<DataSource> &source, String8 *mimeType, float *confidence,
        sp<AMessage> *) {
+3 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ public:

    virtual int64_t getCachedDurationUs(status_t *finalStatus) = 0;
    virtual void setAdaptiveStreamingMode(bool adaptive) = 0;
    virtual void setUID(uid_t uid) = 0;
};

class WVMExtractor : public MediaExtractor {
@@ -60,6 +61,8 @@ public:
    // is used.
    void setAdaptiveStreamingMode(bool adaptive);

    void setUID(uid_t uid);

    static bool getVendorLibHandle();

protected: