diff options
Diffstat (limited to 'cmds')
| -rw-r--r-- | cmds/stagefright/SimplePlayer.cpp | 14 | ||||
| -rw-r--r-- | cmds/stagefright/sf2.cpp | 12 | 
2 files changed, 13 insertions, 13 deletions
diff --git a/cmds/stagefright/SimplePlayer.cpp b/cmds/stagefright/SimplePlayer.cpp index 4b2f980..40762e5 100644 --- a/cmds/stagefright/SimplePlayer.cpp +++ b/cmds/stagefright/SimplePlayer.cpp @@ -59,14 +59,14 @@ status_t PostAndAwaitResponse(      return err;  }  status_t SimplePlayer::setDataSource(const char *path) { -    sp<AMessage> msg = new AMessage(kWhatSetDataSource, id()); +    sp<AMessage> msg = new AMessage(kWhatSetDataSource, this);      msg->setString("path", path);      sp<AMessage> response;      return PostAndAwaitResponse(msg, &response);  }  status_t SimplePlayer::setSurface(const sp<IGraphicBufferProducer> &bufferProducer) { -    sp<AMessage> msg = new AMessage(kWhatSetSurface, id()); +    sp<AMessage> msg = new AMessage(kWhatSetSurface, this);      sp<Surface> surface;      if (bufferProducer != NULL) { @@ -81,25 +81,25 @@ status_t SimplePlayer::setSurface(const sp<IGraphicBufferProducer> &bufferProduc  }  status_t SimplePlayer::prepare() { -    sp<AMessage> msg = new AMessage(kWhatPrepare, id()); +    sp<AMessage> msg = new AMessage(kWhatPrepare, this);      sp<AMessage> response;      return PostAndAwaitResponse(msg, &response);  }  status_t SimplePlayer::start() { -    sp<AMessage> msg = new AMessage(kWhatStart, id()); +    sp<AMessage> msg = new AMessage(kWhatStart, this);      sp<AMessage> response;      return PostAndAwaitResponse(msg, &response);  }  status_t SimplePlayer::stop() { -    sp<AMessage> msg = new AMessage(kWhatStop, id()); +    sp<AMessage> msg = new AMessage(kWhatStop, this);      sp<AMessage> response;      return PostAndAwaitResponse(msg, &response);  }  status_t SimplePlayer::reset() { -    sp<AMessage> msg = new AMessage(kWhatReset, id()); +    sp<AMessage> msg = new AMessage(kWhatReset, this);      sp<AMessage> response;      return PostAndAwaitResponse(msg, &response);  } @@ -382,7 +382,7 @@ status_t SimplePlayer::onStart() {      mStartTimeRealUs = -1ll; -    sp<AMessage> msg = new AMessage(kWhatDoMoreStuff, id()); +    sp<AMessage> msg = new AMessage(kWhatDoMoreStuff, this);      msg->setInt32("generation", ++mDoMoreStuffGeneration);      msg->post(); diff --git a/cmds/stagefright/sf2.cpp b/cmds/stagefright/sf2.cpp index 0f729a3..172dc36 100644 --- a/cmds/stagefright/sf2.cpp +++ b/cmds/stagefright/sf2.cpp @@ -72,7 +72,7 @@ struct Controller : public AHandler {      }      void startAsync() { -        (new AMessage(kWhatStart, id()))->post(); +        (new AMessage(kWhatStart, this))->post();      }  protected: @@ -100,7 +100,7 @@ protected:          if (ctrlc) {              printf("\n");              printStatistics(); -            (new AMessage(kWhatStop, id()))->post(); +            (new AMessage(kWhatStop, this))->post();              ctrlc = false;          }          switch (msg->what()) { @@ -149,7 +149,7 @@ protected:                  mDecodeLooper->registerHandler(mCodec);                  mCodec->setNotificationMessage( -                        new AMessage(kWhatCodecNotify, id())); +                        new AMessage(kWhatCodecNotify, this));                  sp<AMessage> format = makeFormat(mSource->getFormat()); @@ -168,7 +168,7 @@ protected:                  mFinalResult = OK;                  mSeekState = SEEK_NONE; -                // (new AMessage(kWhatSeek, id()))->post(5000000ll); +                // (new AMessage(kWhatSeek, this))->post(5000000ll);                  break;              } @@ -225,12 +225,12 @@ protected:                      printf((what == CodecBase::kWhatEOS) ? "$\n" : "E\n");                      printStatistics(); -                    (new AMessage(kWhatStop, id()))->post(); +                    (new AMessage(kWhatStop, this))->post();                  } else if (what == CodecBase::kWhatFlushCompleted) {                      mSeekState = SEEK_FLUSH_COMPLETED;                      mCodec->signalResume(); -                    (new AMessage(kWhatSeek, id()))->post(5000000ll); +                    (new AMessage(kWhatSeek, this))->post(5000000ll);                  } else if (what == CodecBase::kWhatOutputFormatChanged) {                  } else if (what == CodecBase::kWhatShutdownCompleted) {                      mDecodeLooper->unregisterHandler(mCodec->id());  | 
