aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-01-05 16:19:36 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-01-05 16:19:36 +0100
commitb4484f4bf653b2a52afd5d0c70daecc1ad498cd2 (patch)
tree93dda4101a52c4a1a70ad1bac52d7ac161603431
parente5ff24157af141fce8e5487d53ceb4ca597c10f6 (diff)
downloaddabmux-b4484f4bf653b2a52afd5d0c70daecc1ad498cd2.tar.gz
dabmux-b4484f4bf653b2a52afd5d0c70daecc1ad498cd2.tar.bz2
dabmux-b4484f4bf653b2a52afd5d0c70daecc1ad498cd2.zip
invert ZMQ input direction (encoders connect to mux)
-rw-r--r--doc/example.mux7
-rw-r--r--src/dabInputZmq.cpp2
2 files changed, 7 insertions, 2 deletions
diff --git a/doc/example.mux b/doc/example.mux
index 127d37a..868211d 100644
--- a/doc/example.mux
+++ b/doc/example.mux
@@ -86,7 +86,12 @@ subchannels {
}
rick {
type dabplus
- inputfile "rick.dabp"
+ ; example file input
+ ;inputfile "rick.dabp"
+ ; example zmq input:
+ ; accept connections to port 9000 from any interface
+ ; use fdk-aac-dabplus-zmq as encoder
+ inputfile "tcp://*:9000"
nonblock false
bitrate 96
id 1
diff --git a/src/dabInputZmq.cpp b/src/dabInputZmq.cpp
index 13b812e..dd25806 100644
--- a/src/dabInputZmq.cpp
+++ b/src/dabInputZmq.cpp
@@ -97,7 +97,7 @@ int dabInputZmqOpen(void* args, const char* inputUri)
dabInputZmqData* input = (dabInputZmqData*)args;
std::string uri = "tcp://" + std::string(inputUri);
- int connect_error = zmq_connect(input->zmq_sock, uri.c_str());
+ int connect_error = zmq_bind(input->zmq_sock, uri.c_str());
if (connect_error < 0) {
etiLog.print(TcpLog::ERR, "Failed to connect socket to uri '%s': %s\n", uri.c_str(), zmq_strerror(errno));