summaryrefslogtreecommitdiff
path: root/src/py/cam/cam_kms.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/py/cam/cam_kms.py')
-rw-r--r--src/py/cam/cam_kms.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/py/cam/cam_kms.py b/src/py/cam/cam_kms.py
index d8ff0284..04381da1 100644
--- a/src/py/cam/cam_kms.py
+++ b/src/py/cam/cam_kms.py
@@ -5,14 +5,6 @@ import pykms
import selectors
import sys
-FMT_MAP = {
- 'RGB888': pykms.PixelFormat.RGB888,
- 'YUYV': pykms.PixelFormat.YUYV,
- 'ARGB8888': pykms.PixelFormat.ARGB8888,
- 'XRGB8888': pykms.PixelFormat.XRGB8888,
- 'NV12': pykms.PixelFormat.NV12,
-}
-
class KMSRenderer:
def __init__(self, state):
@@ -120,7 +112,7 @@ class KMSRenderer:
cfg = stream.configuration
fmt = cfg.pixel_format
- fmt = FMT_MAP[fmt]
+ fmt = pykms.PixelFormat(fmt.fourcc)
plane = self.resman.reserve_generic_plane(self.crtc, fmt)
assert(plane is not None)