summaryrefslogtreecommitdiff
path: root/avmedia
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-03-13 12:00:28 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-03-13 12:17:49 +0100
commit68bc6a5dd68006ab86e7ef26f9e5d241cb118879 (patch)
treedebd00d1a05228759974b2d09666dfcccb379ab3 /avmedia
parenta73f24f47aea2dfa57459424f48b11b2b835e334 (diff)
add PixelFormat enum that replaces bit count in Bitmap/BitmapEx
Bit count for the image is a numeric value (sal_uInt16) but only a handful of values make sense - namely 1,4,8,24 and 32. This replaces the numeric value with an enum, which only accepts those values and checks the correct values are used at compile time. Change-Id: I0fc137c62bce3b0d021f05019a1648da628521bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112408 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'avmedia')
-rw-r--r--avmedia/source/gstreamer/gstframegrabber.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx
index 7f86852c5609..77cc35566bdc 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -147,7 +147,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
pData = aMapInfo.data;
int nStride = GST_ROUND_UP_4( nWidth * 3 );
- BitmapEx aBmp = vcl::bitmap::CreateFromData(pData, nWidth, nHeight, nStride, 24 );
+ BitmapEx aBmp = vcl::bitmap::CreateFromData(pData, nWidth, nHeight, nStride, vcl::PixelFormat::N24_BPP);
gst_buffer_unmap( pBuf, &aMapInfo );
xRet = Graphic( aBmp ).GetXGraphic();