From c9a59b40ca899b3d6df9b729d37a33b54aed268a Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Thu, 28 Feb 2013 13:14:18 +0200 Subject: [Rename] Rename to dleyna-control dleyna code is being restructured as decided in https://lists.01.org/pipermail/dleyna/2013-February/000099.html, as a result it makes sense to rename media-service-demo to dleyna-control and move the code from git://github.com/01org/media-service-demo.git to git://github.com/01org/dleyna-control.git Signed-off-by: Jussi Kukkonen --- README | 25 +++++++++++++------------ setup.py | 6 +++--- src/dleyna-control.py | 42 ++++++++++++++++++++++++++++++++++++++++++ src/media-service-demo.py | 42 ------------------------------------------ src/msd/__init__.py | 2 +- src/msd/msd_browse.py | 2 +- src/msd/msd_main_window.py | 2 +- src/msd/msd_player.py | 2 +- src/msd/msd_search.py | 2 +- src/msd/msd_sort_order.py | 2 +- src/msd/msd_upnp.py | 25 ++++++++++++------------- src/msd/msd_utils.py | 2 +- 12 files changed, 77 insertions(+), 77 deletions(-) create mode 100755 src/dleyna-control.py delete mode 100755 src/media-service-demo.py diff --git a/README b/README index 4812e08..69ef63d 100644 --- a/README +++ b/README @@ -1,22 +1,23 @@ Introduction: ------------- -Media-service-demo is a Digital Media Player written in python to -demonstrate how to use the media-service-upnp APIs. It detects +dleyna-control is a Digital Media Player written in python to +demonstrate how to use the dleyna-server APIs. It detects Digital Media Servers on the local area network, and allows users to browse, search and play their contents. Compilation: ------------ -Media-service-demo has a number of pre-requisites, notably -media-service-upnp, to identify and browse Digital Media Servers, and -GStreamer to play audio and video content. +dleyna-control has a number of pre-requisites, notably +dleyna-server and dleyna-core, to identify and browse Digital Media +Servers, and GStreamer to play audio and video content. -Media-service-upnp can be downloaded from -git://github.com/01org/media-service-upnp.git. Please follow the -instructions in the README document to compile and install this -component. +dleyna-server and dleyna-core can be downloaded from + git://github.com/01org/dleyna-core.git + git://github.com/01org/dleyna-server.git +Please follow the instructions in the README documents to compile and +install these components. GStreamer can be installed using the package management systems of your Linux distribution. You may need to install the various plugins @@ -24,12 +25,12 @@ to ensure that your media plays correctly. The source can be downloaded from github as follows: -git clone git://github.com/01org/media-service-upnp.git +git clone git://github.com/01org/dleyna-control.git -Media-service-demo can be run directly from the source repository +delyna-control can be run directly from the source repository simply by typing. -src/media-service-upnp +src/dleyna-control.py It can be installed on your system via the supplied setup.py script. diff --git a/setup.py b/setup.py index 9ef1058..126ad3b 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # @@ -31,12 +31,12 @@ class MSDInstallData(install_data): setup(name = "msd", version = "0.0.1", - description = "Test DMP to demonstrate features of media-service-upnp", + description = "Test DMP to demonstrate features of dleyna-server", author = "Mark Ryan", author_email = "mark.d.ryan@intel.com", url = "https://01.org/dleyna/about", license = "http://www.gnu.org/licenses/lgpl-2.1.html", - scripts = ['src/media-service-demo.py'], + scripts = ['src/dleyna-control.py'], package_dir={'msd': 'src/msd'}, packages = [ "msd" ], data_files = [ ("msd" , ["AUTHORS", "README", "ChangeLog", "COPYING"]) ], diff --git a/src/dleyna-control.py b/src/dleyna-control.py new file mode 100755 index 0000000..5ef0973 --- /dev/null +++ b/src/dleyna-control.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python + +# dleyna-control +# +# Copyright (C) 2012 Intel Corporation. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU Lesser General Public License, +# version 2.1, as published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +# for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# +# Mark Ryan +# + +import pygtk +pygtk.require('2.0') +import gtk +import glib +import dbus +import dbus.service +import dbus.mainloop.glib + +from msd.msd_main_window import * + +if __name__ == "__main__": + gtk.gdk.threads_init() + try: + del os.environ["http_proxy"]; + except Exception, e: + pass + dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) + state = State() + main_window = MainWindow(state) + gtk.main() diff --git a/src/media-service-demo.py b/src/media-service-demo.py deleted file mode 100755 index 3901c45..0000000 --- a/src/media-service-demo.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python - -# media-service-demo -# -# Copyright (C) 2012 Intel Corporation. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU Lesser General Public License, -# version 2.1, as published by the Free Software Foundation. -# -# This program is distributed in the hope it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -# for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -# -# Mark Ryan -# - -import pygtk -pygtk.require('2.0') -import gtk -import glib -import dbus -import dbus.service -import dbus.mainloop.glib - -from msd.msd_main_window import * - -if __name__ == "__main__": - gtk.gdk.threads_init() - try: - del os.environ["http_proxy"]; - except Exception, e: - pass - dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) - state = State() - main_window = MainWindow(state) - gtk.main() diff --git a/src/msd/__init__.py b/src/msd/__init__.py index 64ce8ef..b75ae01 100644 --- a/src/msd/__init__.py +++ b/src/msd/__init__.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # diff --git a/src/msd/msd_browse.py b/src/msd/msd_browse.py index d0d42dc..1c1b087 100644 --- a/src/msd/msd_browse.py +++ b/src/msd/msd_browse.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # diff --git a/src/msd/msd_main_window.py b/src/msd/msd_main_window.py index 62c3b29..e72c344 100644 --- a/src/msd/msd_main_window.py +++ b/src/msd/msd_main_window.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # diff --git a/src/msd/msd_player.py b/src/msd/msd_player.py index 50c6572..a5ecefd 100644 --- a/src/msd/msd_player.py +++ b/src/msd/msd_player.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # diff --git a/src/msd/msd_search.py b/src/msd/msd_search.py index 8a0f5a0..caa0d3c 100644 --- a/src/msd/msd_search.py +++ b/src/msd/msd_search.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # diff --git a/src/msd/msd_sort_order.py b/src/msd/msd_sort_order.py index 5b94bca..0347021 100644 --- a/src/msd/msd_sort_order.py +++ b/src/msd/msd_sort_order.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # diff --git a/src/msd/msd_upnp.py b/src/msd/msd_upnp.py index c2e83cc..f2bba50 100644 --- a/src/msd/msd_upnp.py +++ b/src/msd/msd_upnp.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # @@ -22,12 +22,13 @@ from msd_utils import * import dbus import os +DLEYNA_SERVER_DBUS_NAME = 'com.intel.dleyna-server' + class MediaObject(object): def __init__(self, path): - bus = dbus.SessionBus() - self.__propsIF = dbus.Interface(bus.get_object( - 'com.intel.media-service-upnp', path), + obj = dbus.SessionBus().get_object(DLEYNA_SERVER_DBUS_NAME, path) + self.__propsIF = dbus.Interface(obj, 'org.freedesktop.DBus.Properties') def get_prop(self, prop_name, iface = ""): return self.__propsIF.Get(iface, prop_name) @@ -36,10 +37,9 @@ class Container(MediaObject): def __init__(self, path): MediaObject.__init__(self, path) - bus = dbus.SessionBus() - self.__containerIF = dbus.Interface(bus.get_object( - 'com.intel.media-service-upnp', path), - 'org.gnome.UPnP.MediaContainer2') + obj = dbus.SessionBus().get_object(DLEYNA_SERVER_DBUS_NAME, path) + self.__containerIF = dbus.Interface(obj, + 'org.gnome.UPnP.MediaContainer2') def search(self, query, offset, count, fltr, sort=""): return self.__containerIF.SearchObjectsEx(query, offset, count, fltr, @@ -86,11 +86,10 @@ class State(object): self.__lost_server_cb(path) def __init__(self): - bus = dbus.SessionBus() - self.__manager = dbus.Interface(bus.get_object( - 'com.intel.media-service-upnp', - '/com/intel/MediaServiceUPnP'), - 'com.intel.MediaServiceUPnP.Manager') + obj = dbus.SessionBus().get_object(DLEYNA_SERVER_DBUS_NAME, + '/com/intel/dLeynaServer') + self.__manager = dbus.Interface(obj, + 'com.intel.dLeynaServer.Manager') self.__servers = {} self.__found_server_cb = None self.__lost_server_cb = None diff --git a/src/msd/msd_utils.py b/src/msd/msd_utils.py index cc21bfa..e55d17d 100644 --- a/src/msd/msd_utils.py +++ b/src/msd/msd_utils.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # -- cgit v1.2.1