@@ -446,7 +446,7 @@ status_t ACodec::allocateBuffersOnPort(OMX_U32 portIndex) {
446446 notify->setPointer (name.c_str (), mBuffers [portIndex][i].mBufferID );
447447
448448 name = StringPrintf (" data_%d" , i);
449- notify->setObject (name.c_str (), mBuffers [portIndex][i].mData );
449+ notify->setBuffer (name.c_str (), mBuffers [portIndex][i].mData );
450450 }
451451
452452 notify->post ();
@@ -2142,7 +2142,7 @@ void ACodec::BaseState::postFillThisBuffer(BufferInfo *info) {
21422142 notify->setPointer (" buffer-id" , info->mBufferID );
21432143
21442144 info->mData ->meta ()->clear ();
2145- notify->setObject (" buffer" , info->mData );
2145+ notify->setBuffer (" buffer" , info->mData );
21462146
21472147 sp<AMessage> reply = new AMessage (kWhatInputBufferFilled , mCodec ->id ());
21482148 reply->setPointer (" buffer-id" , info->mBufferID );
@@ -2158,23 +2158,21 @@ void ACodec::BaseState::onInputBufferFilled(const sp<AMessage> &msg) {
21582158 IOMX::buffer_id bufferID;
21592159 CHECK (msg->findPointer (" buffer-id" , &bufferID));
21602160
2161- sp<RefBase> obj ;
2161+ sp<ABuffer> buffer ;
21622162 int32_t err = OK;
21632163 bool eos = false ;
21642164
2165- if (!msg->findObject (" buffer" , &obj )) {
2165+ if (!msg->findBuffer (" buffer" , &buffer )) {
21662166 CHECK (msg->findInt32 (" err" , &err));
21672167
21682168 ALOGV (" [%s] saw error %d instead of an input buffer" ,
21692169 mCodec ->mComponentName .c_str (), err);
21702170
2171- obj .clear ();
2171+ buffer .clear ();
21722172
21732173 eos = true ;
21742174 }
21752175
2176- sp<ABuffer> buffer = static_cast <ABuffer *>(obj.get ());
2177-
21782176 int32_t tmp;
21792177 if (buffer != NULL && buffer->meta ()->findInt32 (" eos" , &tmp) && tmp) {
21802178 eos = true ;
@@ -2374,7 +2372,7 @@ bool ACodec::BaseState::onOMXFillBufferDone(
23742372 sp<AMessage> notify = mCodec ->mNotify ->dup ();
23752373 notify->setInt32 (" what" , ACodec::kWhatDrainThisBuffer );
23762374 notify->setPointer (" buffer-id" , info->mBufferID );
2377- notify->setObject (" buffer" , info->mData );
2375+ notify->setBuffer (" buffer" , info->mData );
23782376 notify->setInt32 (" flags" , flags);
23792377
23802378 sp<AMessage> reply =
0 commit comments