From 9d3cb6fb49a76af09f09d4a6ac8e40533ca3e202 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bodn=C3=A1r=20Zsombor?= <bodzsoaa@sch.bme.hu>
Date: Sun, 21 Feb 2021 17:14:08 +0100
Subject: [PATCH] Add FrameSizeInBytes getter

---
 include/libmueb/muebtransmitter.h | 2 ++
 src/muebtransmitter.cc            | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/include/libmueb/muebtransmitter.h b/include/libmueb/muebtransmitter.h
index 4fdbbb6..3029b16 100644
--- a/include/libmueb/muebtransmitter.h
+++ b/include/libmueb/muebtransmitter.h
@@ -23,6 +23,8 @@ class LIBMUEB_EXPORT MuebTransmitter final : public QObject {
 
   quint32 pixels() const;
 
+  qsizetype FrameSizeInBytes() const;
+
   libmueb::Frame frame() const;
 
  private:
diff --git a/src/muebtransmitter.cc b/src/muebtransmitter.cc
index 20501f2..30894d6 100644
--- a/src/muebtransmitter.cc
+++ b/src/muebtransmitter.cc
@@ -112,6 +112,12 @@ quint32 MuebTransmitter::pixels() const {
   return d->configuration_.pixels();
 }
 
+qsizetype MuebTransmitter::FrameSizeInBytes() const {
+  Q_D(const MuebTransmitter);
+
+  return d->configuration_.ConstFrame().sizeInBytes();
+}
+
 libmueb::Frame MuebTransmitter::frame() const {
   Q_D(const MuebTransmitter);
 
-- 
GitLab