GCC Code Coverage Report


Directory: ./
File: channeloutput/DebugOutput.cpp
Date: 2026-12-01 12:27:28
Exec Total Coverage
Lines: 28 28 100.0%
Functions: 9 9 100.0%
Branches: 9 22 40.9%

Line Branch Exec Source
1 /*
2 * This file is part of the Falcon Player (FPP) and is Copyright (C)
3 * 2013-2022 by the Falcon Player Developers.
4 *
5 * The Falcon Player (FPP) is free software, and is covered under
6 * multiple Open Source licenses. Please see the included 'LICENSES'
7 * file for descriptions of what files are covered by each license.
8 *
9 * This source file is covered under the GPL v2 as described in the
10 * included LICENSE.GPL file.
11 */
12
13 #include "fpp-pch.h"
14
15 #include "fpp-json.h"
16
17 #include "../common.h"
18 #include "../log.h"
19
20 #include "DebugOutput.h"
21
22 #include "Plugin.h"
23 class DebugPlugin : public FPPPlugins::Plugin, public FPPPlugins::ChannelOutputPlugin {
24 public:
25 1 DebugPlugin() :
26
2/4
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 FPPPlugins::Plugin("Debug") {
27 1 }
28 1 virtual ChannelOutput* createChannelOutput(unsigned int startChannel, unsigned int channelCount) override {
29
2/6
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
2 return new DebugOutput(startChannel, channelCount);
30 }
31 };
32
33 extern "C" {
34 1 FPPPlugins::Plugin* createPlugin() {
35
2/6
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
2 return new DebugPlugin();
36 }
37 }
38
39 /*
40 *
41 */
42 1 DebugOutput::DebugOutput(unsigned int startChannel, unsigned int channelCount) :
43 1 ChannelOutput(startChannel, channelCount) {
44
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 LogDebug(VB_CHANNELOUT, "DebugOutput::DebugOutput(%u, %u)\n",
45 startChannel, channelCount);
46 1 }
47
48 /*
49 *
50 */
51 4 DebugOutput::~DebugOutput() {
52 2 LogDebug(VB_CHANNELOUT, "DebugOutput::~DebugOutput()\n");
53 4 }
54
55 /*
56 *
57 */
58 1 int DebugOutput::Init(Json::Value v) {
59 1 LogDebug(VB_CHANNELOUT, "DebugOutput::Init()\n");
60
61 // Call the base class' Init() method, do not remove this line.
62
2/4
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
1 return ChannelOutput::Init(v);
63 }
64
65 /*
66 *
67 */
68 1 int DebugOutput::Close(void) {
69 1 LogDebug(VB_CHANNELOUT, "DebugOutput::Close()\n");
70
71 1 return ChannelOutput::Close();
72 }
73
74 /*
75 *
76 */
77 5 int DebugOutput::SendData(unsigned char* channelData) {
78 5 LogExcess(VB_CHANNELOUT, "DebugOutput::RawSendData(%p)\n", channelData);
79
80 5 HexDump("DebugOutput::RawSendData", channelData, m_channelCount, VB_CHANNELOUT);
81
82 5 return m_channelCount;
83 }
84
85 /*
86 *
87 */
88 1 void DebugOutput::DumpConfig(void) {
89 1 LogDebug(VB_CHANNELOUT, "DebugOutput::DumpConfig()\n");
90
91 // Call the base class' DumpConfig() method, do not remove this line.
92 1 ChannelOutput::DumpConfig();
93 1 }
94