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

Commit e7616724 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android Git Automerger
Browse files

am 2b63384b: Merge "Serialize calls to getFrameAtTime in the mediaserver" into mnc-dev

* commit '2b63384b':
  Serialize calls to getFrameAtTime in the mediaserver
parents 521864e7 2b63384b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -188,10 +188,13 @@ status_t MetadataRetrieverClient::setDataSource(
    return ret;
}

Mutex MetadataRetrieverClient::sLock;

sp<IMemory> MetadataRetrieverClient::getFrameAtTime(int64_t timeUs, int option)
{
    ALOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option);
    Mutex::Autolock lock(mLock);
    Mutex::Autolock glock(sLock);
    mThumbnail.clear();
    if (mRetriever == NULL) {
        ALOGE("retriever is not initialized");
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ private:
    virtual ~MetadataRetrieverClient();

    mutable Mutex                          mLock;
    static  Mutex                          sLock;
    sp<MediaMetadataRetrieverBase>         mRetriever;
    pid_t                                  mPid;