summaryrefslogtreecommitdiffstats
path: root/src/dabInputZmq.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-01-21 22:02:21 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-01-21 22:02:21 +0100
commitb20b932571daff5621f12f760234e998d6e79fab (patch)
tree1ca7c1b70b091a77034f4aeec962ca8ac7ce4bcf /src/dabInputZmq.h
parent337eec371c8c86f35813d804f61176a7606bae20 (diff)
downloaddabmux-b20b932571daff5621f12f760234e998d6e79fab.tar.gz
dabmux-b20b932571daff5621f12f760234e998d6e79fab.tar.bz2
dabmux-b20b932571daff5621f12f760234e998d6e79fab.zip
add RemoteControl, make the ZMQ input inherit from it
Diffstat (limited to 'src/dabInputZmq.h')
-rw-r--r--src/dabInputZmq.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/dabInputZmq.h b/src/dabInputZmq.h
index b012cf6..72bd348 100644
--- a/src/dabInputZmq.h
+++ b/src/dabInputZmq.h
@@ -60,19 +60,29 @@
#define INPUT_ZMQ_MAX_BUFFER_SIZE (5*8) // 960ms
-class DabInputZmq : public DabInputBase {
+class DabInputZmq : public DabInputBase, public RemoteControllable {
public:
DabInputZmq(const std::string name)
- : m_name(name), m_zmq_context(1),
+ : RemoteControllable(name),
+ m_name(name), m_zmq_context(1),
m_zmq_sock(m_zmq_context, ZMQ_SUB),
m_prebuffering(INPUT_ZMQ_PREBUFFERING),
- m_bitrate(0) {}
+ m_bitrate(0) {
+ RC_ADD_PARAMETER(buffer,
+ "Size of the input buffer [aac superframes]");
+ }
virtual int open(const std::string inputUri);
virtual int readFrame(void* buffer, int size);
virtual int setBitrate(int bitrate);
virtual int close();
+ /* Remote control */
+ virtual void set_parameter(string parameter, string value);
+
+ /* Getting a parameter always returns a string. */
+ virtual string get_parameter(string parameter);
+
private:
int readFromSocket(int framesize);