25 #ifndef INCLUDED_Imaging_h_GUID_5473F500_E901_419D_46D2_62ED5CB57412 26 #define INCLUDED_Imaging_h_GUID_5473F500_E901_419D_46D2_62ED5CB57412 37 #include <boost/shared_ptr.hpp> 38 #include <boost/noncopyable.hpp> 52 #ifndef OSVR_DOXYGEN_EXTERNAL 68 : m_cb(cb), m_userdata(userdata),
70 osvrRegisterImagingCallback(
72 &ImagingCallbackRegistration::handleRawImagingCallback,
76 class ImagingDeleter {
90 handleRawImagingCallback(
void *userdata,
96 newReport.
sensor = report->sensor;
97 newReport.
metadata = report->state.metadata;
98 newReport.
buffer.reset(report->state.data,
99 ImagingDeleter(self->m_ctx));
100 self->m_cb(self->m_userdata, *timestamp, newReport);
106 friend void osvr::clientkit::registerImagingCallback(
111 #endif // OSVR_DOXYGEN_EXTERNAL 113 inline void registerImagingCallback(
Interface &iface,
127 #endif // INCLUDED_Imaging_h_GUID_5473F500_E901_419D_46D2_62ED5CB57412
Interface handle object.
Definition: Interface_decl.h:54
void(* ImagingCallback)(void *userdata, util::time::TimeValue const ×tamp, ImagingReport report)
The user-friendly imaging callback type.
Definition: Imaging_decl.h:65
Base class for objects that just need to be generically deletable.
Definition: Deletable.h:42
::boost::shared_ptr< Deletable > DeletablePtr
Shared-ownership smart pointer to a Deletable, using Boost's shared pointers.
Definition: BoostDeletable.h:42
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
OSVR_ChannelCount sensor
The device sensor number this frame came from.
Definition: Imaging_decl.h:54
The user-friendly imaging report.
Definition: Imaging_decl.h:52
OSVR_EXTERN_C_BEGIN OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientFreeImage(OSVR_ClientContext ctx, OSVR_ImageBufferElement *buf)
Free an image buffer returned from a callback.
Definition: ImagingC.cpp:35
ImageBufferPtr buffer
A shared pointer with custom deleter that owns the underlying image data buffer for the frame...
Definition: Imaging_decl.h:61
OSVR_ClientInterface get()
Get the raw OSVR_ClientInterface from this wrapper.
Definition: Interface.h:55
Definition: newuoa.h:1888
OSVR_ClientContext get()
Gets the bare OSVR_ClientContext.
Definition: Context.h:114
Class serving to maintain the registration of and wrap a friendly imaging callback.
Definition: Imaging.h:57
OSVR_ImagingMetadata metadata
Metadata containing the properties of this frame.
Definition: Imaging_decl.h:57
Header providing a C++ wrapper around TimeValueC.h.
Definition: ClientContext.h:50
Header defining a base class for objects that just need to be generically deletable.
Definition: ImagingReportTypesC.h:82
Header containing the inline implementation of Interface.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
Definition: TimeValueC.h:81
ClientContext & getContext()
Get the associated ClientContext.
Definition: Interface.h:57
unsigned char OSVR_ImageBufferElement
Type for raw buffer access to image data.
Definition: ImagingReportTypesC.h:53
void takeOwnership(util::boost_util::DeletablePtr const &obj)
Take (shared) ownership of some Deletable object.
Definition: Interface.h:67