aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/EtiReader.cpp10
-rw-r--r--src/EtiReader.h6
-rw-r--r--src/SubchannelSource.cpp4
-rw-r--r--src/SubchannelSource.h2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/EtiReader.cpp b/src/EtiReader.cpp
index 93008bb..05e243c 100644
--- a/src/EtiReader.cpp
+++ b/src/EtiReader.cpp
@@ -238,7 +238,7 @@ int EtiReader::loadEtiData(const Buffer& dataIn)
unsigned size = mySources[i]->framesize();
PDEBUG("Writting %i bytes of subchannel data\n", size);
Buffer subch(size, in);
- mySources[i]->loadSubchannelData(subch);
+ mySources[i]->loadSubchannelData(move(subch));
input_size -= size;
framesize -= size;
in += size;
@@ -428,12 +428,12 @@ void EdiReader::update_fc_data(const EdiDecoder::eti_fc_data& fc_data)
m_fc_valid = true;
}
-void EdiReader::update_fic(const std::vector<uint8_t>& fic)
+void EdiReader::update_fic(std::vector<uint8_t>&& fic)
{
if (not m_proto_valid) {
throw std::logic_error("Cannot update FIC before protocol");
}
- m_fic = fic;
+ m_fic = move(fic);
}
void EdiReader::update_edi_time(
@@ -469,7 +469,7 @@ void EdiReader::update_rfu(uint16_t rfu)
m_rfu = rfu;
}
-void EdiReader::add_subchannel(const EdiDecoder::eti_stc_data& stc)
+void EdiReader::add_subchannel(EdiDecoder::eti_stc_data&& stc)
{
if (not m_proto_valid) {
throw std::logic_error("Cannot add subchannel before protocol");
@@ -485,7 +485,7 @@ void EdiReader::add_subchannel(const EdiDecoder::eti_stc_data& stc)
throw std::invalid_argument(
"EDI: MST data length inconsistent with FIC");
}
- source->loadSubchannelData(stc.mst);
+ source->loadSubchannelData(move(stc.mst));
if (m_sources.size() > 64) {
throw std::invalid_argument("Too many subchannels");
diff --git a/src/EtiReader.h b/src/EtiReader.h
index 8548654..99ca715 100644
--- a/src/EtiReader.h
+++ b/src/EtiReader.h
@@ -115,7 +115,7 @@ private:
/* The EdiReader extracts the necessary data using the EDI input library in
* lib/edi
*/
-class EdiReader : public EtiSource, public EdiDecoder::DataCollector
+class EdiReader : public EtiSource, public EdiDecoder::ETIDataCollector
{
public:
EdiReader(double& tist_offset_s);
@@ -139,7 +139,7 @@ public:
// Update the data for the frame characterisation
virtual void update_fc_data(const EdiDecoder::eti_fc_data& fc_data);
- virtual void update_fic(const std::vector<uint8_t>& fic);
+ virtual void update_fic(std::vector<uint8_t>&& fic);
virtual void update_err(uint8_t err);
@@ -153,7 +153,7 @@ public:
virtual void update_rfu(uint16_t rfu);
- virtual void add_subchannel(const EdiDecoder::eti_stc_data& stc);
+ virtual void add_subchannel(EdiDecoder::eti_stc_data&& stc);
// Gets called by the EDI library to tell us that all data for a frame was given to us
virtual void assemble(void);
diff --git a/src/SubchannelSource.cpp b/src/SubchannelSource.cpp
index b4d6750..443b5d2 100644
--- a/src/SubchannelSource.cpp
+++ b/src/SubchannelSource.cpp
@@ -1046,9 +1046,9 @@ size_t SubchannelSource::protectionOption() const
return 0;
}
-void SubchannelSource::loadSubchannelData(const Buffer& data)
+void SubchannelSource::loadSubchannelData(Buffer&& data)
{
- d_buffer = data;
+ d_buffer = std::move(data);
}
int SubchannelSource::process(Buffer* outputData)
diff --git a/src/SubchannelSource.h b/src/SubchannelSource.h
index b4ca697..68e6ff2 100644
--- a/src/SubchannelSource.h
+++ b/src/SubchannelSource.h
@@ -59,7 +59,7 @@ public:
size_t protectionOption() const;
const std::vector<PuncturingRule>& get_rules() const;
- void loadSubchannelData(const Buffer& data);
+ void loadSubchannelData(Buffer&& data);
int process(Buffer* outputData);
const char* name() { return "SubchannelSource"; }