summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2014-11-14 07:58:25 -0800
committerMarco Nelissen <marcone@google.com>2014-11-17 10:05:07 -0800
commitf888020c6e2735624f2b2a30e72aca24e17b8b4d (patch)
tree76d92b7a91a4bebd4e84d6afdc2ef4a2e4943df8 /media/libstagefright
parentd02641098b16df2fd4cd32b72a30eb6f3b64e12b (diff)
downloadframeworks_av-f888020c6e2735624f2b2a30e72aca24e17b8b4d.zip
frameworks_av-f888020c6e2735624f2b2a30e72aca24e17b8b4d.tar.gz
frameworks_av-f888020c6e2735624f2b2a30e72aca24e17b8b4d.tar.bz2
Update calls to IInterface::asBinder()
to use the new static version. Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a Conflicts: media/libmedia/IAudioFlinger.cpp media/libmedia/IMediaPlayer.cpp media/libstagefright/CameraSource.cpp
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/ACodec.cpp4
-rw-r--r--media/libstagefright/CameraSource.cpp6
-rw-r--r--media/libstagefright/OMXClient.cpp2
-rw-r--r--media/libstagefright/TimedEventQueue.cpp2
-rw-r--r--media/libstagefright/omx/OMX.cpp8
5 files changed, 11 insertions, 11 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index fcc3a5a..eff5d77 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -4398,7 +4398,7 @@ void ACodec::UninitializedState::stateEntered() {
ALOGV("Now uninitialized");
if (mDeathNotifier != NULL) {
- mCodec->mOMX->asBinder()->unlinkToDeath(mDeathNotifier);
+ IInterface::asBinder(mCodec->mOMX)->unlinkToDeath(mDeathNotifier);
mDeathNotifier.clear();
}
@@ -4484,7 +4484,7 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
sp<AMessage> notify = new AMessage(kWhatOMXDied, mCodec->id());
mDeathNotifier = new DeathNotifier(notify);
- if (omx->asBinder()->linkToDeath(mDeathNotifier) != OK) {
+ if (IInterface::asBinder(omx)->linkToDeath(mDeathNotifier) != OK) {
// This was a local binder, if it dies so do we, we won't care
// about any notifications in the afterlife.
mDeathNotifier.clear();
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 2b50763..853e8fc 100644
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -218,7 +218,7 @@ status_t CameraSource::isCameraAvailable(
mCameraFlags |= FLAGS_HOT_CAMERA;
mDeathNotifier = new DeathNotifier();
// isBinderAlive needs linkToDeath to work.
- mCameraRecordingProxy->asBinder()->linkToDeath(mDeathNotifier);
+ IInterface::asBinder(mCameraRecordingProxy)->linkToDeath(mDeathNotifier);
}
mCamera->lock();
@@ -690,7 +690,7 @@ void CameraSource::releaseCamera() {
IPCThreadState::self()->restoreCallingIdentity(token);
}
if (mCameraRecordingProxy != 0) {
- mCameraRecordingProxy->asBinder()->unlinkToDeath(mDeathNotifier);
+ IInterface::asBinder(mCameraRecordingProxy)->unlinkToDeath(mDeathNotifier);
mCameraRecordingProxy.clear();
}
mCameraFlags = 0;
@@ -807,7 +807,7 @@ status_t CameraSource::read(
mFrameAvailableCondition.waitRelative(mLock,
mTimeBetweenFrameCaptureUs * 1000LL + CAMERA_SOURCE_TIMEOUT_NS)) {
if (mCameraRecordingProxy != 0 &&
- !mCameraRecordingProxy->asBinder()->isBinderAlive()) {
+ !IInterface::asBinder(mCameraRecordingProxy)->isBinderAlive()) {
ALOGW("camera recording proxy is gone");
return ERROR_END_OF_STREAM;
}
diff --git a/media/libstagefright/OMXClient.cpp b/media/libstagefright/OMXClient.cpp
index ca031aa..230c1f7 100644
--- a/media/libstagefright/OMXClient.cpp
+++ b/media/libstagefright/OMXClient.cpp
@@ -37,7 +37,7 @@ struct MuxOMX : public IOMX {
MuxOMX(const sp<IOMX> &remoteOMX);
virtual ~MuxOMX();
- virtual IBinder *onAsBinder() { return mRemoteOMX->asBinder().get(); }
+ virtual IBinder *onAsBinder() { return IInterface::asBinder(mRemoteOMX).get(); }
virtual bool livesLocally(node_id node, pid_t pid);
diff --git a/media/libstagefright/TimedEventQueue.cpp b/media/libstagefright/TimedEventQueue.cpp
index 1fdb244..7d15220 100644
--- a/media/libstagefright/TimedEventQueue.cpp
+++ b/media/libstagefright/TimedEventQueue.cpp
@@ -52,7 +52,7 @@ TimedEventQueue::TimedEventQueue()
TimedEventQueue::~TimedEventQueue() {
stop();
if (mPowerManager != 0) {
- sp<IBinder> binder = mPowerManager->asBinder();
+ sp<IBinder> binder = IInterface::asBinder(mPowerManager);
binder->unlinkToDeath(mDeathRecipient);
}
}
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp
index 41407e4..43f0bc9 100644
--- a/media/libstagefright/omx/OMX.cpp
+++ b/media/libstagefright/omx/OMX.cpp
@@ -245,8 +245,8 @@ status_t OMX::allocateNode(
instance->setHandle(*node, handle);
- mLiveNodes.add(observer->asBinder(), instance);
- observer->asBinder()->linkToDeath(this);
+ mLiveNodes.add(IInterface::asBinder(observer), instance);
+ IInterface::asBinder(observer)->linkToDeath(this);
return OK;
}
@@ -256,7 +256,7 @@ status_t OMX::freeNode(node_id node) {
{
Mutex::Autolock autoLock(mLock);
- ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder());
+ ssize_t index = mLiveNodes.indexOfKey(IInterface::asBinder(instance->observer()));
if (index < 0) {
// This could conceivably happen if the observer dies at roughly the
// same time that a client attempts to free the node explicitly.
@@ -265,7 +265,7 @@ status_t OMX::freeNode(node_id node) {
mLiveNodes.removeItemsAt(index);
}
- instance->observer()->asBinder()->unlinkToDeath(this);
+ IInterface::asBinder(instance->observer())->unlinkToDeath(this);
status_t err = instance->freeNode(mMaster);