diff --git a/libsrc/dispmanx-grabber/DispmanxFrameGrabber.cpp b/libsrc/dispmanx-grabber/DispmanxFrameGrabber.cpp index 204346fe..3bdc4bdf 100644 --- a/libsrc/dispmanx-grabber/DispmanxFrameGrabber.cpp +++ b/libsrc/dispmanx-grabber/DispmanxFrameGrabber.cpp @@ -1,18 +1,6 @@ #include "DispmanxFrameGrabber.h" -// Because the shapshot function is incompatible between versions (use of different enum as -// third argument) and no proper version number is available as preprocessor define we cast the -// function to the same function with the third argument as 'int'. -// This way we can call the function in both versions of the VideoCore library without -// switching. -static int my_vc_dispmanx_snapshot(DISPMANX_DISPLAY_HANDLE_T display, DISPMANX_RESOURCE_HANDLE_T snapshot_resource, int transform) -{ - typedef int (*SnapshotFunctionPtr)(DISPMANX_DISPLAY_HANDLE_T, DISPMANX_RESOURCE_HANDLE_T, int); - SnapshotFunctionPtr snapshot = (SnapshotFunctionPtr) &vc_dispmanx_snapshot; - return (*snapshot)(display, snapshot_resource, transform); -} - DispmanxFrameGrabber::DispmanxFrameGrabber(const unsigned width, const unsigned height) : _vc_display(0), _vc_resource(0), @@ -77,7 +65,7 @@ void DispmanxFrameGrabber::grabFrame(RgbImage& image) _vc_display = vc_dispmanx_display_open(0); // Create the snapshot (incl down-scaling) - my_vc_dispmanx_snapshot(_vc_display, _vc_resource, _vc_flags); + vc_dispmanx_snapshot(_vc_display, _vc_resource, (DISPMANX_TRANSFORM_T) _vc_flags); // Read the snapshot into the memory void* image_ptr = image.memptr(); diff --git a/libsrc/dispmanx-grabber/DispmanxWrapper.cpp b/libsrc/dispmanx-grabber/DispmanxWrapper.cpp index 96b5c6e0..ba4bd1f1 100644 --- a/libsrc/dispmanx-grabber/DispmanxWrapper.cpp +++ b/libsrc/dispmanx-grabber/DispmanxWrapper.cpp @@ -66,8 +66,7 @@ void DispmanxWrapper::setGrabbingMode(const GrabbingMode mode) switch (mode) { case GRABBINGMODE_VIDEO: - _frameGrabber->setFlags(0); - //_frameGrabber->setFlags(DISPMANX_SNAPSHOT_NO_RGB|DISPMANX_SNAPSHOT_FILL); + _frameGrabber->setFlags(DISPMANX_SNAPSHOT_NO_RGB|DISPMANX_SNAPSHOT_FILL); start(); case GRABBINGMODE_AUDIO: case GRABBINGMODE_PHOTO: