Loading media/libstagefright/ACodec.cpp +7 −12 Original line number Diff line number Diff line Loading @@ -171,11 +171,7 @@ static sp<DataConverter> getCopyConverter() { } struct CodecObserver : public BnOMXObserver { CodecObserver() {} void setNotificationMessage(const sp<AMessage> &msg) { mNotify = msg; } explicit CodecObserver(const sp<AMessage> &msg) : mNotify(msg) {} // from IOMXObserver virtual void onMessages(const std::list<omx_message> &messages) { Loading Loading @@ -251,7 +247,7 @@ protected: virtual ~CodecObserver() {} private: sp<AMessage> mNotify; const sp<AMessage> mNotify; DISALLOW_EVIL_CONSTRUCTORS(CodecObserver); }; Loading Loading @@ -6630,7 +6626,8 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) { CHECK(mCodec->mOMXNode == NULL); sp<AMessage> notify = new AMessage(kWhatOMXDied, mCodec); sp<AMessage> notify = new AMessage(kWhatOMXMessageList, mCodec); notify->setInt32("generation", mCodec->mNodeGeneration + 1); sp<RefBase> obj; CHECK(msg->findObject("codecInfo", &obj)); Loading @@ -6645,7 +6642,7 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) { AString componentName; CHECK(msg->findString("componentName", &componentName)); sp<CodecObserver> observer = new CodecObserver; sp<CodecObserver> observer = new CodecObserver(notify); sp<IOMX> omx; sp<IOMXNode> omxNode; Loading Loading @@ -6676,9 +6673,7 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) { mDeathNotifier.clear(); } notify = new AMessage(kWhatOMXMessageList, mCodec); notify->setInt32("generation", ++mCodec->mNodeGeneration); observer->setNotificationMessage(notify); ++mCodec->mNodeGeneration; mCodec->mComponentName = componentName; mCodec->mRenderTracker.setComponentName(componentName); Loading Loading @@ -8573,7 +8568,7 @@ status_t ACodec::queryCapabilities( } sp<IOMX> omx = client.interface(); sp<CodecObserver> observer = new CodecObserver; sp<CodecObserver> observer = new CodecObserver(new AMessage); sp<IOMXNode> omxNode; err = omx->allocateNode(name, observer, &omxNode); Loading Loading
media/libstagefright/ACodec.cpp +7 −12 Original line number Diff line number Diff line Loading @@ -171,11 +171,7 @@ static sp<DataConverter> getCopyConverter() { } struct CodecObserver : public BnOMXObserver { CodecObserver() {} void setNotificationMessage(const sp<AMessage> &msg) { mNotify = msg; } explicit CodecObserver(const sp<AMessage> &msg) : mNotify(msg) {} // from IOMXObserver virtual void onMessages(const std::list<omx_message> &messages) { Loading Loading @@ -251,7 +247,7 @@ protected: virtual ~CodecObserver() {} private: sp<AMessage> mNotify; const sp<AMessage> mNotify; DISALLOW_EVIL_CONSTRUCTORS(CodecObserver); }; Loading Loading @@ -6630,7 +6626,8 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) { CHECK(mCodec->mOMXNode == NULL); sp<AMessage> notify = new AMessage(kWhatOMXDied, mCodec); sp<AMessage> notify = new AMessage(kWhatOMXMessageList, mCodec); notify->setInt32("generation", mCodec->mNodeGeneration + 1); sp<RefBase> obj; CHECK(msg->findObject("codecInfo", &obj)); Loading @@ -6645,7 +6642,7 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) { AString componentName; CHECK(msg->findString("componentName", &componentName)); sp<CodecObserver> observer = new CodecObserver; sp<CodecObserver> observer = new CodecObserver(notify); sp<IOMX> omx; sp<IOMXNode> omxNode; Loading Loading @@ -6676,9 +6673,7 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) { mDeathNotifier.clear(); } notify = new AMessage(kWhatOMXMessageList, mCodec); notify->setInt32("generation", ++mCodec->mNodeGeneration); observer->setNotificationMessage(notify); ++mCodec->mNodeGeneration; mCodec->mComponentName = componentName; mCodec->mRenderTracker.setComponentName(componentName); Loading Loading @@ -8573,7 +8568,7 @@ status_t ACodec::queryCapabilities( } sp<IOMX> omx = client.interface(); sp<CodecObserver> observer = new CodecObserver; sp<CodecObserver> observer = new CodecObserver(new AMessage); sp<IOMXNode> omxNode; err = omx->allocateNode(name, observer, &omxNode); Loading