Skip to content

Commit

Permalink
Change Control-Port to be IPv6 Compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
MaZderMind committed May 4, 2015
1 parent 9ad792a commit 083874d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -167,7 +167,7 @@ Application Options:
-r, --record=FILENAME Enable recorder and record into the specified FILENAME
-p, --video-input-port=NUM Specify the video input listen port.
-a, --audio-input-port=NUM Specify the audio input listen port.
-c, --controller-address=ADDRESS Specify DBus-Address for remote control, defaults to tcp:host=0.0.0.0,port=5000.
-c, --controller-address=ADDRESS Specify DBus-Address for remote control, defaults to tcp:host=::,port=5000.
```

### Video Input
Expand Down
4 changes: 2 additions & 2 deletions python-api/gstswitch/server.py
Expand Up @@ -33,7 +33,7 @@ class Server(object):
:param video_port: The video port number - default = 3000
:param audio_port: The audio port number - default = 4000
:param controller_address: The DBus-Address for remote control -
default = tcp:host=0.0.0.0,port=5000
default = tcp:host=::,port=5000
:param record_file: The record file format
:param video_format: The video format to use on the server.
:returns: nothing
Expand All @@ -44,7 +44,7 @@ def __init__(
path=None,
video_port=3000,
audio_port=4000,
controller_address='tcp:host=0.0.0.0,port=5000',
controller_address='tcp:host=::,port=5000',
record_file=False,
video_format=None,
log_to_file=True):
Expand Down
2 changes: 1 addition & 1 deletion python-api/tests/integrationtests/baseclass.py
Expand Up @@ -66,7 +66,7 @@ def setup_server(self, record_file=False):
assert self.serv.is_alive()

self.log.info("waiting for Server to open Controller-Port")
self.serv.wait_for_output('tcp:host=0.0.0.0,port=5000')
self.serv.wait_for_output('tcp:host=::,port=5000')

self.log.info("setting up TestSources")
self._sources = TestSources(
Expand Down
16 changes: 8 additions & 8 deletions python-api/tests/unittests/test_server_unit.py
Expand Up @@ -32,7 +32,7 @@ def mock_method(arg):
serv._start_process = mock_method
assert serv._run_process() == "/usr/gst-switch-srv \
--video-input-port=3000 --audio-input-port=4000 \
--controller-address=tcp:host=0.0.0.0,port=5000".split()
--controller-address=tcp:host=::,port=5000".split()

def test_path_provided_no_slash(self):
"""Test if a path is provided"""
Expand All @@ -44,7 +44,7 @@ def mock_method(arg):
serv._start_process = mock_method
assert serv._run_process() == "/usr/gst-switch-srv \
--video-input-port=3000 --audio-input-port=4000 \
--controller-address=tcp:host=0.0.0.0,port=5000".split()
--controller-address=tcp:host=::,port=5000".split()

def test_path_empty(self, monkeypatch):
"""Test if null path is given"""
Expand All @@ -63,7 +63,7 @@ def mockreturn(path):
serv._start_process = mock_method
assert serv._run_process() == "/usr/gst-switch-srv \
--video-input-port=3000 --audio-input-port=4000 \
--controller-address=tcp:host=0.0.0.0,port=5000".split()
--controller-address=tcp:host=::,port=5000".split()

def test_binary_not_found(self, monkeypatch):
"""Test that a PathError os raised when
Expand Down Expand Up @@ -174,7 +174,7 @@ def mock_method(arg):
serv._start_process = mock_method
assert serv._run_process() == "/usr/gst-switch-srv \
--video-input-port=3000 --audio-input-port=4000 \
--controller-address=tcp:host=0.0.0.0,port=5000".split()
--controller-address=tcp:host=::,port=5000".split()

def test_record_file_true(self):
"""Test if record file is True"""
Expand All @@ -186,7 +186,7 @@ def mock_method(arg):
serv._start_process = mock_method
assert serv._run_process() == "/usr/gst-switch-srv \
--video-input-port=3000 --audio-input-port=4000 \
--controller-address=tcp:host=0.0.0.0,port=5000 -r".split()
--controller-address=tcp:host=::,port=5000 -r".split()

def test_record_file_valid(self):
"""Test if record file is valid"""
Expand All @@ -198,7 +198,7 @@ def mock_method(arg):
serv._start_process = mock_method
assert serv._run_process() == "/usr/gst-switch-srv \
--video-input-port=3000 --audio-input-port=4000 \
--controller-address=tcp:host=0.0.0.0,port=5000 --record=record.data".split()
--controller-address=tcp:host=::,port=5000 --record=record.data".split()

def test_record_file_valid_date(self):
"""Test if record file is valid"""
Expand All @@ -210,7 +210,7 @@ def mock_method(arg):
serv._start_process = mock_method
assert serv._run_process() == "/usr/gst-switch-srv \
--video-input-port=3000 --audio-input-port=4000 \
--controller-address=tcp:host=0.0.0.0,port=5000 \
--controller-address=tcp:host=::,port=5000 \
--record=record_%Y.data".split()

def test_record_file_valid_space(self):
Expand All @@ -223,7 +223,7 @@ def mock_method(arg):
serv._start_process = mock_method
assert serv._run_process() == "/usr/gst-switch-srv \
--video-input-port=3000 --audio-input-port=4000 \
--controller-address=tcp:host=0.0.0.0,port=5000".split() + \
--controller-address=tcp:host=::,port=5000".split() + \
["--record=record 1.data"]

def test_record_file_invalid(self):
Expand Down
2 changes: 1 addition & 1 deletion tools/gst-switch-srv.sh
Expand Up @@ -9,5 +9,5 @@
--gst-debug="multiqueue:0" \
--video-input-port="3000" \
--audio-input-port="4000" \
--controller-address="tcp:host=0.0.0.0,port=5000" \
--controller-address="tcp:host=::,port=5000" \
--record="record.dat"

0 comments on commit 083874d

Please sign in to comment.