This answer applies to similar binder calls also, with appropriate modifications:
The getOutput in IAudioPolicyService.cpp that calls remote()->transact(GET_OUTPUT, ... is the client side stub / marshalling code. In the same source file IAudioPolicyService.cpp the "case GET_OUTPUT:" is the server side stub / marshalling code. It pulls out the input parameters, and then invokes the real server getOutput. Upon return, it packages up the output parameters. And where is the real server getOutput? It's in AudioPolicy*.cpp On Monday, June 9, 2014 8:44:55 PM UTC-7, Andrei wrote: > > I'm trying to untangle the getOutput call > <http://androidxref.com/4.4.3_r1.1/xref/frameworks/av/media/libmedia/IAudioPolicyService.cpp#getOutput> > > in IAudioPolicyService. When this method is called, data parcels are sent > using remote > <http://androidxref.com/4.4.3_r1.1/s?defs=remote&project=frameworks>()-> > transact > <http://androidxref.com/4.4.3_r1.1/s?defs=transact&project=frameworks>( > GET_OUTPUT > <http://androidxref.com/4.4.3_r1.1/xref/frameworks/av/media/libmedia/IAudioPolicyService.cpp#GET_OUTPUT>, > > data <http://androidxref.com/4.4.3_r1.1/s?defs=data&project=frameworks>, & > reply <http://androidxref.com/4.4.3_r1.1/s?defs=reply&project=frameworks>). > The way this works (as I understand it) is as follows. The remote() call > returns > <http://androidxref.com/4.4.3_r1.1/xref/frameworks/native/include/binder/Binder.h#87> > > a reference to an IBinder object. When its transact method > <http://androidxref.com/4.4.3_r1.1/xref/frameworks/native/libs/binder/Binder.cpp#97> > > is called, it again ends up calling BnAudioPolicyService > <http://androidxref.com/4.4.3_r1.1/s?defs=BnAudioPolicyService&project=frameworks> > ::onTransact > <http://androidxref.com/4.4.3_r1.1/s?refs=onTransact&project=frameworks> > which > called remote()->transact in the first place. So it looks like they just > keep calling each other. > > I must be missing something. What's the right way to resolve this? > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.