-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dbus API with Signals #184
Conversation
|
@@ -394,3 +415,39 @@ def parse_preview_ports(cls, res): | |||
for tupl in liststr: | |||
preview_ports.append(int(tupl[0])) | |||
return preview_ports | |||
|
|||
def on_preview_port_added(self, cb): | |||
if not hasattr(cb, '__call__'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ callable: (object) │
│ callable(object) -> bool │
│ │
│ Return whether the object is callable (i.e., some kind of function). │
│ Note that classes are callable, as are instances with a __call__() method. │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
callable was not available from python3 to python 3.2 and 2to3 will probably change it back to an isinstance call, but to appreciate the future (it's back in python3.3), I'll change that :)
Can you check if this patch is pep8 and pylint clean? |
Can you check and see if any of the landscape errors are relevant? |
Generally looks pretty good - only some minor clean up issues. |
The things I did not comment directly on are fixed with these Commits. There are some PEP8-Warnings that I can't see a way to avoid them:
|
|
|
bd64d19
to
7aa420a
Compare
|
|
bus_name='us.timvideos.gstswitch.SwitchController', | ||
object_path="/us/timvideos/gstswitch/SwitchController", | ||
default_interface=("us.timvideos.gstswitch." | ||
"SwitchControllerInterface") | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be better wrapped as
+ default_interface=(
+ "us.timvideos.gstswitch.SwitchControllerInterface")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
IT is not really a source-File and the suggestions are … not so good
0e1b2af
to
d23a94d
Compare
1 similar comment
@@ -0,0 +1,115 @@ | |||
/* GstSwitch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This copyright header is wrong. It should be;
/* gst-switch -*- c -*-
* Copyright (C) 2015 Peter XXXX <xxx@xxxxx>
*
* This file is part of gst-switch.
*
* gst-switch is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
Change the DBus API to be more inline with how DBus should be used.
Re-Implement the Server-to-Client-Communication using DBus-Signals.
This allows using this Communication in Python and also provides a much cleaner interface.
This PR reconfigures the Server, the C-Client, the UI, the PTZ-Capture-Tool, and also the Python-API. It contains Unit- and Integration-Tests that ensures that the Signal-Handlers actually fire in the right Way.
fixes #172 by removing the concept of a role