Skip to contentSkip to conversation

cec-follower: create cec-tuner.cpp

PATCH New Jiunn Chang 2 participants 3 messages Sep 16, 2019 – Sep 18, 2019 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cec-follower: create cec-tuner.cpp

Move tuner control, one touch record, and timer programming into cec-tuner.cpp. These features are all tuner centric and involve the tuner as a central capability.

This will help keep cec-follower emulation for these features all in one place making it easier to read and to maintain.

Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>
---
 utils/cec-follower/Makefile.am        |   2 +-
 utils/cec-follower/cec-follower.h     |   3 +
 utils/cec-follower/cec-processing.cpp | 109 +-------------------
 utils/cec-follower/cec-tuner.cpp      | 139 ++++++++++++++++++++++++++
 4 files changed, 148 insertions(+), 105 deletions(-)
 create mode 100644 utils/cec-follower/cec-tuner.cpp
utils/cec-follower/Makefile.am +1 -1
index 9b0a48b0..294a6ab4 100644
@@ -1,7 +1,7 @@
 bin_PROGRAMS = cec-follower
 man_MANS = cec-follower.1
 
-cec_follower_SOURCES = cec-follower.cpp cec-follower.h cec-processing.cpp cec-log.cpp cec-info.cpp
+cec_follower_SOURCES = cec-follower.cpp cec-follower.h cec-processing.cpp cec-tuner.cpp cec-log.cpp cec-info.cpp
 cec_follower_CPPFLAGS = -I$(top_srcdir)/utils/common
 cec_follower_LDFLAGS = -lrt
 
utils/cec-follower/cec-follower.h +3 -0
index 0998382c..582fcece 100644
@@ -219,6 +219,9 @@ std::string audio_format_id_code2s(__u8 audio_format_id, __u8 audio_format_code)
 std::string opcode2s(const struct cec_msg *msg);
 void sad_encode(const struct short_audio_desc *sad, __u32 *descriptor);
 
+// cec-tuner.cpp
+void process_tuner_centric_msg(struct node *node, struct cec_msg &msg, unsigned me);
+
 // CEC processing
 void testProcessing(struct node *node, bool wallclock);
 
utils/cec-follower/cec-processing.cpp +5 -104

133 lines not on this page · raw message

utils/cec-follower/cec-tuner.cpp new file +139 -0

139 lines not on this page · raw message

Signature · 1 line
2.23.0
#1 lore raw

PATCH v2 1/1 cec-follower: create cec-tuner.cpp

Move tuner control, one touch record, and timer programming into cec-tuner.cpp. These features are all tuner related and involve the tuner as a central feature to be able to test.

Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>

---

Changes made since v1:
- Change cec-tuner.cpp function name to process_tuner_record_timer_msgs()
- Refactor commit message

Quoted 1 line

8---------------------------------------------------------------------------8<

 utils/cec-follower/Makefile.am        |   2 +-
 utils/cec-follower/cec-follower.h     |   3 +
 utils/cec-follower/cec-processing.cpp | 109 +-------------------
 utils/cec-follower/cec-tuner.cpp      | 139 ++++++++++++++++++++++++++
 4 files changed, 148 insertions(+), 105 deletions(-)
 create mode 100644 utils/cec-follower/cec-tuner.cpp
utils/cec-follower/Makefile.am +1 -1
index 9b0a48b0..294a6ab4 100644
@@ -1,7 +1,7 @@
 bin_PROGRAMS = cec-follower
 man_MANS = cec-follower.1
 
-cec_follower_SOURCES = cec-follower.cpp cec-follower.h cec-processing.cpp cec-log.cpp cec-info.cpp
+cec_follower_SOURCES = cec-follower.cpp cec-follower.h cec-processing.cpp cec-tuner.cpp cec-log.cpp cec-info.cpp
 cec_follower_CPPFLAGS = -I$(top_srcdir)/utils/common
 cec_follower_LDFLAGS = -lrt
 
utils/cec-follower/cec-follower.h +3 -0
index 0998382c..9f5f1be4 100644
@@ -219,6 +219,9 @@ std::string audio_format_id_code2s(__u8 audio_format_id, __u8 audio_format_code)
 std::string opcode2s(const struct cec_msg *msg);
 void sad_encode(const struct short_audio_desc *sad, __u32 *descriptor);
 
+// cec-tuner.cpp
+void process_tuner_record_timer_msgs(struct node *node, struct cec_msg &msg, unsigned me);
+
 // CEC processing
 void testProcessing(struct node *node, bool wallclock);
 
utils/cec-follower/cec-processing.cpp +5 -104

133 lines not on this page · raw message

utils/cec-follower/cec-tuner.cpp new file +139 -0

139 lines not on this page · raw message

Signature · 1 line
2.23.0
#2 lore raw

PATCH v3 1/1 cec-follower: create cec-tuner.cpp

Move tuner control, one touch record, and timer programming into cec-tuner.cpp. These features are all tuner related and involve the tuner as a central feature to be able to test.

Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>

---

Changes made since v1:
- Change cec-tuner.cpp function name to process_tuner_record_timer_msgs()
- Refactor commit message

Changes made since v2:
- Change comment to "Tuner/Record/Timer Messages"
- Change break statement to return statement

---
 utils/cec-follower/Makefile.am        |   2 +-
 utils/cec-follower/cec-follower.h     |   3 +
 utils/cec-follower/cec-processing.cpp | 107 +-------------------
 utils/cec-follower/cec-tuner.cpp      | 139 ++++++++++++++++++++++++++
 4 files changed, 147 insertions(+), 104 deletions(-)
 create mode 100644 utils/cec-follower/cec-tuner.cpp
utils/cec-follower/Makefile.am +1 -1
index 9b0a48b0..294a6ab4 100644
@@ -1,7 +1,7 @@
 bin_PROGRAMS = cec-follower
 man_MANS = cec-follower.1
 
-cec_follower_SOURCES = cec-follower.cpp cec-follower.h cec-processing.cpp cec-log.cpp cec-info.cpp
+cec_follower_SOURCES = cec-follower.cpp cec-follower.h cec-processing.cpp cec-tuner.cpp cec-log.cpp cec-info.cpp
 cec_follower_CPPFLAGS = -I$(top_srcdir)/utils/common
 cec_follower_LDFLAGS = -lrt
 
utils/cec-follower/cec-follower.h +3 -0
index 0998382c..9f5f1be4 100644
@@ -219,6 +219,9 @@ std::string audio_format_id_code2s(__u8 audio_format_id, __u8 audio_format_code)
 std::string opcode2s(const struct cec_msg *msg);
 void sad_encode(const struct short_audio_desc *sad, __u32 *descriptor);
 
+// cec-tuner.cpp
+void process_tuner_record_timer_msgs(struct node *node, struct cec_msg &msg, unsigned me);
+
 // CEC processing
 void testProcessing(struct node *node, bool wallclock);
 
utils/cec-follower/cec-processing.cpp +4 -103

131 lines not on this page · raw message

utils/cec-follower/cec-tuner.cpp new file +139 -0

139 lines not on this page · raw message

Signature · 1 line
2.23.0