Camera.cpp
sp<Camera> Camera::connect(int cameraId, const String16& clientPackageName,
int clientUid, int clientPid)
{
return CameraBaseT::connect(cameraId, clientPackageName, clientUid, clientPid);
}
来到CameraBase.h
template <typename TCam, typename TCamTraits = CameraTraits<TCam> >
class CameraBase : public IBinder::DeathRecipient
{
。。。
。。。
protected:
CameraBase(int cameraId);
virtual ~CameraBase();
。。。
。。。
typedef CameraBase<TCam> CameraBaseT;
};
Camera.h
class Camera :
public CameraBase<Camera>,
public ::android::hardware::BnCameraClient
注意这里有继承关系CameraBase<Camera> 把Camera传入进去
最终导致typedef CameraBase<TCam> CameraBaseT 就是 typedef CameraBase<Camera> CameraBaseT