This is an automatic generated email to let you know that the following patch 
were queued:

Subject: edid-decode: add 'silent' arg to data_block_oui()
Author:  Hans Verkuil <hverkuil-ci...@xs4all.nl>
Date:    Wed Jul 31 16:12:48 2024 +0200

This suppresses printing the data block name. This is needed
when parsing InfoFrames.

Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>

 edid-decode.cpp | 6 ++++--
 edid-decode.h   | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

---

diff --git a/edid-decode.cpp b/edid-decode.cpp
index 70454812e205..2e38ddc7aecf 100644
--- a/edid-decode.cpp
+++ b/edid-decode.cpp
@@ -730,7 +730,8 @@ const char *oui_name(unsigned oui, unsigned *ouinum)
 }
 
 void edid_state::data_block_oui(std::string block_name, const unsigned char *x,
-       unsigned length, unsigned *ouinum, bool ignorezeros, bool do_ascii, 
bool big_endian)
+       unsigned length, unsigned *ouinum, bool ignorezeros, bool do_ascii, 
bool big_endian,
+       bool silent)
 {
        std::string buf;
        char ascii[4];
@@ -787,7 +788,8 @@ void edid_state::data_block_oui(std::string block_name, 
const unsigned char *x,
        data_block = name;
 
        if (oui || !ignorezeros) {
-               printf("  %s:\n", data_block.c_str());
+               if (!silent)
+                       printf("  %s:\n", data_block.c_str());
                if (length < 3)
                        fail("Data block length (%d) is not enough to contain 
an OUI.\n", length);
                else if (ouiname) {
diff --git a/edid-decode.h b/edid-decode.h
index fc8c8fafb8d8..c2deff5e675d 100644
--- a/edid-decode.h
+++ b/edid-decode.h
@@ -415,7 +415,8 @@ struct edid_state {
        void list_established_timings();
 
        void data_block_oui(std::string block_name, const unsigned char *x, 
unsigned length, unsigned *ouinum,
-                           bool ignorezeros = false, bool do_ascii = false, 
bool big_endian = false);
+                           bool ignorezeros = false, bool do_ascii = false, 
bool big_endian = false,
+                           bool silent = false);
 
        void print_vic_index(const char *prefix, unsigned idx, const char 
*suffix, bool ycbcr420 = false);
        void hdmi_latency(unsigned char vid_lat, unsigned char aud_lat, bool 
is_ilaced);

Reply via email to