#ifndef LCAMERA_DEV_CAMERA_SESSION_H #define LCAMERA_DEV_CAMERA_SESSION_H #include #include #include #include #include namespace lcamera_dev { struct CameraSessionResources { CameraSessionResources( const CameraIdentityRecord& identity, const std::shared_ptr& camera) : identity(identity), camera(camera) {} int refcount = 0; CameraIdentityRecord identity; std::shared_ptr camera; }; class CameraSession { public: CameraSession( const CameraIdentityRecord& identity, const std::shared_ptr& camera); const CameraIdentityRecord& getIdentityRecord() const { return s.rsrc.identity; } const std::shared_ptr& getCamera() const { return s.rsrc.camera; } void incrementRefcount(); bool decrementRefcount(); sscl::SharedResourceGroup s; }; } // namespace lcamera_dev #endif // LCAMERA_DEV_CAMERA_SESSION_H