Projects
Multimedia
pulseaudio-dlna
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
pulseaudio-dlna.changes
Changed
@@ -1,4 +1,14 @@ ------------------------------------------------------------------- +Tue Mar 24 21:13:01 UTC 2015 - antoine.belvire@laposte.net + +- Update to 0.3.4: + * Fix Makefile for Launchpad + * Add --filter-device option (0.3.3) + * Send 2 SSDP packets by default for better UPnP device discovery + (0.3.3) + * Add virtualenv for local installation (0.3.3) + +------------------------------------------------------------------- Fri Mar 20 11:41:08 UTC 2015 - antoine.belvire@laposte.net - Update to 0.3.2:
View file
pulseaudio-dlna.spec
Changed
@@ -16,7 +16,7 @@ # Name: pulseaudio-dlna -Version: 0.3.2 +Version: 0.3.4 Release: 0 License: GPL-3.0 Summary: A DLNA server which brings DLNA/UPnP support to PulseAudio
View file
pulseaudio-dlna-0.3.2.tar.gz/.gitignore -> pulseaudio-dlna-0.3.4.tar.gz/.gitignore
Changed
@@ -56,4 +56,6 @@ .codeintel *.sublime-* -dist/ \ No newline at end of file +dist/ +bin/ +include/ \ No newline at end of file
View file
pulseaudio-dlna-0.3.2.tar.gz/Makefile -> pulseaudio-dlna-0.3.4.tar.gz/Makefile
Changed
@@ -13,26 +13,35 @@ # You should have received a copy of the GNU General Public License # along with pulseaudio-dlna. If not, see <http://www.gnu.org/licenses/>. -python = python2.7 -user=$(shell whoami) +python ?= python2.7 +user ?= $(shell whoami) all: -dev: +venv: pulseaudio_dlna.egg-info + +pulseaudio_dlna.egg-info: setup.py bin/pip + bin/pip install --editable . && touch $@ +bin/pip: + virtualenv --system-site-packages -p $(python) . + +install: sudo $(python) setup.py develop - sudo chown -R $(user):$(user) pulseaudio_dlna.egg-info/ + sudo chown -R $(user) pulseaudio_dlna.egg-info/ -uninstall-dev: +uninstall: sudo $(python) setup.py develop --uninstall sudo rm /usr/local/bin/pulseaudio-dlna || true release: manpage pdebuild --buildresult dist lintian --pedantic dist/*.deb dist/*.dsc dist/*.changes - sudo chown -R $(user):$(user) dist/ + sudo chown -R $(user) dist/ + +manpage: debian/pulseaudio-dlna.1 -manpage: dev - help2man pulseaudio-dlna > /tmp/pulseaudio-dlna.1 +debian/pulseaudio-dlna.1: pulseaudio_dlna.egg-info + help2man "bin/pulseaudio-dlna" > /tmp/pulseaudio-dlna.1 mv /tmp/pulseaudio-dlna.1 debian/pulseaudio-dlna.1 ifdef DEB_HOST_ARCH @@ -44,5 +53,5 @@ clean: rm -rf build dist $(shell find pulseaudio_dlna -name "__pycache__") - rm -rf *.egg-info *.egg bin lib lib64 include share pyvenv.cfg + rm -rf *.egg-info *.egg bin local lib lib64 include share pyvenv.cfg rm -rf docs htmlcov .coverage .tox pip-selfcheck.json
View file
pulseaudio-dlna-0.3.2.tar.gz/README.md -> pulseaudio-dlna-0.3.4.tar.gz/README.md
Changed
@@ -34,6 +34,14 @@ ## Changelog ## + * __0.3.4__ - (_2015-03-22_) + - Fixed Makefile for launchpad + + * __0.3.3__ - (_2015-03-22_) + - Added the ```--filter-device``` option + - Send 2 SSDP packets by default for better UPNP device discovery + - Added virtualenv for local installation + * __0.3.2__ - (_2015-03-14_) - Added the Opus Encoder (new dependency: `opus-tools`) (thanks to [MobiusHorizons](https://github.com/MobiusHorizons)) - Fixed a bug where an empty UPNP device name made the application crash @@ -86,7 +94,13 @@ make sure you have all the dependencies installed and the PulseAudio DBus module is loaded. -### Requirements ### +### Basic requirements ### + +These are the requirements _pulseaudio-dlna_ acutally needs to run. These dependencies +will get installed if you install it via the PPA. + +- python2.7 +- python-pip - python-dbus - python-beautifulsoup - python-docopt @@ -101,7 +115,7 @@ You can install all the dependencies in Ubuntu via: - sudo apt-get install python-dbus python-beautifulsoup python-docopt python-requests python-setproctitle python-gobject vorbis-tools sox lame flac opus-tools + sudo apt-get install python2.7 python-pip python-dbus python-beautifulsoup python-docopt python-requests python-setproctitle python-gobject vorbis-tools sox lame flac opus-tools ### PulseAudio DBus module ### @@ -118,11 +132,46 @@ load-module module-dbus-protocol -### Starting ### +### Install it local ### + +The recommend method of using _pulseaudio-dlna_ is to install it local to a +python _virtualenv_. In that way you will keep your system clean. If you don't like +it anymore, just delete the folder. +For that method you need some additional dependencies. + +#### virtualenv requirements #### + +- python-virtualenv +- python-dev + +You can install all the dependencies in Ubuntu via: + + sudo apt-get install python-virtualenv python-dev + +#### Installing & starting #### -After that you can change to the _root folder_ and start _pulseaudio-dlna_ via: +Change to the _project root folder_ and start the installation via: - python pulseaudio_dlna + make venv + +After that you can start _pulseaudio-dlna_ via: + + bin/pulseaudio-dlna + +### Install it to your system ### + +Since some people like it more to install software globally, you can do that too. +In many software projects this is the default installation method. + +#### Installing & starting #### + +Change to the _root folder_ and start the installation via: + + make install + +After that you can start _pulseaudio-dlna_ via: + + pulseaudio-dlna ### Using ### @@ -155,22 +204,26 @@ ### CLI ### Usage: - pulseaudio-dlna [--host <host>] [--port <port>] [--encoder <encoder>] [--renderer-urls <urls>] [--debug] + pulseaudio-dlna [--host <host>] [--port <port>] [--encoder <encoder>] [--filter-device=<filter-device>] [--renderer-urls <urls>] [--debug] pulseaudio-dlna [-h | --help | --version] Options: - --host=<host> set the server ip. - -p --port=<port> set the server port [default: 8080]. - -e --encoder=<encoder> set the server port [default: lame]. - encoders are: - - lame MPEG Audio Layer III (MP3) - - ogg Ogg Vorbis - - flac Free Lossless Audio Codec (FLAC) - - wav Waveform Audio File Format (WAV) - - opus Opus Interactive Audio Codec (OPUS) - --renderer-urls=<urls> set the renderer urls yourself. no discovery will commence. - -v --version show the version. - -h --help show the help. + --host=<host> Set the server ip. + -p --port=<port> Set the server port [default: 8080]. + -e --encoder=<encoder> Set the audio encoder [default: lame]. + Possible encoders are: + - lame MPEG Audio Layer III (MP3) + - ogg Ogg Vorbis + - flac Free Lossless Audio Codec (FLAC) + - wav Waveform Audio File Format (WAV) + - opus Opus Interactive Audio Codec (OPUS) + --filter-device=<filter-device> Set a name filter for devices which should be added. + Devices which get discovered, but won't match the + filter text will be skipped. + --renderer-urls=<urls> Set the renderer urls yourself. no discovery will commence. + --debug enables detailed debug messages. + -v --version Show the version. + -h --help Show the help. Samples: - `pulseaudio-dlna` will start @@ -182,6 +235,8 @@ - `pulseaudio-dlna --port 10291 --encoder flac` will start _pulseaudio-dlna_ on port _10291_ and stream your PulseAudio streams encoded with _FLAC_. +- `pulseaudio-dlna --filter-device 'Nexus 5,TV'` will just use devices named +_Nexus 5_ or _TV_ even when more devices got discovered. - `pulseaudio-dlna --renderer-urls http://192.168.1.7:7676/smp_10_` won't discover upnp devices by itself. Instead it will search for upnp renderers at the specified locations. You can specify multiple locations via urls @@ -194,7 +249,7 @@ _pulseaudio-dlna_ was successfully tested on the follwing devices / applications: - D-Link DCH-M225/E -- Cocy UPNP media renderer (https://github.com/mnlipp/CoCy) +- [Cocy UPNP media renderer](https://github.com/mnlipp/CoCy) - BubbleUPnP (Android App) - Samsung Smart TV LED60 (UE60F6300) - Samsung Smart TV LED40 (UE40ES6100) @@ -202,6 +257,7 @@ - Philips Streamium NP2500 Network Player - Yamaha RX-475 (AV Receiver) - Majik DSM +- [Pi MusicBox](http://www.woutervanwijk.nl/pimusicbox/) ## Supported encoders ##
View file
pulseaudio-dlna-0.3.2.tar.gz/debian/changelog -> pulseaudio-dlna-0.3.4.tar.gz/debian/changelog
Changed
@@ -1,3 +1,18 @@ +pulseaudio-dlna (0.3.4) trusty; urgency=low + + * Fixed Makefile for launchpad + + -- Massimo Mund <mo@lancode.de> Sun, 22 Mar 2015 21:55:33 +0100 + + +pulseaudio-dlna (0.3.3) trusty; urgency=low + + * Added the --filter-device option + * Send 2 SSDP packets by default for better UPNP device discovery + * Added virtualenv for local installation + + -- Massimo Mund <mo@lancode.de> Sun, 22 Mar 2015 20:34:12 +0100 + pulseaudio-dlna (0.3.2) trusty; urgency=low * Added the Opus Encoder
View file
pulseaudio-dlna-0.3.2.tar.gz/debian/control -> pulseaudio-dlna-0.3.4.tar.gz/debian/control
Changed
@@ -3,7 +3,10 @@ Section: python Priority: optional Build-Depends: python-all, + python-dev, + python-pip, python-setuptools, + python-virtualenv, git-core, ca-certificates, debhelper (>=9), @@ -26,7 +29,7 @@ opus-tools (>=0.1.8), ${misc:Depends} Homepage: https://github.com/masmu/pulseaudio-dlna -Description: A small DLNA server which brings DLNA / UPNP support to +Description: A small DLNA server which brings DLNA / UPNP support to PulseAudio and Linux. It can stream your current PulseAudio playback to different UPNP devices (UPNP Media Renderers) in your network. It's main goals are:
View file
pulseaudio-dlna-0.3.2.tar.gz/debian/pulseaudio-dlna.1 -> pulseaudio-dlna-0.3.4.tar.gz/debian/pulseaudio-dlna.1
Changed
@@ -1,23 +1,23 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1. -.TH PULSEAUDIO-DLNA "1" "March 2015" "pulseaudio-dlna 0.3.2" "User Commands" +.TH PULSEAUDIO-DLNA "1" "March 2015" "pulseaudio-dlna 0.3.3" "User Commands" .SH NAME -pulseaudio-dlna \- manual page for pulseaudio-dlna 0.3.2 +pulseaudio-dlna \- manual page for pulseaudio-dlna 0.3.3 .SH DESCRIPTION .SS "Usage:" .IP -pulseaudio\-dlna [\-\-host <host>] [\-\-port <port>] [\-\-encoder <encoder>] [\-\-renderer\-urls <urls>] [\-\-debug] +pulseaudio\-dlna [\-\-host <host>] [\-\-port <port>] [\-\-encoder <encoder>] [\-\-filter\-device=<filter\-device>] [\-\-renderer\-urls <urls>] [\-\-debug] pulseaudio\-dlna [\-h | \fB\-\-help\fR | \fB\-\-version]\fR .SH OPTIONS .TP \fB\-\-host=\fR<host> -set the server ip. +Set the server ip. .TP \fB\-p\fR \fB\-\-port=\fR<port> -set the server port [default: 8080]. +Set the server port [default: 8080]. .TP \fB\-e\fR \fB\-\-encoder=\fR<encoder> -set the server port [default: lame]. -encoders are: +Set the audio encoder [default: lame]. +Possible encoders are: .TP \- lame MPEG Audio Layer III (MP3) @@ -34,17 +34,22 @@ \- opus Opus Interactive Audio Codec (OPUS) .TP +\fB\-\-filter\-device=\fR<filter\-device> +Set a name filter for devices which should be added. +Devices which get discovered, but won't match the +filter text will be skipped. +.TP \fB\-\-renderer\-urls=\fR<urls> -set the renderer urls yourself. no discovery will commence. +Set the renderer urls yourself. no discovery will commence. .TP \fB\-\-debug\fR enables detailed debug messages. .TP \fB\-v\fR \fB\-\-version\fR -show the version. +Show the version. .TP \fB\-h\fR \fB\-\-help\fR -show the help. +Show the help. .SH "SEE ALSO" The full documentation for .B pulseaudio-dlna
View file
pulseaudio-dlna-0.3.2.tar.gz/pulseaudio_dlna/__main__.py -> pulseaudio-dlna-0.3.4.tar.gz/pulseaudio_dlna/__main__.py
Changed
@@ -17,23 +17,26 @@ ''' Usage: - pulseaudio-dlna [--host <host>] [--port <port>] [--encoder <encoder>] [--renderer-urls <urls>] [--debug] + pulseaudio-dlna [--host <host>] [--port <port>] [--encoder <encoder>] [--filter-device=<filter-device>] [--renderer-urls <urls>] [--debug] pulseaudio-dlna [-h | --help | --version] Options: - --host=<host> set the server ip. - -p --port=<port> set the server port [default: 8080]. - -e --encoder=<encoder> set the server port [default: lame]. - encoders are: - - lame MPEG Audio Layer III (MP3) - - ogg Ogg Vorbis - - flac Free Lossless Audio Codec (FLAC) - - wav Waveform Audio File Format (WAV) - - opus Opus Interactive Audio Codec (OPUS) - --renderer-urls=<urls> set the renderer urls yourself. no discovery will commence. - --debug enables detailed debug messages. - -v --version show the version. - -h --help show the help. + --host=<host> Set the server ip. + -p --port=<port> Set the server port [default: 8080]. + -e --encoder=<encoder> Set the audio encoder [default: lame]. + Possible encoders are: + - lame MPEG Audio Layer III (MP3) + - ogg Ogg Vorbis + - flac Free Lossless Audio Codec (FLAC) + - wav Waveform Audio File Format (WAV) + - opus Opus Interactive Audio Codec (OPUS) + --filter-device=<filter-device> Set a name filter for devices which should be added. + Devices which get discovered, but won't match the + filter text will be skipped. + --renderer-urls=<urls> Set the renderer urls yourself. no discovery will commence. + --debug enables detailed debug messages. + -v --version Show the version. + -h --help Show the help. ''' from __future__ import unicode_literals @@ -100,14 +103,23 @@ if renderer is not None: self.renderers.append(renderer) else: - dlna_discover = upnp.discover.UpnpMediaRendererDiscover(host) + device_filter = None + if options['--filter-device']: + device_filter = options['--filter-device'].split(',') + dlna_discover = upnp.discover.UpnpMediaRendererDiscover( + device_filter=device_filter) dlna_discover.search() self.renderers = dlna_discover.renderers - logging.info('Discovery complete. You can now use your upnp devices!') + logging.info('Discovery complete.') if len(self.renderers) == 0: print('There were no upnp devices found. Application terminates.') sys.exit(1) + else: + logging.info('Found devices:') + for upnp_device in self.renderers: + print(upnp_device) + logging.info('You can now use your upnp devices!') try: self.dlna_server = upnp.server.ThreadedDlnaServer(
View file
pulseaudio-dlna-0.3.2.tar.gz/pulseaudio_dlna/upnp/discover.py -> pulseaudio-dlna-0.3.4.tar.gz/pulseaudio_dlna/upnp/discover.py
Changed
@@ -20,9 +20,10 @@ import socket as s import renderer import logging +import time -class UpnpMediaRendererDiscover(object): +class BaseUpnpMediaRendererDiscover(object): SSDP_ADDRESS = '239.255.255.250' SSDP_PORT = 1900 @@ -33,15 +34,14 @@ 'MX: 2\r\n' + \ 'ST: urn:schemas-upnp-org:device:MediaRenderer:1\r\n\r\n' - def __init__(self, iface): - self.iface = iface - self.renderers = [] - - def search(self, ttl=10, timeout=5): + def search(self, ttl=10, timeout=5, times=2): s.setdefaulttimeout(timeout) sock = s.socket(s.AF_INET, s.SOCK_DGRAM, s.IPPROTO_UDP) sock.setsockopt(s.IPPROTO_IP, s.IP_MULTICAST_TTL, ttl) - sock.sendto(self.MSEARCH, (self.SSDP_ADDRESS, self.SSDP_PORT)) + + for i in range(0, times): + sock.sendto(self.MSEARCH, (self.SSDP_ADDRESS, self.SSDP_PORT)) + time.sleep(0.1) buffer_size = 1024 while True: @@ -53,9 +53,35 @@ sock.close() def _header_received(self, header, address): + pass + + +class UpnpMediaRendererDiscover(BaseUpnpMediaRendererDiscover): + + def __init__(self, device_filter=None): + self.renderers = None + self.device_filter = device_filter + + def search(self, ttl=10, timeout=5, times=2): + self.renderers = [] + BaseUpnpMediaRendererDiscover.search(self, ttl, timeout, times) + + def _add_renderer(self, upnp_device): + if upnp_device not in self.renderers: + self.renderers.append(upnp_device) + + def _header_received(self, header, address): + logging.debug("Recieved the following SSDP header: \n{header}".format( + header=header)) upnp_device = renderer.UpnpMediaRendererFactory.from_header( header, renderer.CoinedUpnpMediaRenderer) - if upnp_device is not None and upnp_device not in self.renderers: - logging.info('found upnp_device "{}"'.format(upnp_device)) - self.renderers.append(upnp_device) + if upnp_device is not None: + if self.device_filter is None: + self._add_renderer(upnp_device) + else: + if upnp_device.name in self.device_filter: + self._add_renderer(upnp_device) + else: + logging.info('Skipped the device "{name}."'.format( + name=upnp_device.name))
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.