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

Commit 8da33ece authored by Christopher R. Palmer's avatar Christopher R. Palmer
Browse files

stagefright: Allow devices to use older widevine blobs

Devices may have widevine plugins built with an older MediaSource
interface.  Trying to use them fails because of the change in
interface in the object (it calls the destructor in the blob when
attempting to call setBuffers).

This commit restores the interface for ! QCOM_HARDWARE devices.

Fixes: JIRA-4944.

Change-Id: I4ce24a16f3eceab0c4def4b09850ed569eb392ab
(cherry picked from commit 82f7bb00)
parent 5b1b21e7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -59,7 +59,9 @@ struct MediaSource : public virtual RefBase {
    virtual status_t read(
            MediaBuffer **buffer, const ReadOptions *options = NULL) = 0;

#ifdef QCOM_HARDWARE
    virtual void notifyError(status_t err) {}
#endif

    // Options that modify read() behaviour. The default is to
    // a) not request a seek
@@ -117,6 +119,11 @@ protected:
private:
    MediaSource(const MediaSource &);
    MediaSource &operator=(const MediaSource &);

#ifndef QCOM_HARDWARE
public:
    virtual void notifyError(status_t err) {}
#endif
};

}  // namespace android