Commit 8ff0daa9 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

use VideoGL also on Mac. swap rgb when needed

parent bdc09828
......@@ -146,7 +146,12 @@ bool VideoFrameGrabber::present(const QVideoFrame &input_frame)
frame.width(),
frame.height(),
QVideoFrame::imageFormatFromPixelFormat(frame.pixelFormat()));
emit frameAvailable(image);
if (frame.pixelFormat() == QVideoFrame::Format_ARGB32)
emit frameAvailable(image.rgbSwapped());
else
emit frameAvailable(image);
frame.unmap();
}
}
......
......@@ -13,11 +13,7 @@
class dtkWidgetsHUD;
class dtkWidgetsOverlayPane;
#if defined(Q_OS_MAC)
using ViewVideo = dtkVisualizationViewVideo;
#else
using ViewVideo = dtkVisualizationViewVideoGL;
#endif
class DTKVISUALIZATION_EXPORT dtkVisualizationViewVideoPlayer: public ViewVideo
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment