Skip to content

Commit aaf5bf8

Browse files
committed
Refactor all tools to use new application specific debug in TBC library
1 parent b6be6a0 commit aaf5bf8

File tree

92 files changed

+622
-751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+622
-751
lines changed

tlist.tmp

Whitespace-only changes.

tools/efm-decoder/libs/efm/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@ set(TARGET_NAME efm)
33

44
# Source files
55
file(GLOB SOURCES "src/*.cpp")
6+
# Drop legacy logging.cpp; use shared TBC logging instead
7+
list(FILTER SOURCES EXCLUDE REGEX ".*/logging\\.cpp$")
68

79
# Create the static library
810
add_library(${TARGET_NAME} STATIC ${SOURCES})
911

1012
# Add the include directories
1113
target_include_directories(${TARGET_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
14+
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/tools/library)
1215

1316
# Add the include directory for the ezpwd library
1417
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/ezpwd/c++)
1518

16-
# Link Qt libraries
17-
target_link_libraries(${TARGET_NAME} Qt::Core)
19+
# Link Qt and shared lddecode-library (for TBC logging)
20+
target_link_libraries(${TARGET_NAME} PUBLIC Qt::Core lddecode-library)
1821

1922
# Optionally, you can specify the output directory for the library
2023
set_target_properties(${TARGET_NAME} PROPERTIES

tools/efm-decoder/libs/efm/include/logging.h

Lines changed: 0 additions & 50 deletions
This file was deleted.

tools/efm-decoder/libs/efm/src/audio.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
************************************************************************/
2424

2525
#include "audio.h"
26+
#include "tbc/logging.h"
2627

2728
// Audio class
2829
// Set the data for the audio, ensuring it matches the frame size
@@ -54,7 +55,7 @@ void Audio::setDataLeftRight(const QVector<qint16> &dataLeft, const QVector<qint
5455
QVector<qint16> Audio::data() const
5556
{
5657
if (m_audioData.isEmpty()) {
57-
qDebug() << "Audio::data(): Frame is empty, returning zero-filled vector";
58+
tbcDebugStream() << "Audio::data(): Frame is empty, returning zero-filled vector";
5859
return QVector<qint16>(frameSize(), 0);
5960
}
6061
return m_audioData;
@@ -64,7 +65,7 @@ QVector<qint16> Audio::data() const
6465
QVector<qint16> Audio::dataLeft() const
6566
{
6667
if (m_audioData.isEmpty()) {
67-
qDebug() << "Audio::dataLeft(): Frame is empty, returning zero-filled vector";
68+
tbcDebugStream() << "Audio::dataLeft(): Frame is empty, returning zero-filled vector";
6869
return QVector<qint16>(frameSize(), 0);
6970
}
7071

@@ -79,7 +80,7 @@ QVector<qint16> Audio::dataLeft() const
7980
QVector<qint16> Audio::dataRight() const
8081
{
8182
if (m_audioData.isEmpty()) {
82-
qDebug() << "Audio::dataRight(): Frame is empty, returning zero-filled vector";
83+
tbcDebugStream() << "Audio::dataRight(): Frame is empty, returning zero-filled vector";
8384
return QVector<qint16>(frameSize(), 0);
8485
}
8586

@@ -119,7 +120,7 @@ void Audio::setErrorDataLeftRight(const QVector<bool> &errorDataLeft, const QVec
119120
QVector<bool> Audio::errorData() const
120121
{
121122
if (m_audioErrorData.isEmpty()) {
122-
qDebug() << "Audio::errorData(): Error frame is empty, returning zero-filled vector";
123+
tbcDebugStream() << "Audio::errorData(): Error frame is empty, returning zero-filled vector";
123124
return QVector<bool>(frameSize(), false);
124125
}
125126
return m_audioErrorData;
@@ -129,7 +130,7 @@ QVector<bool> Audio::errorData() const
129130
QVector<bool> Audio::errorDataLeft() const
130131
{
131132
if (m_audioErrorData.isEmpty()) {
132-
qDebug() << "Audio::errorDataLeft(): Error frame is empty, returning zero-filled vector";
133+
tbcDebugStream() << "Audio::errorDataLeft(): Error frame is empty, returning zero-filled vector";
133134
return QVector<bool>(frameSize(), false);
134135
}
135136

@@ -144,7 +145,7 @@ QVector<bool> Audio::errorDataLeft() const
144145
QVector<bool> Audio::errorDataRight() const
145146
{
146147
if (m_audioErrorData.isEmpty()) {
147-
qDebug() << "Audio::errorDataRight(): Error frame is empty, returning zero-filled vector";
148+
tbcDebugStream() << "Audio::errorDataRight(): Error frame is empty, returning zero-filled vector";
148149
return QVector<bool>(frameSize(), false);
149150
}
150151

@@ -217,7 +218,7 @@ void Audio::showData()
217218
}
218219
}
219220

220-
qDebug().noquote() << dataString.trimmed().toUpper();
221+
tbcDebugStream().noquote() << dataString.trimmed().toUpper();
221222
}
222223

223224
int Audio::frameSize() const
@@ -237,8 +238,8 @@ void Audio::setConcealedData(const QVector<bool> &concealedData)
237238
QVector<bool> Audio::concealedData() const
238239
{
239240
if (m_audioConcealedData.isEmpty()) {
240-
qDebug() << "Audio::concealedData(): Concealed data is empty, returning zero-filled vector";
241+
tbcDebugStream() << "Audio::concealedData(): Concealed data is empty, returning zero-filled vector";
241242
return QVector<bool>(frameSize(), false);
242243
}
243244
return m_audioConcealedData;
244-
}
245+
}

tools/efm-decoder/libs/efm/src/frame.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
************************************************************************/
2424

2525
#include "frame.h"
26+
#include "tbc/logging.h"
2627

2728
// Frame class
2829
// --------------------------------------------------------------------------------------------------------
@@ -41,7 +42,7 @@ void Frame::setData(const QVector<quint8> &data)
4142
QVector<quint8> Frame::data() const
4243
{
4344
if (m_frameData.isEmpty()) {
44-
qDebug() << "Frame::getData(): Frame is empty, returning zero-filled vector";
45+
tbcDebugStream() << "Frame::getData(): Frame is empty, returning zero-filled vector";
4546
return QVector<quint8>(frameSize(), 0);
4647
}
4748
return m_frameData;
@@ -64,7 +65,7 @@ void Frame::setErrorData(const QVector<bool> &errorData)
6465
QVector<bool> Frame::errorData() const
6566
{
6667
if (m_frameErrorData.isEmpty()) {
67-
qDebug() << "Frame::getErrorData(): Error frame is empty, returning zero-filled vector";
68+
tbcDebugStream() << "Frame::getErrorData(): Error frame is empty, returning zero-filled vector";
6869
return QVector<bool>(frameSize(), 0);
6970
}
7071
return m_frameErrorData;
@@ -99,7 +100,7 @@ void Frame::setPaddedData(const QVector<bool> &paddedData)
99100
QVector<bool> Frame::paddedData() const
100101
{
101102
if (m_framePaddedData.isEmpty()) {
102-
qDebug() << "Frame::paddedData(): Padded data is empty, returning zero-filled vector";
103+
tbcDebugStream() << "Frame::paddedData(): Padded data is empty, returning zero-filled vector";
103104
return QVector<bool>(frameSize(), 0);
104105
}
105106
return m_framePaddedData;

tools/efm-decoder/libs/efm/src/logging.cpp

Lines changed: 0 additions & 174 deletions
This file was deleted.

0 commit comments

Comments
 (0)