mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-12 00:38:04 +00:00
a/tracking: Change destructor to be private
This commit is contained in:
parent
e9d8e0db21
commit
8c1ee42fee
src/xrt/auxiliary/tracking
|
@ -21,13 +21,6 @@ namespace xrt::auxiliary::tracking {
|
|||
*
|
||||
*/
|
||||
|
||||
extern "C" void
|
||||
frame_mat_destroy(struct xrt_frame *xf)
|
||||
{
|
||||
FrameMat *fm = (FrameMat *)xf;
|
||||
delete fm;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -48,7 +41,7 @@ FrameMat::fillInFields(cv::Mat mat, xrt_format format, const Params ¶ms)
|
|||
// Main wrapping of cv::Mat by frame.
|
||||
xrt_frame &frame = this->frame;
|
||||
frame.reference.count = 1;
|
||||
frame.destroy = frame_mat_destroy;
|
||||
frame.destroy = destroyFrame;
|
||||
frame.data = mat.ptr<uint8_t>();
|
||||
frame.format = format;
|
||||
frame.width = width;
|
||||
|
@ -71,6 +64,13 @@ FrameMat::FrameMat()
|
|||
// Noop
|
||||
}
|
||||
|
||||
void
|
||||
FrameMat::destroyFrame(xrt_frame *xf)
|
||||
{
|
||||
FrameMat *fm = (FrameMat *)xf;
|
||||
delete fm;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
|
|
|
@ -39,11 +39,6 @@ public:
|
|||
|
||||
|
||||
public: // Methods
|
||||
/*!
|
||||
* Only public due to C needed to destroy it.
|
||||
*/
|
||||
~FrameMat();
|
||||
|
||||
/*!
|
||||
* Wraps the given cv::Mat assuming it's a 24bit RGB format matrix.
|
||||
* In all but the most strange cases you probably want the pointer
|
||||
|
@ -64,10 +59,15 @@ public: // Methods
|
|||
|
||||
|
||||
private:
|
||||
~FrameMat();
|
||||
FrameMat();
|
||||
|
||||
void
|
||||
fillInFields(cv::Mat mat, xrt_format format, const Params ¶ms);
|
||||
|
||||
//! C callback used when the reference of the frames reaches zero.
|
||||
static void
|
||||
destroyFrame(xrt_frame *frame);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue