aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-08-27 08:43:15 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-08-27 08:43:15 +0200
commitb654fbe4d105833cc0fac9e219efd927d6f2b7b3 (patch)
treed904b49ebdbff116e126ece895372201a83dc581
parent503647557aa43e8be23133f8619c6c66bfe2f470 (diff)
downloaddabmux-b654fbe4d105833cc0fac9e219efd927d6f2b7b3.tar.gz
dabmux-b654fbe4d105833cc0fac9e219efd927d6f2b7b3.tar.bz2
dabmux-b654fbe4d105833cc0fac9e219efd927d6f2b7b3.zip
Make InputBase::close() return void
-rw-r--r--src/input/Edi.cpp3
-rw-r--r--src/input/Edi.h2
-rw-r--r--src/input/File.cpp3
-rw-r--r--src/input/File.h2
-rw-r--r--src/input/Prbs.cpp3
-rw-r--r--src/input/Prbs.h2
-rw-r--r--src/input/Udp.cpp3
-rw-r--r--src/input/Udp.h2
-rw-r--r--src/input/Zmq.cpp3
-rw-r--r--src/input/Zmq.h2
-rw-r--r--src/input/inputs.h2
11 files changed, 11 insertions, 16 deletions
diff --git a/src/input/Edi.cpp b/src/input/Edi.cpp
index c50c9cf..2d82902 100644
--- a/src/input/Edi.cpp
+++ b/src/input/Edi.cpp
@@ -209,10 +209,9 @@ int Edi::setBitrate(int bitrate)
return bitrate;
}
-int Edi::close()
+void Edi::close()
{
m_udp_sock.close();
- return 0;
}
}
diff --git a/src/input/Edi.h b/src/input/Edi.h
index cd1167c..9542e28 100644
--- a/src/input/Edi.h
+++ b/src/input/Edi.h
@@ -55,7 +55,7 @@ class Edi : public InputBase {
virtual void open(const std::string& name);
virtual int readFrame(uint8_t* buffer, size_t size);
virtual int setBitrate(int bitrate);
- virtual int close();
+ virtual void close();
protected:
void m_run();
diff --git a/src/input/File.cpp b/src/input/File.cpp
index 5c83627..99dd68d 100644
--- a/src/input/File.cpp
+++ b/src/input/File.cpp
@@ -84,13 +84,12 @@ int FileBase::setBitrate(int bitrate)
}
-int FileBase::close()
+void FileBase::close()
{
if (m_fd != -1) {
::close(m_fd);
m_fd = -1;
}
- return 0;
}
void FileBase::setNonblocking(bool nonblock)
diff --git a/src/input/File.h b/src/input/File.h
index 79b78b5..429a1ce 100644
--- a/src/input/File.h
+++ b/src/input/File.h
@@ -39,7 +39,7 @@ class FileBase : public InputBase {
virtual void open(const std::string& name);
virtual int readFrame(uint8_t* buffer, size_t size) = 0;
virtual int setBitrate(int bitrate);
- virtual int close();
+ virtual void close();
virtual void setNonblocking(bool nonblock);
diff --git a/src/input/Prbs.cpp b/src/input/Prbs.cpp
index 5cbeee3..9f4f5dd 100644
--- a/src/input/Prbs.cpp
+++ b/src/input/Prbs.cpp
@@ -92,9 +92,8 @@ int Prbs::setBitrate(int bitrate)
return bitrate;
}
-int Prbs::close()
+void Prbs::close()
{
- return 0;
}
int Prbs::rewind()
diff --git a/src/input/Prbs.h b/src/input/Prbs.h
index 76fd6fa..b76ffc7 100644
--- a/src/input/Prbs.h
+++ b/src/input/Prbs.h
@@ -40,7 +40,7 @@ class Prbs : public InputBase {
virtual void open(const std::string& name);
virtual int readFrame(uint8_t* buffer, size_t size);
virtual int setBitrate(int bitrate);
- virtual int close();
+ virtual void close();
private:
virtual int rewind();
diff --git a/src/input/Udp.cpp b/src/input/Udp.cpp
index fa9c286..b909c5a 100644
--- a/src/input/Udp.cpp
+++ b/src/input/Udp.cpp
@@ -114,10 +114,9 @@ int Udp::setBitrate(int bitrate)
return bitrate;
}
-int Udp::close()
+void Udp::close()
{
m_sock.close();
- return 0;
}
diff --git a/src/input/Udp.h b/src/input/Udp.h
index d74e92f..58e0dfd 100644
--- a/src/input/Udp.h
+++ b/src/input/Udp.h
@@ -43,7 +43,7 @@ class Udp : public InputBase {
virtual void open(const std::string& name);
virtual int readFrame(uint8_t* buffer, size_t size);
virtual int setBitrate(int bitrate);
- virtual int close();
+ virtual void close();
protected:
Socket::UDPSocket m_sock;
diff --git a/src/input/Zmq.cpp b/src/input/Zmq.cpp
index ec5f9b9..c5cc1b2 100644
--- a/src/input/Zmq.cpp
+++ b/src/input/Zmq.cpp
@@ -231,10 +231,9 @@ void ZmqBase::open(const std::string& inputUri)
m_stats.registerAtServer();
}
-int ZmqBase::close()
+void ZmqBase::close()
{
m_zmq_sock.close();
- return 0;
}
int ZmqBase::setBitrate(int bitrate)
diff --git a/src/input/Zmq.h b/src/input/Zmq.h
index ab3e610..2b42872 100644
--- a/src/input/Zmq.h
+++ b/src/input/Zmq.h
@@ -184,7 +184,7 @@ class ZmqBase : public InputBase, public RemoteControllable {
virtual void open(const std::string& inputUri);
virtual int readFrame(uint8_t* buffer, size_t size);
virtual int setBitrate(int bitrate);
- virtual int close();
+ virtual void close();
/* Remote control */
virtual void set_parameter(const std::string& parameter,
diff --git a/src/input/inputs.h b/src/input/inputs.h
index 9c6c3f5..9a396e0 100644
--- a/src/input/inputs.h
+++ b/src/input/inputs.h
@@ -45,7 +45,7 @@ class InputBase {
/* Returns the effectively used bitrate, or throws invalid_argument on invalid bitrate */
virtual int setBitrate(int bitrate) = 0;
- virtual int close() = 0;
+ virtual void close() = 0;
virtual ~InputBase() {}
protected: