diff options
author | Glenn Kasten <gkasten@google.com> | 2012-01-11 10:23:34 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-01-11 10:23:34 -0800 |
commit | 0132e12ded92529b1520ad62f5134fa31361c90b (patch) | |
tree | ae97a86b1eb46ac93290ca795a7c0e08773c06f9 | |
parent | 2ea3410d0d3d592ce30c3ba0ce3e0e63b1244057 (diff) | |
parent | 1099586bd48a8a90bb1cc4e7c279703bc7259214 (diff) | |
download | frameworks_av-0132e12ded92529b1520ad62f5134fa31361c90b.zip frameworks_av-0132e12ded92529b1520ad62f5134fa31361c90b.tar.gz frameworks_av-0132e12ded92529b1520ad62f5134fa31361c90b.tar.bz2 |
Merge "Declare IAudioTrack methods in binder opcode order"
-rw-r--r-- | include/media/IAudioTrack.h | 5 | ||||
-rw-r--r-- | media/libmedia/IAudioTrack.cpp | 24 |
2 files changed, 15 insertions, 14 deletions
diff --git a/include/media/IAudioTrack.h b/include/media/IAudioTrack.h index 3fa2bf8..b83e552 100644 --- a/include/media/IAudioTrack.h +++ b/include/media/IAudioTrack.h @@ -35,6 +35,9 @@ class IAudioTrack : public IInterface public: DECLARE_META_INTERFACE(AudioTrack); + /* Get this track's control block */ + virtual sp<IMemory> getCblk() const = 0; + /* After it's created the track is not active. Call start() to * make it active. If set, the callback will start being called. */ @@ -67,8 +70,6 @@ public: */ virtual status_t attachAuxEffect(int effectId) = 0; - /* get this track's control block */ - virtual sp<IMemory> getCblk() const = 0; }; // ---------------------------------------------------------------------------- diff --git a/media/libmedia/IAudioTrack.cpp b/media/libmedia/IAudioTrack.cpp index 0b372f3..e618619 100644 --- a/media/libmedia/IAudioTrack.cpp +++ b/media/libmedia/IAudioTrack.cpp @@ -46,6 +46,18 @@ public: { } + virtual sp<IMemory> getCblk() const + { + Parcel data, reply; + sp<IMemory> cblk; + data.writeInterfaceToken(IAudioTrack::getInterfaceDescriptor()); + status_t status = remote()->transact(GET_CBLK, data, &reply); + if (status == NO_ERROR) { + cblk = interface_cast<IMemory>(reply.readStrongBinder()); + } + return cblk; + } + virtual status_t start() { Parcel data, reply; @@ -88,18 +100,6 @@ public: remote()->transact(PAUSE, data, &reply); } - virtual sp<IMemory> getCblk() const - { - Parcel data, reply; - sp<IMemory> cblk; - data.writeInterfaceToken(IAudioTrack::getInterfaceDescriptor()); - status_t status = remote()->transact(GET_CBLK, data, &reply); - if (status == NO_ERROR) { - cblk = interface_cast<IMemory>(reply.readStrongBinder()); - } - return cblk; - } - virtual status_t attachAuxEffect(int effectId) { Parcel data, reply; |