From 407603ca0bc658b278fc7a12e69b37394bbbb757 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 16 Sep 2016 17:56:43 +0200 Subject: Rework File and Fifo output initialisation --- src/dabOutput/dabOutput.h | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'src/dabOutput/dabOutput.h') diff --git a/src/dabOutput/dabOutput.h b/src/dabOutput/dabOutput.h index b911880..eaa623f 100644 --- a/src/dabOutput/dabOutput.h +++ b/src/dabOutput/dabOutput.h @@ -110,17 +110,6 @@ class DabOutputFile : public DabOutput type_ = ETI_FILE_TYPE_FRAMED; } - DabOutputFile(const DabOutputFile& other) - { - filename_ = other.filename_; - file_ = other.file_; - nbFrames_ = other.nbFrames_; - type_ = other.type_; - } - - ~DabOutputFile() {} - const DabOutputFile& operator=(const DabOutputFile& other) = delete; - int Open(const char* filename); int Write(void* buffer, int size); int Close(); @@ -130,6 +119,11 @@ class DabOutputFile : public DabOutput } protected: + /* Set ETI type according to filename, and return + * filename without the &type=foo part + */ + std::string SetEtiType(const std::string& filename); + std::string filename_; int file_; EtiFileType type_; @@ -137,12 +131,10 @@ class DabOutputFile : public DabOutput }; // ---------- FIFO output ------------ -// only write is different for the FIFO output class DabOutputFifo : public DabOutputFile { public: DabOutputFifo() : DabOutputFile() {} - ~DabOutputFifo() {} int Open(const char* filename); int Write(void* buffer, int size); @@ -176,7 +168,7 @@ class DabOutputRaw : public DabOutput delete[] buffer_; } - const DabOutputRaw operator=(const DabOutputRaw& other); + const DabOutputRaw operator=(const DabOutputRaw& other) = delete; int Open(const char* name); int Write(void* buffer, int size); -- cgit v1.2.3