avoid leaking any arv.h dependancies
This commit is contained in:
11
uvoscam.cpp
11
uvoscam.cpp
@ -27,6 +27,8 @@
|
||||
|
||||
#include"log.h"
|
||||
|
||||
#include <arv.h>
|
||||
|
||||
using namespace cam;
|
||||
|
||||
cv::Mat Camera::debayer(ArvBuffer *buffer)
|
||||
@ -126,7 +128,12 @@ void Camera::decoderThreadFunc()
|
||||
}
|
||||
}
|
||||
|
||||
void Camera::aCallback(void* instance, ArvStreamCallbackType type, ArvBuffer *buffer)
|
||||
static void aFCallback(void* instance, ArvStreamCallbackType type, ArvBuffer *buffer)
|
||||
{
|
||||
Camera::aCallback(instance, static_cast<int>(type), buffer);
|
||||
}
|
||||
|
||||
void Camera::aCallback(void* instance, int type, ArvBuffer *buffer)
|
||||
{
|
||||
Camera* instance_ = reinterpret_cast<Camera*>(instance);
|
||||
if(type == ARV_STREAM_CALLBACK_TYPE_BUFFER_DONE)
|
||||
@ -250,7 +257,7 @@ bool Camera::setupCamera()
|
||||
|
||||
Log(Log::DEBUG)<<"Using "<<arv_camera_get_pixel_format_as_string(aCamera_, nullptr)<<" as pixel format";
|
||||
|
||||
aStream_ = arv_camera_create_stream(aCamera_, aCallback, this, nullptr);
|
||||
aStream_ = arv_camera_create_stream(aCamera_, aFCallback, this, nullptr);
|
||||
if(!ARV_IS_STREAM(aStream_))
|
||||
{
|
||||
Log(Log::ERROR)<<"Can not create stream";
|
||||
|
Reference in New Issue
Block a user