|
@@ -36,7 +36,7 @@ def on_connect(client, userdata, flags, rc):
|
|
|
|
|
|
|
|
# Subscribing in on_connect() means that if we lose the connection and
|
|
# Subscribing in on_connect() means that if we lose the connection and
|
|
|
# reconnect then subscriptions will be renewed.
|
|
# reconnect then subscriptions will be renewed.
|
|
|
- client.subscribe("video/cam1/#")
|
|
|
|
|
|
|
+ client.subscribe("video/mic1/#")
|
|
|
|
|
|
|
|
|
|
|
|
|
# The callback for when a PUBLISH message is received from the server.
|
|
# The callback for when a PUBLISH message is received from the server.
|
|
@@ -56,11 +56,11 @@ if __name__ == "__main__":
|
|
|
Gst.init(None)
|
|
Gst.init(None)
|
|
|
|
|
|
|
|
SRC="alsasrc device=hw:CARD=CODEC,DEV=0 slave-method=resample do-timestamp=true"
|
|
SRC="alsasrc device=hw:CARD=CODEC,DEV=0 slave-method=resample do-timestamp=true"
|
|
|
- p = """gst-launch-1.0 ${SRC} ! queue !\
|
|
|
|
|
|
|
+ p = """gst-launch-1.0 {SRC} ! queue !\
|
|
|
audio/x-raw,format=S16LE,channels=2,rate=48000,layout=interleaved !\
|
|
audio/x-raw,format=S16LE,channels=2,rate=48000,layout=interleaved !\
|
|
|
- audioconvert ! audioresample $DELAY !\
|
|
|
|
|
|
|
+ audioconvert ! audioresample !\
|
|
|
matroskamux streamable=true !\
|
|
matroskamux streamable=true !\
|
|
|
- tcpclientsink host=${HOST} port=10002"""
|
|
|
|
|
|
|
+ tcpclientsink host={HOST} port=10002"""
|
|
|
p = p.format(HOST="192.168.2.120", SRC=SRC)
|
|
p = p.format(HOST="192.168.2.120", SRC=SRC)
|
|
|
print(p)
|
|
print(p)
|
|
|
pipeline = Gst.parse_launch(p)
|
|
pipeline = Gst.parse_launch(p)
|