Adapt cap_openni.cpp to the new Ptr.