diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ConfigParser.cpp | 8 | ||||
-rw-r--r-- | src/input/File.cpp | 4 | ||||
-rw-r--r-- | src/input/File.h | 3 |
3 files changed, 6 insertions, 9 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index ddcb9ed..a311d63 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -936,7 +936,7 @@ static void setup_subchannel_from_ptree(DabSubchannel* subchan, subchan->input = make_shared<Inputs::MPEGFile>(); } else if (type == "dabplus") { - subchan->input = make_shared<Inputs::DABPlusFile>(); + subchan->input = make_shared<Inputs::RawFile>(); } else { throw logic_error("Incomplete handling of file input"); @@ -982,10 +982,8 @@ static void setup_subchannel_from_ptree(DabSubchannel* subchan, else if (type == "data") { if (proto == "udp") { subchan->input = make_shared<Inputs::Udp>(); - } else if (proto == "file") { - // TODO - } else if (proto == "fifo") { - // TODO + } else if (proto == "file" or proto == "fifo") { + subchan->input = make_shared<Inputs::RawFile>(); } else { stringstream ss; ss << "Subchannel with uid " << subchanuid << diff --git a/src/input/File.cpp b/src/input/File.cpp index eb26136..732f2a2 100644 --- a/src/input/File.cpp +++ b/src/input/File.cpp @@ -178,7 +178,7 @@ int MPEGFile::setBitrate(int bitrate) } -int DABPlusFile::readFrame(uint8_t* buffer, size_t size) +int RawFile::readFrame(uint8_t* buffer, size_t size) { ssize_t ret = read(m_fd, buffer, size); @@ -212,7 +212,7 @@ int DABPlusFile::readFrame(uint8_t* buffer, size_t size) return size; } -int DABPlusFile::setBitrate(int bitrate) +int RawFile::setBitrate(int bitrate) { if (bitrate <= 0) { etiLog.log(error, "Invalid bitrate (%i)\n", bitrate); diff --git a/src/input/File.h b/src/input/File.h index 01f4f21..99e0a87 100644 --- a/src/input/File.h +++ b/src/input/File.h @@ -59,11 +59,10 @@ class MPEGFile : public FileBase { bool m_parity = false; }; -class DABPlusFile : public FileBase { +class RawFile : public FileBase { public: virtual int readFrame(uint8_t* buffer, size_t size); virtual int setBitrate(int bitrate); }; - }; |