From glaubitz@physik.fu-berlin.de Sun Jan 10 12:19:39 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NTvpa-00043h-Vw>; Sun, 10 Jan 2010 12:19:39 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NTvpa-00013H-Tp>; Sun, 10 Jan 2010 12:19:38 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NTvpa-0000kt-PZ for linux-minidisc@lists.fu-berlin.de; Sun, 10 Jan 2010 12:19:38 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1NTvpa-0003iT-KT for ; Sun, 10 Jan 2010 12:19:38 +0100 Date: Sun, 10 Jan 2010 12:19:38 +0100 Message-Id: To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 72cf5663a521cd502cee5bcf9c9de3dcea5e7a47 X-Git-Newrev: 76fe0f89dc5afca4507143f31578b711184a90cd From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1263122378-00000DDD-CABEED8F/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkmen branch, master, updated. 76fe0f89dc5afca4507143f31578b711184a90cd X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 11:19:40 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkmen". The branch, master has been updated via 76fe0f89dc5afca4507143f31578b711184a90cd (commit) from 72cf5663a521cd502cee5bcf9c9de3dcea5e7a47 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 76fe0f89dc5afca4507143f31578b711184a90cd Author: Hossam Elgabarty Date: Sun Jan 10 12:18:39 2010 +0100 Added Arabian translation. ----------------------------------------------------------------------- Summary of changes: qhimdtransfer/qhimdtransfer.pro | 2 +- .../{qhimdtransfer_pt.ts => qhimdtransfer_ar.ts} | 172 ++++++++++---------- 2 files changed, 87 insertions(+), 87 deletions(-) copy qhimdtransfer/{qhimdtransfer_pt.ts => qhimdtransfer_ar.ts} (59%) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkmen From glaubitz@physik.fu-berlin.de Sat Jan 16 12:05:11 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NW6Ss-0005dp-Am>; Sat, 16 Jan 2010 12:05:10 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NW6Ss-0003g5-8f>; Sat, 16 Jan 2010 12:05:10 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NW6Ss-0002hh-44 for linux-minidisc@lists.fu-berlin.de; Sat, 16 Jan 2010 12:05:10 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1NW6Sr-0007hA-Th for ; Sat, 16 Jan 2010 12:05:09 +0100 Date: Sat, 16 Jan 2010 12:05:09 +0100 To: linux-minidisc@lists.fu-berlin.de Message-ID: <20100116110509.GA29424@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1263639910-00000DDD-C6DD3599/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.351382, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Subject: [linux-minidisc] qhimdtransfer: about dialog X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 11:05:11 -0000 Hello, I have been unsatisfied with the current about dialog for a while for several reasons. I have therefore collected my ideas today and also peeked at the one in pidgin. I would suggest the following features: - version information - contributors - detailed contact information (IRC, mailing list, wiki etc) Please see also my wiki section for that: Any suggestions are welcome. Adrian From glaubitz@physik.fu-berlin.de Fri Jan 22 10:43:46 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NYG3N-0001o7-SB>; Fri, 22 Jan 2010 10:43:45 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NYG3N-0006rl-QK>; Fri, 22 Jan 2010 10:43:45 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NYG3N-0005x8-LW for linux-minidisc@lists.fu-berlin.de; Fri, 22 Jan 2010 10:43:45 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1NYG3N-0007vm-Jr for ; Fri, 22 Jan 2010 10:43:45 +0100 Date: Fri, 22 Jan 2010 10:43:45 +0100 To: linux-minidisc@lists.fu-berlin.de Message-ID: <20100122094345.GA30256@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264153425-00000DDD-FF15F1C6/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.226537, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Subject: [linux-minidisc] Updated version for MacOS/PPC X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 09:43:47 -0000 Hi, I just uploaded a fresh version for MacOS/PPC. It was built on MacOS 10.5.8/PPC (Leopard). Changes are as follows: - Update to git 20100122 - Include .qm-files for translation (translations should work now) - build with latest Macports 1.8.2 (20100122) Fetch it here: The Intel version will follow later this day. Adrian From glaubitz@physik.fu-berlin.de Fri Jan 22 10:58:10 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NYGH9-0002c9-Rr>; Fri, 22 Jan 2010 10:57:59 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NYGH9-0003js-Pw>; Fri, 22 Jan 2010 10:57:59 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NYGH9-00060z-LC for linux-minidisc@lists.fu-berlin.de; Fri, 22 Jan 2010 10:57:59 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1NYGH9-00087U-JP for ; Fri, 22 Jan 2010 10:57:59 +0100 Date: Fri, 22 Jan 2010 10:57:59 +0100 To: linux-minidisc@lists.fu-berlin.de Message-ID: <20100122095759.GB30256@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264154279-00000DDD-EDC4A7B0/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.184978, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Subject: [linux-minidisc] Updated version for MacOS/Intel X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 09:58:10 -0000 Hi, I have also just uploaded a fresh version for MacOS/Intel. It was built on MacOS 10.6.2/Intel (SnowLeopard). Changes are as follows: - Update to git 20100122 - Include .qm-files for translation (translations should work now) - build with latest Macports 1.8.2 (20100122) Fetch it here: Adrian From plr.vincent@gmail.com Tue Jan 26 21:25:25 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZryV-0000dW-VH>; Tue, 26 Jan 2010 21:25:24 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZryV-0001Ur-SE>; Tue, 26 Jan 2010 21:25:23 +0100 Received: by ewy28 with SMTP id 28so972231ewy.15 for ; Tue, 26 Jan 2010 12:25:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:date:subject :to:x-length:x-uid:mime-version:content-type :content-transfer-encoding; bh=jvpjUX2x+/lnjmabgjeeF0pHZabsZWDENX+qxvBPnrU=; b=CFWNvcr/4CGA9wKdK35WWRMWlJSzswuDzaGiTAlLVaJtqB+akQENBYIC61DBAI+Usy Qsub8NeoI6wuXKac24Ho6IJNjCOQ9V1J/IcE36Rda5llZ+y24eisBUHt4HMticS7O6io 3HOeISjjRlPl13y+Z+DrmW7AY/Ms2dW2jUoqs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:date:subject:to:x-length:x-uid:mime-version :content-type:content-transfer-encoding; b=PPqxl6gZUZ2YccCI4iVlvB2RM9/KRDPXOamw/6tCfmlCkkaRlLBiOiAeaGeWnpMzPh ldV71S9LAi/4wD9+eDXGC5ib9Uc4o9ltnxetbWyYeuS4qIipzmOnVIJPxujP+QLj7j3E ZFSaYdnWzGYVmzQVYP8XrELQ+Pnc/00uR80Ok= Received: by 10.213.66.5 with SMTP id l5mr2245377ebi.15.1264537523207; Tue, 26 Jan 2010 12:25:23 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 15sm853810ewy.12.2010.01.26.12.25.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 26 Jan 2010 12:25:21 -0800 (PST) Message-Id: <201001262125.33769.plr.vincent@gmail.com> From: Vincent Pelletier Date: Tue, 26 Jan 2010 21:25:33 +0100 To: linux-minidisc@lists.fu-berlin.de X-Length: 3991 X-UID: 71425 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264537523-00000DDD-530CC71E/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.446467, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 1/6] Make function acting on a transfer accept a pointer to transfer. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 20:25:25 -0000 This make it possible to use them with allocated string buffers. --- netmd/libusb1.py | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/netmd/libusb1.py b/netmd/libusb1.py index 3f61cee..7c99505 100644 --- a/netmd/libusb1.py +++ b/netmd/libusb1.py @@ -633,8 +633,9 @@ libusb_free_transfer = libusb.libusb_free_transfer libusb_free_transfer.argtypes = [libusb_transfer_p] libusb_free_transfer.restype = None -def libusb_fill_control_transfer(transfer, dev_handle, buffer, callback, +def libusb_fill_control_transfer(transfer_p, dev_handle, buffer, callback, user_data, timeout): + transfer = transfer_p.contents transfer.dev_handle = dev_handle transfer.endpoint = 0 transfer.type = LIBUSB_TRANSFER_TYPE_CONTROL @@ -646,8 +647,9 @@ def libusb_fill_control_transfer(transfer, dev_handle, buffer, callback, transfer.user_data = user_data transfer.callback = callback -def libusb_fill_bulk_transfer(transfer, dev_handle, endpoint, buffer, length, +def libusb_fill_bulk_transfer(transfer_p, dev_handle, endpoint, buffer, length, callback, user_data, timeout): + transfer = transfer_p.contents transfer.dev_handle = dev_handle transfer.endpoint = endpoint transfer.type = LIBUSB_TRANSFER_TYPE_BULK @@ -657,8 +659,9 @@ def libusb_fill_bulk_transfer(transfer, dev_handle, endpoint, buffer, length, transfer.user_data = user_data transfer.callback = callback -def libusb_fill_interrupt_transfer(transfer, dev_handle, endpoint, buffer, +def libusb_fill_interrupt_transfer(transfer_p, dev_handle, endpoint, buffer, length, callback, user_data, timeout): + transfer = transfer_p.contents transfer.dev_handle = dev_handle transfer.endpoint = endpoint transfer.type = LIBUSB_TRANSFER_TYPE_INTERRUPT @@ -668,8 +671,9 @@ def libusb_fill_interrupt_transfer(transfer, dev_handle, endpoint, buffer, transfer.user_data = user_data transfer.callback = callback -def libusb_fill_iso_transfer(transfer, dev_handle, endpoint, buffer, length, +def libusb_fill_iso_transfer(transfer_p, dev_handle, endpoint, buffer, length, num_iso_packets, callback, user_data, timeout): + transfer = transfer_p.contents transfer.dev_handle = dev_handle transfer.endpoint = endpoint transfer.type = LIBUSB_TRANSFER_TYPE_ISOCHRONOUS @@ -680,11 +684,13 @@ def libusb_fill_iso_transfer(transfer, dev_handle, endpoint, buffer, length, transfer.user_data = user_data transfer.callback = callback -def libusb_set_iso_packet_lengths(transfer, length): +def libusb_set_iso_packet_lengths(transfer_p, length): + transfer = transfer_p.contents for i in xrange(transfer.num_iso_packets): transfer.iso_packet_desc[i].length = length -def libusb_get_iso_packet_buffer(transfer, packet): +def libusb_get_iso_packet_buffer(transfer_p, packet): + transfer = transfer_p.contents offset = 0 if packet >= transfer.num_iso_packets: return None @@ -692,7 +698,8 @@ def libusb_get_iso_packet_buffer(transfer, packet): offset += transfer.iso_packet_desc[i].length return transfer.buffer[offset:] -def libusb_get_iso_packet_buffer_simple(transfer, packet): +def libusb_get_iso_packet_buffer_simple(transfer_p, packet): + transfer = transfer_p.contents if packet >= transfer.num_iso_packets: return None return transfer.buffer[transfer.iso_packet_desc[0].length * packet:] -- 1.6.6 From plr.vincent@gmail.com Tue Jan 26 21:25:35 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZryg-0000dw-5G>; Tue, 26 Jan 2010 21:25:34 +0100 Received: from ey-out-2122.google.com ([74.125.78.27]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZryg-0001Xu-2F>; Tue, 26 Jan 2010 21:25:34 +0100 Received: by ey-out-2122.google.com with SMTP id d26so1303106eyd.3 for ; Tue, 26 Jan 2010 12:25:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-length:x-uid:mime-version :content-type:content-transfer-encoding; bh=zJfRCb21jVkNyaipCx3hFsGlepjQBlrYo0kpIwONpXA=; b=Hm4dX6/CjT1NdbDXABIYlG/UgWx+zYWzSk6Q4xIbyIjq/U+2JdZ3c8hian+90OqfMH XsBmxNb/uVyhs7uyMXRh4hcY7n0TnjPiTbrRYON1Nx1mdJVtBNUQN13JH3/k5rpCkpsK ueMMIke1Zdwitbfk5ret/7QUsOd1Lv8MTsCtM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-length :x-uid:mime-version:content-type:content-transfer-encoding; b=xr5cyjVhIrRIqc27wfMOnVvZQu6fJG6Q8ZMmMvoxXWxLWWAL04W30Z2orAM1Qa0ezX vMwwFLQWW+haOVt0KGFhvLQWmnL3dl/J/w4j8994vFcvSJxaKldLOWJPl2dJLsGH4sdM 81IZgEmZ4TXJUh6ViK5wVfzGQp94VRClqKKU0= Received: by 10.213.2.67 with SMTP id 3mr5501542ebi.77.1264537533740; Tue, 26 Jan 2010 12:25:33 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 13sm5509100ewy.1.2010.01.26.12.25.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 26 Jan 2010 12:25:32 -0800 (PST) Message-Id: <201001262125.44230.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264537290.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264537290.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Tue, 26 Jan 2010 21:25:43 +0100 To: linux-minidisc@lists.fu-berlin.de X-Length: 1584 X-UID: 71426 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 74.125.78.27 X-purgate: clean X-purgate-ID: 151147::1264537534-00000DDD-66FE18F9/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.045763, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 2/6] This is no "WTF ?", simply a pointer to ISO packet descriptor. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 20:25:35 -0000 --- netmd/libusb1.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/netmd/libusb1.py b/netmd/libusb1.py index 7c99505..9f68be5 100644 --- a/netmd/libusb1.py +++ b/netmd/libusb1.py @@ -448,6 +448,7 @@ class libusb_iso_packet_descriptor(Structure): _fields_ = [('length', c_uint), ('actual_length', c_uint), ('status', c_int)] # enum libusb_transfer_status +libusb_iso_packet_descriptor_p = POINTER(libusb_iso_packet_descriptor) class libusb_transfer(Structure): pass @@ -467,8 +468,7 @@ libusb_transfer._fields_ = [('dev_handle', libusb_device_handle_p), ('user_data', c_void_p), ('buffer', c_char_p), ('num_iso_packets', c_int), - ('iso_packet_desc', - libusb_iso_packet_descriptor * 0) # XXX: WTF ? + ('iso_packet_desc', libusb_iso_packet_descriptor_p) ] #int libusb_init(libusb_context **ctx); -- 1.6.6 From plr.vincent@gmail.com Tue Jan 26 21:25:41 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZrym-0000eZ-VA>; Tue, 26 Jan 2010 21:25:41 +0100 Received: from ey-out-2122.google.com ([74.125.78.27]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZrym-0001Xu-SF>; Tue, 26 Jan 2010 21:25:40 +0100 Received: by ey-out-2122.google.com with SMTP id d26so1303106eyd.3 for ; Tue, 26 Jan 2010 12:25:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-length:x-uid:mime-version :content-type:content-transfer-encoding; bh=igrIhA4zSEHsiZu4EQPf7Cd4ZNJHD6EHA85oVfVJD4k=; b=khVfQtlC55w/Dd9L69zig/Tw+wSQcl0b0+c1yjVcPYBZ9LXPl+tUeMSHD7Qsp9xmd1 dioaWmQF3yxB+uZoJxsXsjgSjDXC2tzPvuFVH1TTHy1ApvBJ6W1onRpj37vVMO13aXJl fgy+D4luVqpFvVOrH/80tcAXJmdidPy8227Ig= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-length :x-uid:mime-version:content-type:content-transfer-encoding; b=HWRn9CbGPUJFcZ99h5ENm/ifEL8Aj9wty+fYiKDkV7V0qUtlmcDRvBn0QJX3FEIRTz NQGN1pkccxaX2R9Jn5mDnOsOWim2EZYrUU+2YzV5lfbxyiZT4QsudCunYRc3lIU23GPG Dz2yH+tm/YynAvQ/LMvepNAcj9or9Jcm1jSPw= Received: by 10.213.109.219 with SMTP id k27mr5952108ebp.37.1264537540690; Tue, 26 Jan 2010 12:25:40 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 16sm5500629ewy.2.2010.01.26.12.25.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 26 Jan 2010 12:25:38 -0800 (PST) Message-Id: <201001262125.49689.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264537290.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264537290.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Tue, 26 Jan 2010 21:25:49 +0100 To: linux-minidisc@lists.fu-berlin.de X-Length: 2696 X-UID: 71427 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 74.125.78.27 X-purgate: clean X-purgate-ID: 151147::1264537540-00000DDD-F7453827/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.312858, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 3/6] Make some function accepting opaque data pointer accept a py_object. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 20:25:41 -0000 This makes them easily usable in python. --- netmd/libusb1.py | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/netmd/libusb1.py b/netmd/libusb1.py index 9f68be5..6796860 100644 --- a/netmd/libusb1.py +++ b/netmd/libusb1.py @@ -4,7 +4,7 @@ from ctypes import Structure, \ cdll, \ c_short, c_int, c_uint, c_size_t, c_long, \ c_uint8, c_uint16, \ - c_void_p, c_char_p + c_void_p, c_char_p, py_object import struct class Enum(object): @@ -465,7 +465,7 @@ libusb_transfer._fields_ = [('dev_handle', libusb_device_handle_p), ('length', c_int), ('actual_length', c_int), ('callback', libusb_transfer_cb_fn_p), - ('user_data', c_void_p), + ('user_data', py_object), ('buffer', c_char_p), ('num_iso_packets', c_int), ('iso_packet_desc', libusb_iso_packet_descriptor_p) @@ -796,8 +796,8 @@ class libusb_pollfd(Structure): libusb_pollfd_p = POINTER(libusb_pollfd) libusb_pollfd_p_p = POINTER(libusb_pollfd_p) -libusb_pollfd_added_cb_p = CFUNCTYPE(None, c_int, c_short, c_void_p) -libusb_pollfd_removed_cb_p = CFUNCTYPE(None, c_int, c_void_p) +libusb_pollfd_added_cb_p = CFUNCTYPE(None, c_int, c_short, py_object) +libusb_pollfd_removed_cb_p = CFUNCTYPE(None, c_int, py_object) #const struct libusb_pollfd **libusb_get_pollfds(libusb_context *ctx); libusb_get_pollfds = libusb.libusb_get_pollfds @@ -809,7 +809,7 @@ libusb_get_pollfds.restype = libusb_pollfd_p_p libusb_set_pollfd_notifiers = libusb.libusb_set_pollfd_notifiers libusb_set_pollfd_notifiers.argtypes = [libusb_context_p, libusb_pollfd_added_cb_p, - libusb_pollfd_removed_cb_p, c_void_p] + libusb_pollfd_removed_cb_p, py_object] libusb_set_pollfd_notifiers.restype = None # /libusb.h -- 1.6.6 From plr.vincent@gmail.com Tue Jan 26 21:25:45 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZryq-0000fQ-Ei>; Tue, 26 Jan 2010 21:25:44 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZryq-0001Ur-Bp>; Tue, 26 Jan 2010 21:25:44 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so972231ewy.15 for ; Tue, 26 Jan 2010 12:25:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-length:x-uid:mime-version :content-type:content-transfer-encoding; bh=B4lq0k2cWdrMrnO9k3/NXtvwz704P9Wf+C0NnK0/nnA=; b=LsESR6Ti+XmZIgHqDZ9TjG5ZCXl2hujvAzOzhSt4k8vqxRlhoRx6ZFmM4pmvxOLkh+ ckZZmGUwI3EE6GLpLUJUIOujliKlKAUgZEMu/huggd3iEQ6npQH87/PN+SVUK3P498Oy EqI71Il4mycLqw0spbICNsKVa3bes8X3SuXzo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-length :x-uid:mime-version:content-type:content-transfer-encoding; b=mAeQetFvzMIrQnIzzjvC4Unodr2l0zzNdtT0NCoznwkMLg4wVr+tqqCjFMSm2b+Tkf o6hDPT+mJ2qPGBKAk2whpfs2claGXXAgq5cPUB5T7Woo+Tz7UI7ZlDOKbRHuruSi36wG IvbMsInJyZ0KJPAci7aV08rAgMcB1sh5dni50= Received: by 10.213.51.208 with SMTP id e16mr5631735ebg.26.1264537543825; Tue, 26 Jan 2010 12:25:43 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm5509837ewy.7.2010.01.26.12.25.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 26 Jan 2010 12:25:42 -0800 (PST) Message-Id: <201001262125.54952.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264537290.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264537290.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Tue, 26 Jan 2010 21:25:54 +0100 To: linux-minidisc@lists.fu-berlin.de X-Length: 3168 X-UID: 71428 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264537544-00000DDD-FF3A897B/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.321628, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 4/6] Make transfer "buffer" field a c_void_p type. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 20:25:45 -0000 This fields contains binary data, and ctypes' c_char_type stops reading when encountering NULL byte. --- netmd/libusb1.py | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/netmd/libusb1.py b/netmd/libusb1.py index 6796860..4aae1ad 100644 --- a/netmd/libusb1.py +++ b/netmd/libusb1.py @@ -466,7 +466,7 @@ libusb_transfer._fields_ = [('dev_handle', libusb_device_handle_p), ('actual_length', c_int), ('callback', libusb_transfer_cb_fn_p), ('user_data', py_object), - ('buffer', c_char_p), + ('buffer', c_void_p), ('num_iso_packets', c_int), ('iso_packet_desc', libusb_iso_packet_descriptor_p) ] @@ -609,9 +609,9 @@ def libusb_control_transfer_get_data(transfer): def libusb_control_transfer_get_setup(transfer): return cast(transfer, libusb_control_setup_p) -def libusb_fill_control_setup(buffer, bmRequestType, bRequest, wValue, wIndex, +def libusb_fill_control_setup(setup_p, bmRequestType, bRequest, wValue, wIndex, wLength): - setup = cast(buffer, libusb_control_setup_p).contents + setup = cast(setup_p, libusb_control_setup_p).contents setup.bmRequestType = bmRequestType setup.bRequest = bRequest setup.wValue = libusb_cpu_to_le16(wValue) @@ -644,6 +644,7 @@ def libusb_fill_control_transfer(transfer_p, dev_handle, buffer, callback, setup = cast(buffer, libusb_control_setup_p).contents transfer.length = LIBUSB_CONTROL_SETUP_SIZE + \ libusb_le16_to_cpu(setup.wLength) + transfer.buffer = cast(buffer, c_void_p) transfer.user_data = user_data transfer.callback = callback @@ -654,7 +655,7 @@ def libusb_fill_bulk_transfer(transfer_p, dev_handle, endpoint, buffer, length, transfer.endpoint = endpoint transfer.type = LIBUSB_TRANSFER_TYPE_BULK transfer.timeout = timeout - transfer.buffer = buffer + transfer.buffer = cast(buffer, c_void_p) transfer.length = length transfer.user_data = user_data transfer.callback = callback @@ -666,7 +667,7 @@ def libusb_fill_interrupt_transfer(transfer_p, dev_handle, endpoint, buffer, transfer.endpoint = endpoint transfer.type = LIBUSB_TRANSFER_TYPE_INTERRUPT transfer.timeout = timeout - transfer.buffer = buffer + transfer.buffer = cast(buffer, c_void_p) transfer.length = length transfer.user_data = user_data transfer.callback = callback -- 1.6.6 From plr.vincent@gmail.com Tue Jan 26 21:25:50 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZryv-0000i0-1l>; Tue, 26 Jan 2010 21:25:49 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZryu-0001Ur-V5>; Tue, 26 Jan 2010 21:25:49 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so972231ewy.15 for ; Tue, 26 Jan 2010 12:25:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-length:x-uid:mime-version :content-type:content-transfer-encoding; bh=qr4X9RslhcF/sdKhUJbouxl1ve2gthl6+Lzvt5AWpJc=; b=F2+EcvEcg+lM+/59bMIVSkRtrNxS4QgEgqViUpJED6WWxuTewzk3IPK2ZUhnlnEXNd DNYbDpELGAOM+dGwnGWBtWcnYav4V9I1RjWsvOzPYyBMynXbw5RXpfi/er68lE3nAA3I yaU6Trkw2LG8DjqCFppaLJHOf1po1JJH+xfJw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-length :x-uid:mime-version:content-type:content-transfer-encoding; b=dbeC6VfLwH/nj8bN7EvMho/WJDNxyvJMgWnGEUeWe5+XZ+BU/M3t/No1vHUv+VBRtL RjvcJRvTRzMoLB360L9WpKkYSej1+5esnDLwlpBSRJRQ+d7MXZXrD3rUwoBt1CKn9Uh/ RWvt6kZXHzMYlNRCvrpp9C1YnYC4/KpAq8AsM= Received: by 10.213.45.206 with SMTP id g14mr5073216ebf.64.1264537548654; Tue, 26 Jan 2010 12:25:48 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 13sm5492658ewy.13.2010.01.26.12.25.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 26 Jan 2010 12:25:47 -0800 (PST) Message-Id: <201001262125.59645.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264537290.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264537290.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Tue, 26 Jan 2010 21:25:59 +0100 To: linux-minidisc@lists.fu-berlin.de X-Length: 1856 X-UID: 71429 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264537549-00000DDD-4D7728E8/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.003718, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 5/6] Export methods to release resources. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 20:25:50 -0000 This allows user to work-around race conditions in interpreter shutdown, where context might be freed before handle - for example. --- netmd/usb1.py | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/netmd/usb1.py b/netmd/usb1.py index e9e3ea1..d22f52a 100644 --- a/netmd/usb1.py +++ b/netmd/usb1.py @@ -9,11 +9,19 @@ __all__ = ['LibUSBContext'] STRING_LENGTH = 256 class USBDeviceHandle(object): + handle = None + def __init__(self, handle): self.handle = handle def __del__(self): - libusb1.libusb_close(self.handle) + self.close() + + def close(self): + handle = self.handle + if handle is not None: + libusb1.libusb_close(handle) + self.handle = None def getConfiguration(self): configuration = c_int() @@ -313,8 +321,13 @@ class LibUSBContext(object): self.context_p = context_p def __del__(self): - if self.context_p is not None: - libusb1.libusb_exit(self.context_p) + self.exit() + + def exit(self): + context_p = self.context_p + if context_p is not None: + libusb1.libusb_exit(context_p) + self.context_p = None def getDeviceList(self): device_p_p = libusb1.libusb_device_p_p() -- 1.6.6 From plr.vincent@gmail.com Tue Jan 26 21:25:56 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZrz1-0000iU-SU>; Tue, 26 Jan 2010 21:25:55 +0100 Received: from ey-out-2122.google.com ([74.125.78.27]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZrz1-0001d5-Oc>; Tue, 26 Jan 2010 21:25:55 +0100 Received: by ey-out-2122.google.com with SMTP id d26so489480eyd.7 for ; Tue, 26 Jan 2010 12:25:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-length:x-uid:mime-version :content-type:content-transfer-encoding; bh=DFuV4rX9Q22+7HP0yExI7uaP4XDdm16m5EHJh8QmpOc=; b=PqtgqzKoCoynIbujxOgwDFe1z1Vf4U9D6U0DPQPn/UeF9+8n1AfEuR4RoQwfsLppS9 gCEsMvf9/UgCcaF7WhEqf/vHiwN/RFhD96TQ8q6D1FQBl4PCgaoSpoD/t5LVcv/XHeGY hsyl2G+8xiiimMmQpEix6WgAEi3WwxK/yPVAI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-length :x-uid:mime-version:content-type:content-transfer-encoding; b=SwnG+TgiwdGid2S3jNwJfxh5BIRdnY3LbF5obW7btPlNiAfVB0hNjfvIuA+iXyCVTs KNO9zKrIVl9CgZSW+ARoXws7CdoM6BbKWkAjo1PnqbgGzg5pgZkI58DY1RGr4fdvs0Ex Q7LmdkPT2gut3YibG5h8PPF1FHTnm27sCkBZI= Received: by 10.213.44.9 with SMTP id y9mr6595942ebe.71.1264537555352; Tue, 26 Jan 2010 12:25:55 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 13sm5499126ewy.9.2010.01.26.12.25.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 26 Jan 2010 12:25:52 -0800 (PST) Message-Id: <201001262126.04130.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264537290.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264537290.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Tue, 26 Jan 2010 21:26:03 +0100 To: linux-minidisc@lists.fu-berlin.de X-Length: 5641 X-UID: 71430 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 74.125.78.27 X-purgate: clean X-purgate-ID: 151147::1264537555-00000DDD-333C1FDA/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.003880, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 6/6] Implement asynchronous transfers. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 20:25:56 -0000 --- netmd/usb1.py | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 105 insertions(+), 1 deletions(-) diff --git a/netmd/usb1.py b/netmd/usb1.py index d22f52a..34731b3 100644 --- a/netmd/usb1.py +++ b/netmd/usb1.py @@ -1,6 +1,6 @@ # pyusb compatibility layer for libus-1.0 import libusb1 -from ctypes import byref, create_string_buffer, c_int +from ctypes import byref, create_string_buffer, c_int, sizeof, POINTER from cStringIO import StringIO __all__ = ['LibUSBContext'] @@ -162,6 +162,72 @@ class USBDeviceHandle(object): transferred = self._interruptTransfer(endpoint, data, length, timeout) return data.raw[:transferred] + def _getTransfer(self, iso_packets=0): + result = libusb1.libusb_alloc_transfer(iso_packets) + if not result: + raise libusb1.USBError, 'Unable to get a transfer object' + return result + + def fillBulkTransfer(self, transfer, endpoint, string_buffer, + callback, user_data, timeout): + libusb1.libusb_fill_bulk_transfer(transfer, self.handle, + endpoint, string_buffer, sizeof(string_buffer), + libusb1.libusb_transfer_cb_fn_p(callback), user_data, + timeout) + + def getBulkTransfer(self, endpoint, string_buffer, callback, + user_data=None, timeout=0): + result = self._getTransfer() + self.fillBulkTransfer(result, endpoint, string_buffer, callback, + user_data, timeout) + return result + + def fillInterruptTransfer(self, transfer, endpoint, string_buffer, + callback, user_data, timeout): + libusb1.libusb_fill_interrupt_transfer(transfer, self.handle, + endpoint, string_buffer, sizeof(string_buffer), + libusb1.libusb_transfer_cb_fn_p(callback), user_data, + timeout) + + def getInterruptTransfer(self, endpoint, string_buffer, callback, + user_data=None, timeout=0): + result = self._getTransfer() + self.fillInterruptTransfer(result, endpoint, string_buffer, + callback, user_data, timeout) + return result + + def fillControlSetup(self, string_buffer, request_type, request, value, + index, length): + libusb1.libusb_fill_control_setup(string_buffer, request_type, + request, value, index, length) + + def fillControlTransfer(self, transfer, setup, callback, + user_data, timeout): + libusb1.libusb_fill_control_transfer(transfer, self.handle, + setup, libusb1.libusb_transfer_cb_fn_p(callback), user_data, + timeout) + + def getControlTransfer(self, setup, callback, user_data=None, timeout=0): + result = self._getTransfer() + self.fillControlTransfer(result, setup, callback, user_data, timeout) + return result + + def fillISOTransfer(self, *args, **kw): + raise NotImplementedError + + def getISOTransfer(self, *args, **kw): + raise NotImplementedError + + def submitTransfer(self, transfer): + result = libusb1.libusb_submit_transfer(transfer) + if result: + raise libusb1.USBError, result + + def cancelTransfer(self, transfer): + result = libusb1.libusb_cancel_transfer(transfer) + if result: + raise libusb1.USBError, result + class USBDevice(object): configuration_descriptor_list = None @@ -347,3 +413,41 @@ class LibUSBContext(object): result = None return result + def getPollFDList(self): + pollfd_p_p = libusb1.libusb_get_pollfds(self.context_p) + result = [] + append = result.append + fd_index = 0 + while pollfd_p_p[fd_index]: + append((pollfd_p_p[fd_index].contents.fd, + pollfd_p_p[fd_index].contents.events)) + fd_index += 1 + return result + + def handleEvents(self): + result = libusb1.libusb_handle_events(self.context_p) + if result: + raise libusb1.USBError, result + + def handleEventsTimeout(self, tv=None): + assert tv is None, 'tv parameter is not supported yet' + tv = libusb1.timeval(0, 0) + result = libusb1.libusb_handle_events_timeout(self.context_p, byref(tv)) + if result: + raise libusb1.USBError, result + + def setPollFDNotifiers(self, added_cb=None, removed_cb=None, user_data=None): + if added_cb is None: + added_cb = POINTER(None) + else: + added_cb = libusb1.libusb_pollfd_added_cb_p(added_cb) + if removed_cb is None: + removed_cb = POINTER(None) + else: + removed_cb = libusb1.libusb_pollfd_removed_cb_p(removed_cb) + libusb1.libusb_set_pollfd_notifiers(self.context_p, added_cb, + removed_cb, user_data) + + def getNextTimeout(self): + return libusb1.libusb_get_next_timeout(self.context_p, None) + -- 1.6.6 From plr.vincent@gmail.com Tue Jan 26 21:52:58 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZsPA-0001ad-GG>; Tue, 26 Jan 2010 21:52:56 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NZsPA-0007lA-DR>; Tue, 26 Jan 2010 21:52:56 +0100 Received: by ewy28 with SMTP id 28so1003746ewy.15 for ; Tue, 26 Jan 2010 12:52:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:mime-version:content-type:content-transfer-encoding :message-id; bh=PtXHtp8aRRWac8gKpBRJiKxFKMysSamxg2n9SE5v42s=; b=lB0bhQoe0cqdeArdVV9+DNdAgCfSzQ2aRPNVUdBODMNL3LimcFVbj9msL2FLy56DjA XpUkVmx7DVl9KQjdPms6zlD8khr016ZVGGRnQkLhZeYGuTFVib/PjR18FMn8nUb8v8Mj 0EmbBuumlk+Txx6gMt1Garr3ITM/Z0E+jp0/g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:mime-version:content-type :content-transfer-encoding:message-id; b=oNq58xTNyNVO0zQLBlda2Ah25E6ufynpo0Ne17OR7AipqyXvnCKpwvroa+ksq8+cjm Xz2VrlLs0v8JGbk2DzkGKZQ8uDZRlrNtnh82ij7Y4/rIDBO/LPXPpolD6iqbqm013tS5 mPHs2urA7s8Om6qzuj0RXGV5jZuzkbZKhxiZo= Received: by 10.213.2.67 with SMTP id 3mr5529649ebi.77.1264539175224; Tue, 26 Jan 2010 12:52:55 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm5525647ewy.11.2010.01.26.12.52.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 26 Jan 2010 12:52:54 -0800 (PST) From: Vincent Pelletier To: linux-minidisc@lists.fu-berlin.de Date: Tue, 26 Jan 2010 21:53:05 +0100 User-Agent: KMail/1.12.4 (Linux/2.6.30-1-amd64; KDE/4.3.4; x86_64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201001262153.05371.plr.vincent@gmail.com> X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264539176-00000DDD-2A219429/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.285009, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] Patch serie on libusb1.py / usb1.py X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 20:52:58 -0000 Hi. Those patches are not (yet ?) used in libnetmd.py, but I developed them for another project (...doing some RE on another toy from Sony). So I felt like contributing them back... Also, I am currently working on (yet another) usb toy which will most certainly use this library now it has asynchronous transfer support, so I might push some more fixes in. I don't plan making use of asynchronous API in netmd support just yet - if you want, feel free :) . Note though that I'm getting strange behaviors (...segfaults on interpreter shutdown, especially when cleanup code isn't called because an exception was thrown somewhere, reaching interpreter). Please mail me if you need any advice/help fixing those issues (I don't have enough motivation for it yet, it might come a bit later with my current project). FYI, my current project is to add linux support to a nice USB 1.1 + 2.0 protocol analyzer I bought recently ($400, which is very reasonable for a ready-to-use device, compared to market prices AFAIK). The company explicitly allowed me to reverse-engineer their software - they distribute it free (as in beer). More on their website: http://www.internationaltestinstruments.com/ They ship worldwide, and currently only have one device on their list at the moment. ...and no, I'm not paid by them ;) . Just quite exited since 2 weeks ago. -- Vincent Pelletier From plr.vincent@gmail.com Wed Jan 27 22:22:20 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaFL9-0004T2-Jv>; Wed, 27 Jan 2010 22:22:19 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaFL9-0006Pk-H5>; Wed, 27 Jan 2010 22:22:19 +0100 Received: by ewy28 with SMTP id 28so1342092ewy.15 for ; Wed, 27 Jan 2010 13:22:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:date:subject :to:x-bogosity:mime-version:content-type:content-transfer-encoding; bh=p45A+UEhb0wAsYLOkcrfa8KPTX1PJgtdClqWycwmvTM=; b=UxKBFzyXp4MqENirmxEWxKKVy7sasiNkLvgY119pP8v5id90gWC7C+ELCA+s+WrIPN YvckkwJrdxMjhTF3V0LU74Ftp4ysgDQSYS/9BMoIYXYwj5mhYjOQgVhOl3L7e7l0Huc/ P7Qt5KF8hgQy/sn+rlGUWd4lUoMKzS8P5+GfU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:date:subject:to:x-bogosity:mime-version :content-type:content-transfer-encoding; b=n+Tqss1a1Ua7tBfGpseJzP4ijCy2B6gF5n0b3tnEPsslKEI8mA4Z/6hoSRgootF1Z6 LMUGrjzujEkTWzcQGsnp6ZoTpfYizT/R3t6fTBbucK4EK8BuAOlRYyyCL9HZZGr1FivT T+AJDyC/7E4knFjD5R99vt7qbAkoiNDoEVW70= Received: by 10.213.96.198 with SMTP id i6mr1727474ebn.10.1264627339035; Wed, 27 Jan 2010 13:22:19 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 13sm224011ewy.13.2010.01.27.13.22.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 13:22:18 -0800 (PST) Message-Id: <201001272222.31976.plr.vincent@gmail.com> From: Vincent Pelletier Date: Wed, 27 Jan 2010 22:22:31 +0100 To: linux-minidisc@lists.fu-berlin.de MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264627339-00000DDD-03AFE034/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.091985, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 1/4] device_address is an integer, call getDeviceAddress on device. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 21:22:20 -0000 --- netmd/libnetmd.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index a2c1cf2..1d1d531 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -66,7 +66,7 @@ def iterdevices(usb_context, bus=None, device_address=None): if bus is not None and bus != device.getBusNumber(): continue if device_address is not None and \ - device != device_address.getDeviceAddress(): + device_address != device.getDeviceAddress(): continue if (device.getVendorID(), device.getProductID()) in KNOWN_USB_ID_SET: yield NetMD(device.open()) -- 1.6.6 From plr.vincent@gmail.com Wed Jan 27 22:22:29 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaFLI-0004TS-0J>; Wed, 27 Jan 2010 22:22:28 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaFLH-0006Pk-Te>; Wed, 27 Jan 2010 22:22:27 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so1342092ewy.15 for ; Wed, 27 Jan 2010 13:22:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-bogosity:mime-version :content-type:content-transfer-encoding; bh=7SkPZpLr71iblXJ9EgOW0LVGGgotCkgfUeZlusHCRBk=; b=l+rl7HqSu0Avt6QuveIhmD/NND/stkYWbEukflIDmSVW29Fe10NSxiE/tCCxDqCFNF Mt2mKhygYNZ0+QgH2myo+hjgMmS/itnBiQyQy58O5dL57AQstfs1mQJZakv9QwjuLsZ/ OS3UsTwoUWVHlDotfiw82zvZFv0EEa0oQEX/A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-bogosity :mime-version:content-type:content-transfer-encoding; b=hU8IdI1hDbXbqYcHSTG5gbxZ45g/mw1Df14P+zMRSg0wqwvvsi5QLorQM0eObLTWaS LkQDw+2AoWCHkzfZFtP7Zc1sCWK0x7AE3knITYNGPJiPvDgTQAfFrax2gLDH0IO9ahzm RJsT+OqmmHBCN75FemS6sKrHeyp4KirD008rk= Received: by 10.213.25.75 with SMTP id y11mr5887088ebb.5.1264627347490; Wed, 27 Jan 2010 13:22:27 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm211985ewy.11.2010.01.27.13.22.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 13:22:26 -0800 (PST) Message-Id: <201001272222.40369.plr.vincent@gmail.com> In-Reply-To: References: From: Vincent Pelletier Date: Wed, 27 Jan 2010 22:22:40 +0100 To: linux-minidisc@lists.fu-berlin.de MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264627348-00000DDD-9657A219/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.019378, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 2/4] Replace tabulations by spaces. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 21:22:29 -0000 --- netmd/usb1.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/netmd/usb1.py b/netmd/usb1.py index 34731b3..c5d9f77 100644 --- a/netmd/usb1.py +++ b/netmd/usb1.py @@ -197,15 +197,15 @@ class USBDeviceHandle(object): return result def fillControlSetup(self, string_buffer, request_type, request, value, - index, length): + index, length): libusb1.libusb_fill_control_setup(string_buffer, request_type, - request, value, index, length) + request, value, index, length) def fillControlTransfer(self, transfer, setup, callback, user_data, timeout): libusb1.libusb_fill_control_transfer(transfer, self.handle, setup, libusb1.libusb_transfer_cb_fn_p(callback), user_data, - timeout) + timeout) def getControlTransfer(self, setup, callback, user_data=None, timeout=0): result = self._getTransfer() -- 1.6.6 From plr.vincent@gmail.com Wed Jan 27 22:22:35 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaFLO-0004Ts-S8>; Wed, 27 Jan 2010 22:22:34 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaFLO-0006Pk-P2>; Wed, 27 Jan 2010 22:22:34 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so1342092ewy.15 for ; Wed, 27 Jan 2010 13:22:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-bogosity:mime-version :content-type:content-transfer-encoding; bh=wipYzES0MJI5818LqshOrcjk12eJ2Krs0t9SEHnEZEo=; b=jjYQCmjsXDmMUF0kR+Xlph17VX9Zl6C6+WcD4o8ldRFARNM9gtOf3XQiMRq5UIyKlF Og3PAdI9hiYvaRgVN/b9+J2hl4OtcEA8E+59sUlpCHQhwYYdrc7HAe9O8KBZbXFnxtL4 JqSIuA1FRG2slp2Ie0zipWhowsjniNjZdW0j4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-bogosity :mime-version:content-type:content-transfer-encoding; b=qHaAETOoeBoMprVPg3WwjiYbjBxkRrh+8i7cm115EGl5pTjUuQcHhhKwfQz48NY/9A gk+X1NXM4S1qBrqH6UP0u7+BnOdc4cWmCYKM+bbKplcBTIYPVjd1yg/R7EoZTB4nQ/ZH mX38XJum+L4AJ8eEJ+BOcjEmvIKqBNWHE95P4= Received: by 10.213.100.7 with SMTP id w7mr5845263ebn.23.1264627354539; Wed, 27 Jan 2010 13:22:34 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 15sm223438ewy.12.2010.01.27.13.22.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 13:22:32 -0800 (PST) Message-Id: <201001272222.45666.plr.vincent@gmail.com> In-Reply-To: References: From: Vincent Pelletier Date: Wed, 27 Jan 2010 22:22:45 +0100 To: linux-minidisc@lists.fu-berlin.de MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264627354-00000DDD-7DCD6D54/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.271073, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 3/4] Fix segfaults at interpreter exit. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 21:22:36 -0000 --- netmd/usb1.py | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/netmd/usb1.py b/netmd/usb1.py index c5d9f77..925adfc 100644 --- a/netmd/usb1.py +++ b/netmd/usb1.py @@ -11,7 +11,10 @@ STRING_LENGTH = 256 class USBDeviceHandle(object): handle = None - def __init__(self, handle): + def __init__(self, context, handle): + # XXX Context parameter is just here as a hint for garbage collector: + # It must collect USBDeviceHandle instance before their LibUSBContext. + self.context = context self.handle = handle def __del__(self): @@ -232,7 +235,8 @@ class USBDevice(object): configuration_descriptor_list = None - def __init__(self, device_p): + def __init__(self, context, device_p): + self.context = context libusb1.libusb_ref_device(device_p) self.device_p = device_p # Fetch device descriptor @@ -373,7 +377,7 @@ class USBDevice(object): result = libusb1.libusb_open(self.device_p, byref(handle)) if result: raise libusb1.USBError, result - return USBDeviceHandle(handle) + return USBDeviceHandle(self.context, handle) class LibUSBContext(object): @@ -399,7 +403,7 @@ class LibUSBContext(object): device_p_p = libusb1.libusb_device_p_p() device_list_len = libusb1.libusb_get_device_list(self.context_p, byref(device_p_p)) - result = [USBDevice(x) for x in device_p_p[:device_list_len]] + result = [USBDevice(self, x) for x in device_p_p[:device_list_len]] # XXX: causes problems, why ? #libusb1.libusb_free_device_list(device_p_p, 1) return result @@ -408,7 +412,7 @@ class LibUSBContext(object): handle_p = libusb1.libusb_open_device_with_vid_pid(self.context_p, vendor_id, product_id) if handle_p: - result = USBDeviceHandle(handle_p) + result = USBDeviceHandle(self, handle_p) else: result = None return result -- 1.6.6 From plr.vincent@gmail.com Wed Jan 27 22:22:40 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaFLT-0004UI-4a>; Wed, 27 Jan 2010 22:22:39 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaFLT-0006Pk-1g>; Wed, 27 Jan 2010 22:22:39 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so1342092ewy.15 for ; Wed, 27 Jan 2010 13:22:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-bogosity:mime-version :content-type:content-transfer-encoding; bh=fqwmFpACM6s3jGkZ3o8dZfKoXcVEg7dp081x0VMt/qY=; b=K0OEKj3mKzTAAw5oh44HJ4DF3qIvwAs9SsaEQBlwRtqqcG0dvwV48jbf68hFpORkLk x148elXjKxaZuTA42bO4f26Zy5lqjTVbgDUnL6wfOWYffl4fMrjwV1Wm81GvBViHoAdk VUBcxYqgBGBQMj/8TeElv6FHAcd00N5HZuwUo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-bogosity :mime-version:content-type:content-transfer-encoding; b=Dw02AZL4MSLzee3Anyn+hho9+6ibObRu/ybjDBThrAY62zbUPF7Md2bCbb+MmAt6wV t4q3sGcT7cjXZR5kqdCNp9kvJiyL36J/VXztmlT6G5DaF6SJW/c4pKHWnlIIlCOipGUr zlS7JiVbR3OEnEqRoiN1/DO0qUdDx+/LfawBU= Received: by 10.213.44.18 with SMTP id y18mr681243ebe.69.1264627358843; Wed, 27 Jan 2010 13:22:38 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 13sm225583ewy.9.2010.01.27.13.22.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 13:22:38 -0800 (PST) Message-Id: <201001272222.51873.plr.vincent@gmail.com> In-Reply-To: References: From: Vincent Pelletier Date: Wed, 27 Jan 2010 22:22:51 +0100 To: linux-minidisc@lists.fu-berlin.de MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264627359-00000DDD-2C24584A/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.280594, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 4/4] Add helper classes for asynchronous reads. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 21:22:40 -0000 --- netmd/usb1.py | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 123 insertions(+), 0 deletions(-) diff --git a/netmd/usb1.py b/netmd/usb1.py index 925adfc..cd0711b 100644 --- a/netmd/usb1.py +++ b/netmd/usb1.py @@ -8,6 +8,129 @@ __all__ = ['LibUSBContext'] # Default string length STRING_LENGTH = 256 +EVENT_CALLBACK_SET = frozenset(( + libusb1.LIBUSB_TRANSFER_COMPLETED, + libusb1.LIBUSB_TRANSFER_ERROR, + libusb1.LIBUSB_TRANSFER_TIMED_OUT, + libusb1.LIBUSB_TRANSFER_CANCELLED, + libusb1.LIBUSB_TRANSFER_STALL, + libusb1.LIBUSB_TRANSFER_NO_DEVICE, + libusb1.LIBUSB_TRANSFER_OVERFLOW, +)) + +DEFAULT_ASYNC_TRANSFER_ERROR_CALLBACK = lambda x, y: False + +class USBAsyncReaderBase(object): + _handle = None + _submited = False + + def __init__(self, handle, endpoint, size, user_data=None, timeout=0): + data = create_string_buffer(size) + self._data = data + self._transfer = self._getTransfer( + handle, + endpoint, + data, + self._callbackDispatcher, + user_data, + timeout, + ) + # XXX: set _handle *after* _transfer, so __del__ doesn't get an + # exception if called during constructor execution. + self._handle = handle + self._event_callback_dict = {} + self._errorCallback = DEFAULT_ASYNC_TRANSFER_ERROR_CALLBACK + + def submit(self): + self._submited = True + self._handle.submitTransfer(self._transfer) + + def cancel(self): + self._handle.cancelTransfer(self._transfer) + self._submited = False + + def setEventCallback(self, event, callback): + if event not in EVENT_CALLBACK_SET: + raise ValueError, 'Unknown event %r.' % (event, ) + self._event_callback_dict[event] = callback + + def setDefaultCallback(self, callback): + self._errorCallback = callback + + def getEventCallback(self, event, default=None): + return self._event_callback_dict.get(event, default) + + def _callbackDispatcher(self, transfer_p): + transfer = self._transfer.contents #transfer_p.contents + if self.getEventCallback(transfer.status, self._errorCallback)( + transfer, self._data): + self.submit() + else: + self._submited = False + + def isSubmited(self): + return self._submited + + def __del__(self): + if self._handle is not None: + try: + self.cancel() + except libusb1.USBError, exception: + if exception.value != libusb1.LIBUSB_ERROR_NOT_FOUND: + raise + +class USBAsyncBulkReader(USBAsyncReaderBase): + def _getTransfer(self, handle, *args, **kw): + return handle.getBulkTransfer(*args, **kw) + +class USBAsyncInterruptReader(USBAsyncReaderBase): + def _getTransfer(self, handle, *args, **kw): + return handle.getInterruptTransfer(*args, **kw) + +class USBPoller(object): + def __init__(self, context, poller): + self.context = context + self.poller = poller + fd_set = set() + self.fd_set = fd_set + context.setPollFDNotifiers(self._registerFD, self._unregisterFD) + for fd, events in context.getPollFDList(): + self._registerFD(fd, events) + + def poll(self, timeout=None): + fd_set = self.fd_set + next_usb_timeout = self.context.getNextTimeout() + if next_usb_timeout == 0: + next_usb_timeout = None + if timeout is None: + usb_timeout = next_usb_timeout + else: + usb_timeout = min(next_usb_timeout or timeout, timeout) + event_list = self.poller.poll(usb_timeout) + event_list_len = len(event_list) + if event_list_len: + result = [(x, y) for x, y in event_list if x not in fd_set] + if len(result) != event_list_len: + self.context.handleEventsTimeout() + else: + result = event_list + self.context.handleEventsTimeout() + return result + + def register(self, fd, events): + self.poller.register(fd, events) + + def unregister(self, fd): + self.poller.unregister(fd) + + def _registerFD(self, fd, events, user_data=None): + self.fd_set.add(fd) + self.register(fd, events) + + def _unregisterFD(self, fd, user_data=None): + self.unregister(fd) + self.sd_set.discard(fd) + class USBDeviceHandle(object): handle = None -- 1.6.6 From glaubitz@physik.fu-berlin.de Wed Jan 27 23:28:52 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaGNX-0006MD-L6>; Wed, 27 Jan 2010 23:28:51 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1NaGNX-0001eq-Iz>; Wed, 27 Jan 2010 23:28:51 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NaGNX-0005MJ-E0; Wed, 27 Jan 2010 23:28:51 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1NaGNX-0006dq-C7; Wed, 27 Jan 2010 23:28:51 +0100 Date: Wed, 27 Jan 2010 23:28:51 +0100 To: Vincent Pelletier Message-ID: <20100127222851.GA25198@physik.fu-berlin.de> References: <201001262153.05371.plr.vincent@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001262153.05371.plr.vincent@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264631331-00000DDD-85D7EEBB/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.051486, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] Patch serie on libusb1.py / usb1.py X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 22:28:52 -0000 Hi Vincent, On Tue, Jan 26, 2010 at 09:53:05PM +0100, Vincent Pelletier wrote: > Hi. > > Those patches are not (yet ?) used in libnetmd.py, but I developed them for > another project (...doing some RE on another toy from Sony). > So I felt like contributing them back... I'm really amazed by the vast amount of patches you sent in and I'm really glad that there is coming input from so many people. Great work! I will be busy tomorrow but I think I can have a look at the patches over the weekend, maybe together with Michael. Do you think the patches are safe to be applied to the current NetMD-Python code in git-master? @Michael: What do you think? Greetings, Adrian From plr.vincent@gmail.com Thu Jan 28 00:03:14 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaGul-0007Lg-DT>; Thu, 28 Jan 2010 00:03:11 +0100 Received: from ey-out-2122.google.com ([74.125.78.25]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaGul-0007uL-AU>; Thu, 28 Jan 2010 00:03:11 +0100 Received: by ey-out-2122.google.com with SMTP id d26so42516eyd.3 for ; Wed, 27 Jan 2010 15:03:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=+axuQbNXeJ+dkH5pht4mJSa+BlJBKraqyhwANphieRM=; b=g4N7uT5TOxxVn6fgg4nAPPSmMHnx8LK2Ao721Ynkz4gNczD4YmDoejNaBu/JkYZgYE 5TwHbiRWU110UnlcxoaI1iYJsVGp6TLKQNAGzjjttrWuKGun3mSJlHPwYw/REpM0x1Xj rfiZyfNspoSYX2Er1lcK1MVlcwV61MuB6uC24= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=vzPJC4PquobE/swXs9R1m8boUjT+q6dCxTnClwi0ts95ALtwe5neAEas4k/f9nzfgn zOclfSt78eapJnJDL7nBTS0s9gDqSyu9SPQtCtd5WPazitkypcoJLSUmY0uLWzwwEB+h uH9ZL8kTnCOxcM7bE+d4wpStbSSHnQWQWdmvI= Received: by 10.213.46.67 with SMTP id i3mr360536ebf.87.1264633390780; Wed, 27 Jan 2010 15:03:10 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm269213ewy.3.2010.01.27.15.03.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 15:03:09 -0800 (PST) From: Vincent Pelletier To: Adrian Glaubitz Date: Thu, 28 Jan 2010 00:03:22 +0100 User-Agent: KMail/1.12.4 (Linux/2.6.30-1-amd64; KDE/4.3.4; x86_64; ; ) References: <201001262153.05371.plr.vincent@gmail.com> <20100127222851.GA25198@physik.fu-berlin.de> In-Reply-To: <20100127222851.GA25198@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201001280003.23361.plr.vincent@gmail.com> X-Originating-IP: 74.125.78.25 X-purgate: clean X-purgate-ID: 151147::1264633391-00000DDD-7CDA8352/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.186253, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] Patch serie on libusb1.py / usb1.py X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 23:03:14 -0000 Hi Adrian, Le mercredi 27 janvier 2010 23:28:51, Adrian Glaubitz a =E9crit : > I'm really amazed by the vast amount of patches you sent in Please don't look at their content ;) . Many a re stupid typos, codepaths=20 never executed and with undefined variables, or fixing stupid comments. There are actually few patches really adding features, and some are still=20 missing or not tested properly. > and I'm > really glad that there is coming input from so many people. Great > work! I will be busy tomorrow but I think I can have a look at the > patches over the weekend, maybe together with Michael. Do you think > the patches are safe to be applied to the current NetMD-Python code in > git-master? They should not touch any codepath used in current netmd code, so I believe= it=20 is safe to apply them... But I admit not testing them at all with NetMD-Pyt= hon=20 apps. I'll test them soon (tomorrow ?) as I have some MDs to transfer to my compu= ter=20 (still analogically, though, since I didn't change my MD player). Also, I finally started a github account[1] for my current USB analyser wor= k,=20 and created a tree for just my generic python libusb files (libusb1.py and= =20 usb1.py). I intent to keep sending patches to your mailing list as I includ= e=20 them in github, but if you prefer I can send a "delete lib and add a=20 dependency" patch (less work for you, but probably more breakage if I'm not= =20 careful enough ;) )... =46or now I (by default) don't trust github, so I would feel safer with kee= ping=20 a copy on your repository. [1] http://github.com/vpelletier Regards, =2D-=20 Vincent Pelletier From plr.vincent@gmail.com Thu Jan 28 08:40:26 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzJ-0005H3-IW>; Thu, 28 Jan 2010 08:40:25 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzJ-0003xv-FT>; Thu, 28 Jan 2010 08:40:25 +0100 Received: by ewy28 with SMTP id 28so83214ewy.15 for ; Wed, 27 Jan 2010 23:40:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:date:subject :to:x-bogosity:mime-version:content-type:content-transfer-encoding; bh=bfSKxf2uL87csvbTOqf4wxaQrH4M8yIkUYaps4tWxhc=; b=OxDaip4Q7skV245T6B3qoIx06EZHnFdCmk6t0gj2mwrF0xor60V+IbhV9cs+qw8NCr vAQBpJ0dMdu1olgbZoUBgm+bcJ25qFwPDS3cnf2HKNFU1s8yDGhzVniSwueMfL2e3HMi YVSRhkRVyR8SeELl7526o5Tup5Gd85FtoconY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:date:subject:to:x-bogosity:mime-version :content-type:content-transfer-encoding; b=JF5NmPVA92J+Vb6edPmLoN5tjXU8p9bXngTpCpBUQVT9JmlJkZayjvIuMbSgDGoC4v UhtKdOvOrIOugx8rmiU3FuyMHfNRgBuEfA+wg4TCbjEvFAcCyRowmhNRUSgkI9yrhD/B g93sXKOmMODBzCvjSY02MJw0+/VvINtAbw5Xc= Received: by 10.213.1.143 with SMTP id 15mr915784ebf.42.1264664423747; Wed, 27 Jan 2010 23:40:23 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 13sm478558ewy.5.2010.01.27.23.40.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 23:40:22 -0800 (PST) Message-Id: <201001280840.37393.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:40:37 +0100 To: linux-minidisc@lists.fu-berlin.de MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264664425-00000DDD-44519EC6/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.110876, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 1/7] Change method name: this method returns a list, not a dict. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 07:40:26 -0000 --- netmd/libnetmd.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index 1d1d531..def234a 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -663,7 +663,7 @@ class NetMDInterface(object): title = ''; return title - def getTrackGroupDict(self): + def getTrackGroupList(self): """ Return a list representing track groups. This list is composed of 2-tuples: -- 1.6.6 From plr.vincent@gmail.com Thu Jan 28 08:40:29 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzM-0005HU-3A>; Thu, 28 Jan 2010 08:40:28 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzM-0003xv-0L>; Thu, 28 Jan 2010 08:40:28 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so83214ewy.15 for ; Wed, 27 Jan 2010 23:40:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-bogosity:mime-version :content-type:content-transfer-encoding; bh=wi9Gk6vHnbWpuDBTas9PQGv2YxMDgmG8u5N8+k99Ngw=; b=Csw6eV55w46pyA49GV3zlGpSZ3TR4EszKnDfgFTpqIhGyWaHt9CepPE4vESDWRSzgn dR14rs1s2S2RZ33pxy/kcXoI2qs5kzy5qDOxsBjGTD8b30ZIVpXcLS8CxBhiarOjU2mZ PzQbs1Q9eZEER7mWyGPdVzyl18anXkoUc7ZFw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-bogosity :mime-version:content-type:content-transfer-encoding; b=KnGtZxHw9BC1fQBG4E0sNsYvFckqd9m5701593v8+PYmGZ2xLs0VC4R0nyg/NOAZzy YGpgeIi1ZX4X0+tJ8RY0NlfeppCYEa0GBw8R3yb4MYxEvzwTBEnynvAEcZaxv9PWOYg5 BvLXxLHaukBeT597lidJPveBcW/TmeQe7mXQI= Received: by 10.213.96.198 with SMTP id i6mr2303938ebn.10.1264664427711; Wed, 27 Jan 2010 23:40:27 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 15sm476823ewy.12.2010.01.27.23.40.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 23:40:27 -0800 (PST) Message-Id: <201001280840.42477.plr.vincent@gmail.com> In-Reply-To: <2702a83a144bb5e6aec603b44e868c8465992f3f.1264664391.git.plr.vincent@gmail.com> References: <2702a83a144bb5e6aec603b44e868c8465992f3f.1264664391.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:40:42 +0100 To: linux-minidisc@lists.fu-berlin.de MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264664428-00000DDD-C79FBF2C/0-0/0-0 X-Bogosity: Unsure, tests=bogofilter, spamicity=0.475179, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: xx X-Spam-Status: No, score=2.9 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,FU_BOGO_UNSURE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 2/7] Always check group track are in disk boundaries. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 07:40:29 -0000 --- netmd/libnetmd.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index def234a..a66a9d9 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -674,6 +674,7 @@ class NetMDInterface(object): raw_title = self._getDiscTitle() group_list = raw_title.split('//') track_dict = {} + track_count = self.getTrackCount() result = [] append = result.append for group_index, group in enumerate(group_list): @@ -684,12 +685,14 @@ class NetMDInterface(object): track_range, group_name = group.split(';', 1) if '-' in track_range: track_min, track_max = track_range.split('-') - assert track_min < track_max, '%r, %r' % (track_min, track_max) else: track_min = track_max = track_range + track_min, track_max = int(track_min), int(track_max) + assert 0 <= track_min <= track_max <= track_count, ( + track_min, track_max, track_count) track_list = [] track_append = track_list.append - for track in xrange(int(track_min) - 1, int(track_max)): + for track in xrange(track_min - 1, track_max): if track in track_dict: raise ValueError, 'Track %i is in 2 groups: %r[%i] & ' \ '%r[%i]' % (track, track_dict[track][0], -- 1.6.6 From plr.vincent@gmail.com Thu Jan 28 08:40:35 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzS-0005Hw-EY>; Thu, 28 Jan 2010 08:40:34 +0100 Received: from ey-out-2122.google.com ([74.125.78.27]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzS-000406-Bi>; Thu, 28 Jan 2010 08:40:34 +0100 Received: by ey-out-2122.google.com with SMTP id d26so123074eyd.3 for ; Wed, 27 Jan 2010 23:40:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-bogosity:mime-version :content-type:content-transfer-encoding; bh=+OMFPvEEmOuQ3j7SdcC6LwDAhlWje81PunwL3IdCFRU=; b=YdWai5Qo+FAqFrMEEk8S9a5L9qy272NQEvFSTx18ZmyTGkDaAcQxli2lpm5LHYaBXa FndDFfw9Y4wj5BL0o5Et2cCtqyDU9CMIM9ZjhvIWCwAxnnk36noCIKtCY3J3QOuX4sWH 0cCu+Iao6dRPuMi0/ad9AHQ6fALyuy3v6lwxQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-bogosity :mime-version:content-type:content-transfer-encoding; b=epUwf+38EKmQ/p9AXDt0d69oVPROnq0Kqaob06Kic7GLrR2ln/G5aB5puBkviCaytS WGHbF5bQKdbYgLbKoAasQ0RCtKz+xf35riltbczN2lIyxLzV8AsHq7HteiEAwmZPY/YZ dRurYhY4sO3jmg7Icy/MIEuOHRvhKJkvNXWPg= Received: by 10.213.109.219 with SMTP id k27mr8116852ebp.37.1264664433970; Wed, 27 Jan 2010 23:40:33 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 13sm478026ewy.13.2010.01.27.23.40.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 23:40:33 -0800 (PST) Message-Id: <201001280840.48502.plr.vincent@gmail.com> In-Reply-To: <2702a83a144bb5e6aec603b44e868c8465992f3f.1264664391.git.plr.vincent@gmail.com> References: <2702a83a144bb5e6aec603b44e868c8465992f3f.1264664391.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:40:48 +0100 To: linux-minidisc@lists.fu-berlin.de MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 74.125.78.27 X-purgate: clean X-purgate-ID: 151147::1264664434-00000DDD-86696C3F/0-0/0-0 X-Bogosity: Unsure, tests=bogofilter, spamicity=0.470027, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Benin.ZEDAT.FU-Berlin.DE X-Spam-Level: xx X-Spam-Status: No, score=2.9 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,FU_BOGO_UNSURE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 3/7] Put group name in return value, rather than its computed index. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 07:40:35 -0000 --- netmd/libnetmd.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index a66a9d9..5a9829e 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -699,7 +699,7 @@ class NetMDInterface(object): track_dict[track][1], group_name, group_index) track_dict[track] = group_name, group_index track_append(track) - append((group, track_list)) + append((group_name, track_list)) return result def getTrackTitle(self, track, wchar=False): -- 1.6.6 From plr.vincent@gmail.com Thu Jan 28 08:40:44 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzb-0005IM-Tl>; Thu, 28 Jan 2010 08:40:43 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzb-0003xv-Qi>; Thu, 28 Jan 2010 08:40:43 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so83214ewy.15 for ; Wed, 27 Jan 2010 23:40:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-bogosity:mime-version :content-type:content-transfer-encoding; bh=+BAXg10yBty+BpaQGDfye8025kAZ51MbyKMkdixjeqs=; b=eUx7sGfHuKdmVBnhsssfSO7kOT5jEUjsrPDs+xGcQCPTmJPEx00ypR1ysQL5S+FVpj zTww3gIURGU5s7wpebOL0nG4x8rjrAXHLvRfcIz2LXTeKliVz9IQtEvi7KtmoxU9Yloj HZQH1LfaNcbm5xLgHrUCZN5RflyuIFtE1IeQs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-bogosity :mime-version:content-type:content-transfer-encoding; b=qActpOGFi7VyFmySmbiiZETN4vmDMeQXxUj1iHLFMBbRipE87LP0fv3Gh7UVqddHZt BYyvdriJmnK/Kuo0QgMdjKKRNe3iuHdK4zCoQHevio8HQWR7+khKIvetaj2SQXTMzDf+ YbxOQ8MjqvhtzPB/XmNH2KNiZvkEJY4GZxzZQ= Received: by 10.213.44.9 with SMTP id y9mr1475930ebe.71.1264664443538; Wed, 27 Jan 2010 23:40:43 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 13sm478090ewy.13.2010.01.27.23.40.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 23:40:43 -0800 (PST) Message-Id: <201001280840.57480.plr.vincent@gmail.com> In-Reply-To: <2702a83a144bb5e6aec603b44e868c8465992f3f.1264664391.git.plr.vincent@gmail.com> References: <2702a83a144bb5e6aec603b44e868c8465992f3f.1264664391.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:40:57 +0100 To: linux-minidisc@lists.fu-berlin.de MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264664443-00000DDD-9ECDDA39/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.007702, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 4/7] Generate an extra group containing all tracks which are in no group. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 07:40:44 -0000 It has None as its title to make it stand out of regular groups. --- netmd/libnetmd.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index 5a9829e..883457b 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -700,6 +700,9 @@ class NetMDInterface(object): track_dict[track] = group_name, group_index track_append(track) append((group_name, track_list)) + track_list = [x for x in xrange(track_count) if x not in track_dict] + if len(track_list): + append((None, track_list)) return result def getTrackTitle(self, track, wchar=False): -- 1.6.6 From plr.vincent@gmail.com Thu Jan 28 08:40:48 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzf-0005Im-Jn>; Thu, 28 Jan 2010 08:40:47 +0100 Received: from ey-out-2122.google.com ([74.125.78.27]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzf-000406-H2>; Thu, 28 Jan 2010 08:40:47 +0100 Received: by ey-out-2122.google.com with SMTP id d26so123074eyd.3 for ; Wed, 27 Jan 2010 23:40:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-bogosity:mime-version :content-type:content-transfer-encoding; bh=rMhtpxDMi3dZ1mHKaE2TTjXxloQWca+dTlZAZI6GIT0=; b=UgAC9uymp2Jmaj5ZbU1W14EfdmA5a8J0pnMbHq37uebv+xedYyaMgzNfL3IdXgGhVs WJxI0TvTS5XX7NhberSJE/IICcCNKJ3/JS9NdB2OH9QAwyRCzKX2J+bepoLWEuDY6npv U9dLmp71BxIhDfi0Nk352v0tkmvKF9vbdtCTo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-bogosity :mime-version:content-type:content-transfer-encoding; b=ENxcBZJ75fXxCw+gqQkZGvWCaS/BdcxMK1RHyyl18FYSpZ3g7lhMPDByWWtFCsV3rV 27uhOMeYYAb5nZEtyfWx/stOsoZgBgSaNwVL37xl/GxS11xq6dvbKUiptWqMPAE2E5AM Fg/4EGyVojs5UsUdUSWbMzsFvNQ+5slKRPpaA= Received: by 10.213.2.79 with SMTP id 15mr716137ebi.96.1264664447361; Wed, 27 Jan 2010 23:40:47 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 13sm478749ewy.5.2010.01.27.23.40.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 23:40:46 -0800 (PST) Message-Id: <201001280841.01733.plr.vincent@gmail.com> In-Reply-To: <2702a83a144bb5e6aec603b44e868c8465992f3f.1264664391.git.plr.vincent@gmail.com> References: <2702a83a144bb5e6aec603b44e868c8465992f3f.1264664391.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:41:01 +0100 To: linux-minidisc@lists.fu-berlin.de MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 74.125.78.27 X-purgate: clean X-purgate-ID: 151147::1264664447-00000DDD-5BF372DC/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.393444, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 5/7] Make lsmd display track groups. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 07:40:48 -0000 Remove "untested" comment from getTrackGroupList. --- netmd/libnetmd.py | 1 - netmd/lsmd.py | 25 ++++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index 883457b..5e50398 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -670,7 +670,6 @@ class NetMDInterface(object): group title track number list """ - # XXX: not tested raw_title = self._getDiscTitle() group_list = raw_title.split('//') track_dict = {} diff --git a/netmd/lsmd.py b/netmd/lsmd.py index 088e784..c7821b4 100755 --- a/netmd/lsmd.py +++ b/netmd/lsmd.py @@ -49,15 +49,22 @@ def listMD(md): (disc_total - disc_left) / float(disc_total) * 100) track_count = md_iface.getTrackCount() print '%i tracks' % (track_count, ) - for track in xrange(track_count): - hour, minute, second, sample = md_iface.getTrackLength(track) - codec, channel_count = md_iface.getTrackEncoding(track) - flags = md_iface.getTrackFlags(track) - print '%03i: %02i:%02i:%02i+%03i %s %s %s %r %s' % (track, hour, - minute, second, sample, codec_name_dict[codec], - channel_count_dict[channel_count], flag_dict[flags], - md_iface.getTrackTitle(track), - md_iface.getTrackTitle(track, True).decode('shift_jis')) + for group, (group_name, track_list) in enumerate( + md_iface.getTrackGroupList()): + if group_name is None: + prefix = '' + else: + prefix = ' ' + print 'Group %r' % (group_name or group + 1, ) + for track, real_track in enumerate(track_list): + hour, minute, second, sample = md_iface.getTrackLength(real_track) + codec, channel_count = md_iface.getTrackEncoding(real_track) + flags = md_iface.getTrackFlags(real_track) + print '%s%03i: %02i:%02i:%02i+%03i %s %s %s %r %s' % (prefix, + track, hour, minute, second, sample, codec_name_dict[codec], + channel_count_dict[channel_count], flag_dict[flags], + md_iface.getTrackTitle(real_track), + md_iface.getTrackTitle(real_track, True).decode('shift_jis')) if __name__ == '__main__': from optparse import OptionParser -- 1.6.6 From plr.vincent@gmail.com Thu Jan 28 08:40:54 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzl-0005JE-0D>; Thu, 28 Jan 2010 08:40:53 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzk-0003xv-Tl>; Thu, 28 Jan 2010 08:40:52 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so83214ewy.15 for ; Wed, 27 Jan 2010 23:40:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-bogosity:mime-version :content-type:content-transfer-encoding; bh=vfMGb1kyB4f0kwkj7rD4yPavW3/JMMUJXXLRa4/v+VA=; b=WdbBMOlEVGeF8U+RxkLlHBPda2F65HbwOGRpbCfEILNLBIcj51dchbqcaY7Eb2z15g dIk6C2RT1BMK6jXRvOoc4jRnPJbcyRCIPQfiOofKf5B40+TRchAGiNzqpctgT0BW1ydL WSVUTBXipWBfvVT9BhqpPDI3+mn+mpMn9Ynvk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-bogosity :mime-version:content-type:content-transfer-encoding; b=S/4GsYVsn6wfoz6kX98RecR0FDznRixRPkIr1TzbUtwJVrwpwMcP6D/0eh15oGQDAK i3rPwDWTgri/bTbA+RTuvi4SO3w7gVYTzG+RGnJq9nT/EO4r7//MfIeKE+ufqNOyQ2Uq h18ArtMjOQUgJi+FzxGF3iy7yfYksAEK4V3+Q= Received: by 10.213.48.205 with SMTP id s13mr505004ebf.91.1264664452251; Wed, 27 Jan 2010 23:40:52 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 15sm480348ewy.4.2010.01.27.23.40.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 23:40:51 -0800 (PST) Message-Id: <201001280841.06220.plr.vincent@gmail.com> In-Reply-To: <2702a83a144bb5e6aec603b44e868c8465992f3f.1264664391.git.plr.vincent@gmail.com> References: <2702a83a144bb5e6aec603b44e868c8465992f3f.1264664391.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:41:05 +0100 To: linux-minidisc@lists.fu-berlin.de MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264664453-00000DDD-757A8B1F/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.100825, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 6/7] Add a parameter to override disk title. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 07:40:54 -0000 --- netmd/dump_md.py | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/netmd/dump_md.py b/netmd/dump_md.py index fe2cb44..3e6cac8 100755 --- a/netmd/dump_md.py +++ b/netmd/dump_md.py @@ -4,13 +4,13 @@ import usb1 import libnetmd from time import sleep -def main(bus=None, device_address=None, ext='ogg', track_range=None): +def main(bus=None, device_address=None, ext='ogg', track_range=None, title=None): context = usb1.LibUSBContext() for md in libnetmd.iterdevices(context, bus=bus, device_address=device_address): md_iface = libnetmd.NetMDInterface(md) try: - MDDump(md_iface, ext, track_range) + MDDump(md_iface, ext, track_range, title) finally: md_iface.stop() @@ -43,10 +43,13 @@ def getTrackList(md_iface, track_range): title)) return result -def MDDump(md_iface, ext, track_range): - ascii_title = md_iface.getDiscTitle() - wchar_title = md_iface.getDiscTitle(True).decode('shift_jis') - disc_title = wchar_title or ascii_title +def MDDump(md_iface, ext, track_range, disk_title_override=None): + if disk_title_override is None: + ascii_title = md_iface.getDiscTitle() + wchar_title = md_iface.getDiscTitle(True).decode('shift_jis') + disc_title = wchar_title or ascii_title + else: + disc_title = disk_title_override if disc_title == '': directory = '.' else: @@ -101,6 +104,7 @@ if __name__ == '__main__': parser.add_option('-b', '--bus') parser.add_option('-d', '--device') parser.add_option('-t', '--track-range') + parser.add_option('-T', '--title') (options, args) = parser.parse_args() assert len(args) < 2 if len(args) == 1: @@ -124,5 +128,5 @@ if __name__ == '__main__': else: track_range = int(track_range) - 1 main(bus=options.bus, device_address=options.device, ext=ext, - track_range=track_range) + track_range=track_range, title=options.title) -- 1.6.6 From plr.vincent@gmail.com Thu Jan 28 08:40:57 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzo-0005Je-Dn>; Thu, 28 Jan 2010 08:40:56 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaOzo-0003xv-B3>; Thu, 28 Jan 2010 08:40:56 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so83214ewy.15 for ; Wed, 27 Jan 2010 23:40:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:x-bogosity:mime-version :content-type:content-transfer-encoding; bh=09Br6TuZ3EBwCANh2JIYpL+RSBEHVnQejIIUU+nY3qk=; b=iyyGTe7aRABhHDEVYy7FHY/XT3F4r52WycmOJSJX91REIFnFQb83/dWhtbRX+oJPwb 2PYhfc/lZRubbV6F/8wlIFvjEciUlmVJD87rJYkr/FfWLFSl3M4ez0hhaQaVZUQKd+NW 3oLatrFleodpm0qbsXgfKa6yDejTbcPg9RfqE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:x-bogosity :mime-version:content-type:content-transfer-encoding; b=DbmsVbTR6Udpctt5jfIe8Df7oL1lT7HB5bokBO7Zke1zi+USaQpm5DKA+9lfOcHGnz rq9zpRg5+GXKh9vIS0lP1NCUvDiB2v3YIfwBHg1CoCqd13jokRlWA3vanVDaQN8JmgYu CnTzDnUsJ7rQBY+qCPhHH6rGlXPbgzTyKbUAo= Received: by 10.213.44.17 with SMTP id y17mr5032716ebe.25.1264664456198; Wed, 27 Jan 2010 23:40:56 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 13sm478820ewy.5.2010.01.27.23.40.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 23:40:55 -0800 (PST) Message-Id: <201001280841.10714.plr.vincent@gmail.com> In-Reply-To: <2702a83a144bb5e6aec603b44e868c8465992f3f.1264664391.git.plr.vincent@gmail.com> References: <2702a83a144bb5e6aec603b44e868c8465992f3f.1264664391.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:41:10 +0100 To: linux-minidisc@lists.fu-berlin.de MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264664456-00000DDD-B08E37C3/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.198044, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 7/7] Fix a syntax error. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 07:40:57 -0000 --- netmd/dump_md.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/netmd/dump_md.py b/netmd/dump_md.py index 3e6cac8..d9bed30 100755 --- a/netmd/dump_md.py +++ b/netmd/dump_md.py @@ -67,7 +67,7 @@ def MDDump(md_iface, ext, track_range, disk_title_override=None): # Attemp to reduce the MD play delay by... print 'Waiting for MD...' # Waiting for the seek to complete... - while md_iface.getPosition() != [track, 0, 0, 0, 1] and + while md_iface.getPosition() != [track, 0, 0, 0, 1] and \ md_iface.getPosition() != [track, 0, 0, 0, 2]: sleep(1) # And waiting for the play to actualy begin. -- 1.6.6 From plr.vincent@gmail.com Thu Jan 28 08:46:54 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaP5Z-0005V2-JH>; Thu, 28 Jan 2010 08:46:53 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaP5Z-0005Kp-Fy>; Thu, 28 Jan 2010 08:46:53 +0100 Received: by ewy28 with SMTP id 28so88498ewy.15 for ; Wed, 27 Jan 2010 23:46:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=0aIbvVEMuB0kyDj7aNdqmOPBaH9xGo19rFG+0WysX7g=; b=F+P0w3RuWiv7U4z94+UvOkvTwrdnK4frQgwCPfoLzyQvhJUCBiSsttOCM+dXt9Fqym ge8GQlu7GnEyYeqCt3+IVks3L8VkTeK6HBD/fUzaBsiWa8ECJaZlsluoWlqjgKdaXWuj pAAnAGLb2mT7bd3HQGVRXba/POkne3A41apx0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=LKRMTfH7GDpSjK9K8Er1S3YR30JXYxztSyPSEK6ZjGqqWM9SZrGl+bnbidsX2OW/kC avFW9KnKuBNYHOTVRu+f/dQOqLJPtCmXLNNpQ6kNSJfp2kJNP5PnveoSfIcGdxcM08JR A5Y9mFvOFTlkjJ10S6c3lpHlIP22BvpcGFN08= Received: by 10.213.41.203 with SMTP id p11mr1743531ebe.75.1264664811769; Wed, 27 Jan 2010 23:46:51 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 15sm480132ewy.12.2010.01.27.23.46.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 23:46:49 -0800 (PST) From: Vincent Pelletier To: Adrian Glaubitz Date: Thu, 28 Jan 2010 08:47:03 +0100 User-Agent: KMail/1.12.4 (Linux/2.6.30-1-amd64; KDE/4.3.4; x86_64; ; ) References: <201001262153.05371.plr.vincent@gmail.com> <20100127222851.GA25198@physik.fu-berlin.de> In-Reply-To: <20100127222851.GA25198@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201001280847.04177.plr.vincent@gmail.com> X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264664813-00000DDD-69668EAF/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.316596, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] Patch serie on libusb1.py / usb1.py X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 07:46:54 -0000 Le mercredi 27 janvier 2010 23:28:51, vous avez =E9crit : > Do you think the patches are safe to be applied to the current NetMD-Pyth= on > code in git-master? I just gave a run to lsmd.py and dump_md.py and they "Work For Me". As I got my hands on a MD with groups, I took that chance to make the relat= ed=20 method become a bit more usable in the lib, and to make use of it in lsmd.p= y,=20 though not yet in dump_md.py: it looks a bit more difficult to make it fit= =20 there in a logical way without changing the way that command can be used. =2D-=20 Vincent Pelletier From glaubitz@physik.fu-berlin.de Thu Jan 28 11:02:33 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaRCq-0002DV-C9>; Thu, 28 Jan 2010 11:02:32 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1NaRCq-0005wr-9x>; Thu, 28 Jan 2010 11:02:32 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NaRCq-0000FB-5q; Thu, 28 Jan 2010 11:02:32 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1NaRCq-000260-3M; Thu, 28 Jan 2010 11:02:32 +0100 Date: Thu, 28 Jan 2010 11:02:32 +0100 To: Vincent Pelletier Message-ID: <20100128100232.GA7653@physik.fu-berlin.de> References: <201001262125.33769.plr.vincent@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001262125.33769.plr.vincent@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264672952-00000DDD-D5B4D38C/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.401629, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] [PATCH 1/6] Make function acting on a transfer accept a pointer to transfer. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 10:02:33 -0000 Hi, ok, tried to apply the first set of patches today. Unfortunately there seems to be a problem with the formatting of the patches: glaubitz@z6:..0/linux-minidisc> git pull Already up-to-date. glaubitz@z6:..0/linux-minidisc> patch -p1 < ~glaubitz/vincent-patches/0001_Make_function_acting_on_a_transfer_accept_a_pointer_to_transfer.patch patching file netmd/libusb1.py patch: **** malformed patch at line 22: buffer, callback, glaubitz@z6:..0/linux-minidisc> patch -p1 < ~glaubitz/vincent-patches/0002_This_is_no_WTF_simply_a_pointer_to_ISO_packet_descriptor.patch patching file netmd/libusb1.py patch: **** malformed patch at line 18: libusb_device_handle_p), glaubitz@z6:..0/linux-minidisc> patch -p1 < ~glaubitz/vincent-patches/0003_Make_some_function_accepting_opaque_data_pointer_accept_apy_object.patch patching file netmd/libusb1.py patch: **** malformed patch at line 20: libusb_device_handle_p), glaubitz@z6:..0/linux-minidisc> patch -p1 < ~glaubitz/vincent-patches/0004_Make_transfer_buffer_field_a_c_void_p_type.patch patching file netmd/libusb1.py patch: **** malformed patch at line 12: libusb_device_handle_p), glaubitz@z6:..0/linux-minidisc> patch -p1 < ~glaubitz/vincent-patches/0005_Export_methods_to_release_resources.patch patching file netmd/usb1.py glaubitz@z6:..0/linux-minidisc> patch -p1 < ~glaubitz/vincent-patches/0006_Implement_asynchronous_transfers.patch patching file netmd/usb1.py patch: **** malformed patch at line 20: timeout) All patches except for patch #0005 are malformed, I think it's something with the line break? Could you recreate these patches from your git repo or do you want me to fix them manually? Adrian From plr.vincent@gmail.com Thu Jan 28 13:01:59 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT4Q-000663-KZ>; Thu, 28 Jan 2010 13:01:58 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT4Q-0004tO-Hn>; Thu, 28 Jan 2010 13:01:58 +0100 Received: by ewy28 with SMTP id 28so37731ewy.15 for ; Thu, 28 Jan 2010 04:01:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=31wO4nhnaKyqkGt8pe3jDLhvwxjvyIq7OmPSRX+Ms7w=; b=iSva9OArmjNF1ejGux4C9MyOly7nBjshIjgWYDQJ8PqbkB02Zq9TUFJ+D0OEY4/mdZ UyXSEkcZW6fg5pRbu4qW6JDVaPcUrEz4wxicW2ZK/kEycZN/BqvOmWtaoZnCwaF/CcMn DrHAd15/onyPug4FUnqVh4l01/mMoQByn30GI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=oDF9BTalk1TeosmseVL+0N8hotqnhh6KkNdYssnyJBJv6NlaqadIWK3i51OwiZP06Q FEIVh08A8X7NsO314ctaDnNV5gV/0hZF4KqVK5/r2Z3KB5uU/nL+qdSDQUHBvC26k6j1 9v0WxD+FA15xBgIcymWGhP8YOq+ixKVB7JBKc= Received: by 10.213.110.14 with SMTP id l14mr7824061ebp.82.1264680117998; Thu, 28 Jan 2010 04:01:57 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 13sm596678ewy.9.2010.01.28.04.01.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:01:57 -0800 (PST) From: Vincent Pelletier To: Adrian Glaubitz Date: Thu, 28 Jan 2010 13:02:11 +0100 User-Agent: KMail/1.12.4 (Linux/2.6.30-1-amd64; KDE/4.3.4; x86_64; ; ) References: <201001262125.33769.plr.vincent@gmail.com> <20100128100232.GA7653@physik.fu-berlin.de> In-Reply-To: <20100128100232.GA7653@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201001281302.12133.plr.vincent@gmail.com> X-Originating-IP: 209.85.219.228 X-purgate: clean X-purgate-ID: 151147::1264680118-00000DDD-4669EA00/0-0/0-0 X-Bogosity: Unsure, tests=bogofilter, spamicity=0.475577, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: xx X-Spam-Status: No, score=2.9 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,FU_BOGO_UNSURE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] [PATCH 1/6] Make function acting on a transfer accept a pointer to transfer. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:02:00 -0000 Le jeudi 28 janvier 2010 11:02:32, Adrian Glaubitz a =E9crit : > All patches except for patch #0005 are malformed, I think it's > something with the line break? Could you recreate these patches from > your git repo or do you want me to fix them manually? Probably something wrong in mail transfer chain (I used git imap-send to pu= sh=20 it to my gmail account, but had to fetch them back with kmail to submit the= m=20 to SMTP). I'll regenerate them at attachments, all in one batch. Sorry for the inconvenience. =2D-=20 Vincent Pelletier From plr.vincent@gmail.com Thu Jan 28 13:04:51 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7C-0006Dv-I9>; Thu, 28 Jan 2010 13:04:50 +0100 Received: from ey-out-2122.google.com ([74.125.78.27]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7C-0005g6-Ej>; Thu, 28 Jan 2010 13:04:50 +0100 Received: by ey-out-2122.google.com with SMTP id d26so174815eyd.3 for ; Thu, 28 Jan 2010 04:04:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=K8ZjqgMgsg3bR6VcBkk2i/SrLJPPz1i/AOzAsexY2PQ=; b=aatCrrKfPFqGmFwVICAAWe98L9tE/6SJJx8rCfKQr4yc0bVawMPmegWmpmJ+AEyziy dyVC+bFsgYlL+doNXXFpcXbXN42mMcPGZo41OscL9VIhOvEwrwOKLTdub7NW/KqBrm4+ 5bwENGZDGxUmHSO9AkWwulQZVSiXsq88FY3KY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=HeuKk4rSBo5nDEDNYK7TPBsrxEuOgu0qp0w/1WvT8l6s4r56xotSU1QJIPpYSvVRzS cpBs1UDbSEjYDUvB7LoxY1yGbAhAF0mX46Q9NC1Oet8YFHLjtlnboH4Wg6u+73bRb/Jq o+wt2JPIEWWHFKfz3F1hgrzchOfNbbK34O6RU= Received: by 10.213.0.199 with SMTP id 7mr4134043ebc.61.1264680289928; Thu, 28 Jan 2010 04:04:49 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.04.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:04:49 -0800 (PST) Message-Id: In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Tue, 26 Jan 2010 21:12:26 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 74.125.78.27 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680290-00000DDD-B70BE167/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.279146, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.8 required=5.0 tests=DATE_IN_PAST_24_48, DNS_FROM_RFC_POST,FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 04/17] Make transfer "buffer" field a c_void_p type. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:04:51 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit This fields contains binary data, and ctypes' c_char_type stops reading when encountering NULL byte. --- netmd/libusb1.py | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0004-Make-transfer-buffer-field-a-c_void_p-type.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0004-Make-transfer-buffer-field-a-c_void_p-type.patch" diff --git a/netmd/libusb1.py b/netmd/libusb1.py index 6796860..4aae1ad 100644 --- a/netmd/libusb1.py +++ b/netmd/libusb1.py @@ -466,7 +466,7 @@ libusb_transfer._fields_ = [('dev_handle', libusb_device_handle_p), ('actual_length', c_int), ('callback', libusb_transfer_cb_fn_p), ('user_data', py_object), - ('buffer', c_char_p), + ('buffer', c_void_p), ('num_iso_packets', c_int), ('iso_packet_desc', libusb_iso_packet_descriptor_p) ] @@ -609,9 +609,9 @@ def libusb_control_transfer_get_data(transfer): def libusb_control_transfer_get_setup(transfer): return cast(transfer, libusb_control_setup_p) -def libusb_fill_control_setup(buffer, bmRequestType, bRequest, wValue, wIndex, +def libusb_fill_control_setup(setup_p, bmRequestType, bRequest, wValue, wIndex, wLength): - setup = cast(buffer, libusb_control_setup_p).contents + setup = cast(setup_p, libusb_control_setup_p).contents setup.bmRequestType = bmRequestType setup.bRequest = bRequest setup.wValue = libusb_cpu_to_le16(wValue) @@ -644,6 +644,7 @@ def libusb_fill_control_transfer(transfer_p, dev_handle, buffer, callback, setup = cast(buffer, libusb_control_setup_p).contents transfer.length = LIBUSB_CONTROL_SETUP_SIZE + \ libusb_le16_to_cpu(setup.wLength) + transfer.buffer = cast(buffer, c_void_p) transfer.user_data = user_data transfer.callback = callback @@ -654,7 +655,7 @@ def libusb_fill_bulk_transfer(transfer_p, dev_handle, endpoint, buffer, length, transfer.endpoint = endpoint transfer.type = LIBUSB_TRANSFER_TYPE_BULK transfer.timeout = timeout - transfer.buffer = buffer + transfer.buffer = cast(buffer, c_void_p) transfer.length = length transfer.user_data = user_data transfer.callback = callback @@ -666,7 +667,7 @@ def libusb_fill_interrupt_transfer(transfer_p, dev_handle, endpoint, buffer, transfer.endpoint = endpoint transfer.type = LIBUSB_TRANSFER_TYPE_INTERRUPT transfer.timeout = timeout - transfer.buffer = buffer + transfer.buffer = cast(buffer, c_void_p) transfer.length = length transfer.user_data = user_data transfer.callback = callback --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:04:55 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7G-0006EM-3B>; Thu, 28 Jan 2010 13:04:54 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7F-0005gx-Vs>; Thu, 28 Jan 2010 13:04:54 +0100 Received: by ewy28 with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:04:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=6Ld+eSYGbh0vy3RascIeo2IEp8mRoTv+FPjhOfzoX6U=; b=jnU90FXZAPPfc/iaCR3W8ZpGKMvETdCSfGuIiwGJX3k1GcjOr3y3QVTizKIQJ5tbUv 32lMJ8vVAUx4atO7si1VyUEeQN+8Cg6vi4kpkzt8iMPxKmCZqfLRDfcb/SVrkXefNIbe 1bRJc8OOQa8+68zZlp7IY+IYQyvnue6EyZUyg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=XTCMJYnkr252xX52UehxmlXUYnbUU7mpWkAFeqe7kRidAH+sL52SV2pZ3CyRZamys9 SmidFGPnxiJoHvH4LmDe6D9P7HuMQknlytuRg0x6OrLCvJxOal17HL1d0b6yJvf4gue9 GDh+eX5juLqHJf2YuXOHUY0/qM3BLN/UnsGFk= Received: by 10.213.1.209 with SMTP id 17mr2660653ebg.70.1264680292673; Thu, 28 Jan 2010 04:04:52 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.04.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:04:51 -0800 (PST) Message-Id: <522871bac0766ab40b7f887a797d65c362747872.1264680187.git.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Wed, 27 Jan 2010 20:01:15 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680294-00000DDD-81AFDA1A/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.018303, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 08/17] Replace tabulations by spaces. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:04:55 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- netmd/usb1.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0008-Replace-tabulations-by-spaces.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0008-Replace-tabulations-by-spaces.patch" diff --git a/netmd/usb1.py b/netmd/usb1.py index 34731b3..c5d9f77 100644 --- a/netmd/usb1.py +++ b/netmd/usb1.py @@ -197,15 +197,15 @@ class USBDeviceHandle(object): return result def fillControlSetup(self, string_buffer, request_type, request, value, - index, length): + index, length): libusb1.libusb_fill_control_setup(string_buffer, request_type, - request, value, index, length) + request, value, index, length) def fillControlTransfer(self, transfer, setup, callback, user_data, timeout): libusb1.libusb_fill_control_transfer(transfer, self.handle, setup, libusb1.libusb_transfer_cb_fn_p(callback), user_data, - timeout) + timeout) def getControlTransfer(self, setup, callback, user_data=None, timeout=0): result = self._getTransfer() --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:04:56 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7G-0006EZ-RY>; Thu, 28 Jan 2010 13:04:54 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7G-0005gx-O8>; Thu, 28 Jan 2010 13:04:54 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:04:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=WfaBEH4npBGSb8K+eofhOL2BAyo8/Flb28QCH9UjcgI=; b=qwGBVEiHuSGMFiFQNK+fapj73rvUHJkuZgtoHLn3qNpzMXgpUjc9/1r/WOAfpZR+Go xRUMBky9t8yGKoaWN4xG6O7bFuXaIBTKycoT42znLPM0YmSEUn+WzNUGt3YknS+vR/VY TeLHTUaaG+2/C5RwwsltG1cJBbiFta6otoc6o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=f5BBFpRoLRrj6hrN7NziF2UWR0hBzlAntMFTngWFyAMvIlS7/9a4Co6URTkEr/Td7c 8XwYX9JFI2L75yBKzh0MghbgVvU2+E4pzVgivzd9JoObS/rLUe38r3bN37bP3TVAtuZo +cL+Gm4tMF0KO3EljT3hyb8W8rXNF8YzhNkgk= Received: by 10.213.97.83 with SMTP id k19mr1493878ebn.22.1264680294380; Thu, 28 Jan 2010 04:04:54 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.04.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:04:54 -0800 (PST) Message-Id: <2aebb462279033852a9c3ea67df17bbf864afe63.1264680187.git.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Tue, 26 Jan 2010 21:15:55 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680294-00000DDD-4CD17D68/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.001286, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.8 required=5.0 tests=DATE_IN_PAST_24_48, DNS_FROM_RFC_POST,FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 06/17] Implement asynchronous transfers. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:04:56 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- netmd/usb1.py | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 105 insertions(+), 1 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0006-Implement-asynchronous-transfers.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0006-Implement-asynchronous-transfers.patch" diff --git a/netmd/usb1.py b/netmd/usb1.py index d22f52a..34731b3 100644 --- a/netmd/usb1.py +++ b/netmd/usb1.py @@ -1,6 +1,6 @@ # pyusb compatibility layer for libus-1.0 import libusb1 -from ctypes import byref, create_string_buffer, c_int +from ctypes import byref, create_string_buffer, c_int, sizeof, POINTER from cStringIO import StringIO __all__ = ['LibUSBContext'] @@ -162,6 +162,72 @@ class USBDeviceHandle(object): transferred = self._interruptTransfer(endpoint, data, length, timeout) return data.raw[:transferred] + def _getTransfer(self, iso_packets=0): + result = libusb1.libusb_alloc_transfer(iso_packets) + if not result: + raise libusb1.USBError, 'Unable to get a transfer object' + return result + + def fillBulkTransfer(self, transfer, endpoint, string_buffer, + callback, user_data, timeout): + libusb1.libusb_fill_bulk_transfer(transfer, self.handle, + endpoint, string_buffer, sizeof(string_buffer), + libusb1.libusb_transfer_cb_fn_p(callback), user_data, + timeout) + + def getBulkTransfer(self, endpoint, string_buffer, callback, + user_data=None, timeout=0): + result = self._getTransfer() + self.fillBulkTransfer(result, endpoint, string_buffer, callback, + user_data, timeout) + return result + + def fillInterruptTransfer(self, transfer, endpoint, string_buffer, + callback, user_data, timeout): + libusb1.libusb_fill_interrupt_transfer(transfer, self.handle, + endpoint, string_buffer, sizeof(string_buffer), + libusb1.libusb_transfer_cb_fn_p(callback), user_data, + timeout) + + def getInterruptTransfer(self, endpoint, string_buffer, callback, + user_data=None, timeout=0): + result = self._getTransfer() + self.fillInterruptTransfer(result, endpoint, string_buffer, + callback, user_data, timeout) + return result + + def fillControlSetup(self, string_buffer, request_type, request, value, + index, length): + libusb1.libusb_fill_control_setup(string_buffer, request_type, + request, value, index, length) + + def fillControlTransfer(self, transfer, setup, callback, + user_data, timeout): + libusb1.libusb_fill_control_transfer(transfer, self.handle, + setup, libusb1.libusb_transfer_cb_fn_p(callback), user_data, + timeout) + + def getControlTransfer(self, setup, callback, user_data=None, timeout=0): + result = self._getTransfer() + self.fillControlTransfer(result, setup, callback, user_data, timeout) + return result + + def fillISOTransfer(self, *args, **kw): + raise NotImplementedError + + def getISOTransfer(self, *args, **kw): + raise NotImplementedError + + def submitTransfer(self, transfer): + result = libusb1.libusb_submit_transfer(transfer) + if result: + raise libusb1.USBError, result + + def cancelTransfer(self, transfer): + result = libusb1.libusb_cancel_transfer(transfer) + if result: + raise libusb1.USBError, result + class USBDevice(object): configuration_descriptor_list = None @@ -347,3 +413,41 @@ class LibUSBContext(object): result = None return result + def getPollFDList(self): + pollfd_p_p = libusb1.libusb_get_pollfds(self.context_p) + result = [] + append = result.append + fd_index = 0 + while pollfd_p_p[fd_index]: + append((pollfd_p_p[fd_index].contents.fd, + pollfd_p_p[fd_index].contents.events)) + fd_index += 1 + return result + + def handleEvents(self): + result = libusb1.libusb_handle_events(self.context_p) + if result: + raise libusb1.USBError, result + + def handleEventsTimeout(self, tv=None): + assert tv is None, 'tv parameter is not supported yet' + tv = libusb1.timeval(0, 0) + result = libusb1.libusb_handle_events_timeout(self.context_p, byref(tv)) + if result: + raise libusb1.USBError, result + + def setPollFDNotifiers(self, added_cb=None, removed_cb=None, user_data=None): + if added_cb is None: + added_cb = POINTER(None) + else: + added_cb = libusb1.libusb_pollfd_added_cb_p(added_cb) + if removed_cb is None: + removed_cb = POINTER(None) + else: + removed_cb = libusb1.libusb_pollfd_removed_cb_p(removed_cb) + libusb1.libusb_set_pollfd_notifiers(self.context_p, added_cb, + removed_cb, user_data) + + def getNextTimeout(self): + return libusb1.libusb_get_next_timeout(self.context_p, None) + --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:04:56 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7H-0006Er-Kl>; Thu, 28 Jan 2010 13:04:55 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7H-0005gx-GW>; Thu, 28 Jan 2010 13:04:55 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:04:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:date:subject :to:mime-version:content-type:x-bogosity:x-uid; bh=ZKy9ArB2Q6YiZM7b9PrAoxiXUtnOkF6AK+2SDs976/k=; b=hFz3/3bXJQNgjkQpekOvrdmhfAL9YyfXqX0xcqKgT8+/tP7R/GH35aBQzQqj3y7END R4gIYHLRFk8R4v6EGWhRddZ5IscCu3/stXr2E+rlr/C9HPSA0eMXBhvgdMJfJjEDXLO6 hzMbkAReGM0WoqJdipdrWQug1bMvTmyJU+QuY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; b=m9isNuPFNZgvu7ZInUTzcEzkezZMhs4r0N1YGKweaL5X9M51c1Tv17VyHaLyaKlPFc oAHYKDJB2bOfgcVJI1BR4SiaJaUP8bNZcMOfULCLOWHbZWBVMghs8T/FLJioT0QYyvDV NXBvXqP6iWK2EJg/nPzLN+VfkOE7FSQjbkvw0= Received: by 10.213.97.71 with SMTP id k7mr1413785ebn.41.1264680295185; Thu, 28 Jan 2010 04:04:55 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.04.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:04:54 -0800 (PST) Message-Id: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Tue, 26 Jan 2010 21:08:34 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680295-00000DDD-900E0252/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.427893, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.8 required=5.0 tests=DATE_IN_PAST_24_48, DNS_FROM_RFC_POST,FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 01/17] Make function acting on a transfer accept a pointer to transfer. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:04:56 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit This make it possible to use them with allocated string buffers. --- netmd/libusb1.py | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0001-Make-function-acting-on-a-transfer-accept-a-pointer-.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-Make-function-acting-on-a-transfer-accept-a-pointer-.patch" diff --git a/netmd/libusb1.py b/netmd/libusb1.py index 3f61cee..7c99505 100644 --- a/netmd/libusb1.py +++ b/netmd/libusb1.py @@ -633,8 +633,9 @@ libusb_free_transfer = libusb.libusb_free_transfer libusb_free_transfer.argtypes = [libusb_transfer_p] libusb_free_transfer.restype = None -def libusb_fill_control_transfer(transfer, dev_handle, buffer, callback, +def libusb_fill_control_transfer(transfer_p, dev_handle, buffer, callback, user_data, timeout): + transfer = transfer_p.contents transfer.dev_handle = dev_handle transfer.endpoint = 0 transfer.type = LIBUSB_TRANSFER_TYPE_CONTROL @@ -646,8 +647,9 @@ def libusb_fill_control_transfer(transfer, dev_handle, buffer, callback, transfer.user_data = user_data transfer.callback = callback -def libusb_fill_bulk_transfer(transfer, dev_handle, endpoint, buffer, length, +def libusb_fill_bulk_transfer(transfer_p, dev_handle, endpoint, buffer, length, callback, user_data, timeout): + transfer = transfer_p.contents transfer.dev_handle = dev_handle transfer.endpoint = endpoint transfer.type = LIBUSB_TRANSFER_TYPE_BULK @@ -657,8 +659,9 @@ def libusb_fill_bulk_transfer(transfer, dev_handle, endpoint, buffer, length, transfer.user_data = user_data transfer.callback = callback -def libusb_fill_interrupt_transfer(transfer, dev_handle, endpoint, buffer, +def libusb_fill_interrupt_transfer(transfer_p, dev_handle, endpoint, buffer, length, callback, user_data, timeout): + transfer = transfer_p.contents transfer.dev_handle = dev_handle transfer.endpoint = endpoint transfer.type = LIBUSB_TRANSFER_TYPE_INTERRUPT @@ -668,8 +671,9 @@ def libusb_fill_interrupt_transfer(transfer, dev_handle, endpoint, buffer, transfer.user_data = user_data transfer.callback = callback -def libusb_fill_iso_transfer(transfer, dev_handle, endpoint, buffer, length, +def libusb_fill_iso_transfer(transfer_p, dev_handle, endpoint, buffer, length, num_iso_packets, callback, user_data, timeout): + transfer = transfer_p.contents transfer.dev_handle = dev_handle transfer.endpoint = endpoint transfer.type = LIBUSB_TRANSFER_TYPE_ISOCHRONOUS @@ -680,11 +684,13 @@ def libusb_fill_iso_transfer(transfer, dev_handle, endpoint, buffer, length, transfer.user_data = user_data transfer.callback = callback -def libusb_set_iso_packet_lengths(transfer, length): +def libusb_set_iso_packet_lengths(transfer_p, length): + transfer = transfer_p.contents for i in xrange(transfer.num_iso_packets): transfer.iso_packet_desc[i].length = length -def libusb_get_iso_packet_buffer(transfer, packet): +def libusb_get_iso_packet_buffer(transfer_p, packet): + transfer = transfer_p.contents offset = 0 if packet >= transfer.num_iso_packets: return None @@ -692,7 +698,8 @@ def libusb_get_iso_packet_buffer(transfer, packet): offset += transfer.iso_packet_desc[i].length return transfer.buffer[offset:] -def libusb_get_iso_packet_buffer_simple(transfer, packet): +def libusb_get_iso_packet_buffer_simple(transfer_p, packet): + transfer = transfer_p.contents if packet >= transfer.num_iso_packets: return None return transfer.buffer[transfer.iso_packet_desc[0].length * packet:] --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:04:58 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7J-0006FO-Fu>; Thu, 28 Jan 2010 13:04:57 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7J-0005gx-CI>; Thu, 28 Jan 2010 13:04:57 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:04:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=mRMRKq8hRal9O9MYOnD73GFRFKwm5mzw8JsIHQCQajY=; b=tp3HUtW25QTLqYOZF9SOR+8eIuiYMFXfXH15x2oZSsmJFdhyh/585+72mcQ1sFveY3 10SKnweWxtWoiim+f6OSghfgWj6LGko4VXDvn7FTX0avYf7EGsaEcfC2CZaqhIFZZw8L J3beXyCU3RoTTdP8xdvjWGAHhJWJkOKgi8yz4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=CVWPtU9KxN8AoeRtmL99jptSx9sUYpyMzmGhaDqPRfJziVhBn0abXEBIGSyjz3iOta o8ZFcFCmZNWTjWPJovnH9iPkwGBKfubU8k5F3QxUs1n3k8kDY/sQUUCMwbaVtgK+uHhP amKW0E25v03CHcKfZQ3e6cOMYfLp2579xpn3A= Received: by 10.213.104.69 with SMTP id n5mr538792ebo.90.1264680297062; Thu, 28 Jan 2010 04:04:57 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.04.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:04:56 -0800 (PST) Message-Id: In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Tue, 26 Jan 2010 21:10:57 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680297-00000DDD-328FAA97/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.273326, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.8 required=5.0 tests=DATE_IN_PAST_24_48, DNS_FROM_RFC_POST,FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 03/17] Make some function accepting opaque data pointer accept a py_object. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:04:58 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit This makes them easily usable in python. --- netmd/libusb1.py | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0003-Make-some-function-accepting-opaque-data-pointer-acc.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0003-Make-some-function-accepting-opaque-data-pointer-acc.patch" diff --git a/netmd/libusb1.py b/netmd/libusb1.py index 9f68be5..6796860 100644 --- a/netmd/libusb1.py +++ b/netmd/libusb1.py @@ -4,7 +4,7 @@ from ctypes import Structure, \ cdll, \ c_short, c_int, c_uint, c_size_t, c_long, \ c_uint8, c_uint16, \ - c_void_p, c_char_p + c_void_p, c_char_p, py_object import struct class Enum(object): @@ -465,7 +465,7 @@ libusb_transfer._fields_ = [('dev_handle', libusb_device_handle_p), ('length', c_int), ('actual_length', c_int), ('callback', libusb_transfer_cb_fn_p), - ('user_data', c_void_p), + ('user_data', py_object), ('buffer', c_char_p), ('num_iso_packets', c_int), ('iso_packet_desc', libusb_iso_packet_descriptor_p) @@ -796,8 +796,8 @@ class libusb_pollfd(Structure): libusb_pollfd_p = POINTER(libusb_pollfd) libusb_pollfd_p_p = POINTER(libusb_pollfd_p) -libusb_pollfd_added_cb_p = CFUNCTYPE(None, c_int, c_short, c_void_p) -libusb_pollfd_removed_cb_p = CFUNCTYPE(None, c_int, c_void_p) +libusb_pollfd_added_cb_p = CFUNCTYPE(None, c_int, c_short, py_object) +libusb_pollfd_removed_cb_p = CFUNCTYPE(None, c_int, py_object) #const struct libusb_pollfd **libusb_get_pollfds(libusb_context *ctx); libusb_get_pollfds = libusb.libusb_get_pollfds @@ -809,7 +809,7 @@ libusb_get_pollfds.restype = libusb_pollfd_p_p libusb_set_pollfd_notifiers = libusb.libusb_set_pollfd_notifiers libusb_set_pollfd_notifiers.argtypes = [libusb_context_p, libusb_pollfd_added_cb_p, - libusb_pollfd_removed_cb_p, c_void_p] + libusb_pollfd_removed_cb_p, py_object] libusb_set_pollfd_notifiers.restype = None # /libusb.h --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:05:00 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7L-0006G1-0H>; Thu, 28 Jan 2010 13:04:59 +0100 Received: from mail-ew0-f174.google.com ([209.85.219.174]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7K-0005iO-Ry>; Thu, 28 Jan 2010 13:04:58 +0100 Received: by ewy22 with SMTP id 22so498405ewy.15 for ; Thu, 28 Jan 2010 04:04:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=DRQRl/qWo6gSuZV6ntG6D7luECzugixKwTq8E4kjZ9s=; b=qrSLIn1br4HjQ7zsGph1BosI1+YfLobP+/AtLoJil5IlmlNda6uPQNAOOE6j0cjIi4 upNyHd75j+kl5uWTVIaKhGFVexJahWxwh8YtR183YXwVpq01iM/0P1N1+1upuH9+3M4X sNQMu1IgpE12otYEn8Emb+jhT6sHxRqtoSOkg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=Gdw3ijjg64f0iSI3IOwPwXhw/leSTFRvHr0ZKEirPYnLmHUW5frLdjJ1QnwlTqcMui mFOF0t3pyTE/LlOWj5u1w55xofW8gBZTwhIDuHtRRAtZobOYGbExwub9/YiQk2SGScT9 afHb6Cv7uWu2CRv+RJ0Fde3mUnziI54lcysNY= Received: by 10.213.109.147 with SMTP id j19mr298848ebp.61.1264680298289; Thu, 28 Jan 2010 04:04:58 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.04.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:04:57 -0800 (PST) Message-Id: <81f330194dd966501cf89131ef14b96cbcb89143.1264680187.git.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Wed, 27 Jan 2010 22:10:27 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.174 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680299-00000DDD-C5A65CF0/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.277314, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 10/17] Add helper classes for asynchronous reads. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:05:00 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- netmd/usb1.py | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 123 insertions(+), 0 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0010-Add-helper-classes-for-asynchronous-reads.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0010-Add-helper-classes-for-asynchronous-reads.patch" diff --git a/netmd/usb1.py b/netmd/usb1.py index 925adfc..cd0711b 100644 --- a/netmd/usb1.py +++ b/netmd/usb1.py @@ -8,6 +8,129 @@ __all__ = ['LibUSBContext'] # Default string length STRING_LENGTH = 256 +EVENT_CALLBACK_SET = frozenset(( + libusb1.LIBUSB_TRANSFER_COMPLETED, + libusb1.LIBUSB_TRANSFER_ERROR, + libusb1.LIBUSB_TRANSFER_TIMED_OUT, + libusb1.LIBUSB_TRANSFER_CANCELLED, + libusb1.LIBUSB_TRANSFER_STALL, + libusb1.LIBUSB_TRANSFER_NO_DEVICE, + libusb1.LIBUSB_TRANSFER_OVERFLOW, +)) + +DEFAULT_ASYNC_TRANSFER_ERROR_CALLBACK = lambda x, y: False + +class USBAsyncReaderBase(object): + _handle = None + _submited = False + + def __init__(self, handle, endpoint, size, user_data=None, timeout=0): + data = create_string_buffer(size) + self._data = data + self._transfer = self._getTransfer( + handle, + endpoint, + data, + self._callbackDispatcher, + user_data, + timeout, + ) + # XXX: set _handle *after* _transfer, so __del__ doesn't get an + # exception if called during constructor execution. + self._handle = handle + self._event_callback_dict = {} + self._errorCallback = DEFAULT_ASYNC_TRANSFER_ERROR_CALLBACK + + def submit(self): + self._submited = True + self._handle.submitTransfer(self._transfer) + + def cancel(self): + self._handle.cancelTransfer(self._transfer) + self._submited = False + + def setEventCallback(self, event, callback): + if event not in EVENT_CALLBACK_SET: + raise ValueError, 'Unknown event %r.' % (event, ) + self._event_callback_dict[event] = callback + + def setDefaultCallback(self, callback): + self._errorCallback = callback + + def getEventCallback(self, event, default=None): + return self._event_callback_dict.get(event, default) + + def _callbackDispatcher(self, transfer_p): + transfer = self._transfer.contents #transfer_p.contents + if self.getEventCallback(transfer.status, self._errorCallback)( + transfer, self._data): + self.submit() + else: + self._submited = False + + def isSubmited(self): + return self._submited + + def __del__(self): + if self._handle is not None: + try: + self.cancel() + except libusb1.USBError, exception: + if exception.value != libusb1.LIBUSB_ERROR_NOT_FOUND: + raise + +class USBAsyncBulkReader(USBAsyncReaderBase): + def _getTransfer(self, handle, *args, **kw): + return handle.getBulkTransfer(*args, **kw) + +class USBAsyncInterruptReader(USBAsyncReaderBase): + def _getTransfer(self, handle, *args, **kw): + return handle.getInterruptTransfer(*args, **kw) + +class USBPoller(object): + def __init__(self, context, poller): + self.context = context + self.poller = poller + fd_set = set() + self.fd_set = fd_set + context.setPollFDNotifiers(self._registerFD, self._unregisterFD) + for fd, events in context.getPollFDList(): + self._registerFD(fd, events) + + def poll(self, timeout=None): + fd_set = self.fd_set + next_usb_timeout = self.context.getNextTimeout() + if next_usb_timeout == 0: + next_usb_timeout = None + if timeout is None: + usb_timeout = next_usb_timeout + else: + usb_timeout = min(next_usb_timeout or timeout, timeout) + event_list = self.poller.poll(usb_timeout) + event_list_len = len(event_list) + if event_list_len: + result = [(x, y) for x, y in event_list if x not in fd_set] + if len(result) != event_list_len: + self.context.handleEventsTimeout() + else: + result = event_list + self.context.handleEventsTimeout() + return result + + def register(self, fd, events): + self.poller.register(fd, events) + + def unregister(self, fd): + self.poller.unregister(fd) + + def _registerFD(self, fd, events, user_data=None): + self.fd_set.add(fd) + self.register(fd, events) + + def _unregisterFD(self, fd, user_data=None): + self.unregister(fd) + self.sd_set.discard(fd) + class USBDeviceHandle(object): handle = None --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:05:01 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7M-0006GR-DJ>; Thu, 28 Jan 2010 13:05:00 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7M-0005gx-9r>; Thu, 28 Jan 2010 13:05:00 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:05:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=Gn26L3CK151jbxSENN5wQoNE6jhC8fwVMPCjWZCed08=; b=ZhT3oFWE4AaQ5TlUn5u8E87aeylVlaFs4Lsy82I8RcCyq01N2giTb/0PgBExyXyIPX ZV3QEeKF3BmmihxranLq3qqOfO52M/drZDAnC2DKsG38kttUE48cDBtGMc4Y9HhZX1Ak Ffc+Wg2MWinneYCnWQt2zjnxILvuhclmI+a/Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=mbSOESxZNkGRrHa+l03Ck/Nl6HpdW2m8RVjILTN2K5EWijrOumz+NtS3ptRa2e6A2X Cc/LWNLGntpDYzuYkDf90n9CzTqhYW4NaALFhy+d6uGZ6TZDYdJXk/fZ8N54+YT5kp+r 8lNh25HJnY1wsqX/leYjnWw5bbvLg9crOtuLA= Received: by 10.213.97.80 with SMTP id k16mr1848880ebn.2.1264680300090; Thu, 28 Jan 2010 04:05:00 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.04.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:04:59 -0800 (PST) Message-Id: <2eb1a655f6e7d06b3732a213e34d858a5987d4ec.1264680187.git.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:12:47 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680300-00000DDD-C141E13D/0-0/0-0 X-Bogosity: Unsure, tests=bogofilter, spamicity=0.474395, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: xx X-Spam-Status: No, score=2.9 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,FU_BOGO_UNSURE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 12/17] Always check group track are in disk boundaries. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:05:01 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- netmd/libnetmd.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0012-Always-check-group-track-are-in-disk-boundaries.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0012-Always-check-group-track-are-in-disk-boundaries.patch" diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index def234a..a66a9d9 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -674,6 +674,7 @@ class NetMDInterface(object): raw_title = self._getDiscTitle() group_list = raw_title.split('//') track_dict = {} + track_count = self.getTrackCount() result = [] append = result.append for group_index, group in enumerate(group_list): @@ -684,12 +685,14 @@ class NetMDInterface(object): track_range, group_name = group.split(';', 1) if '-' in track_range: track_min, track_max = track_range.split('-') - assert track_min < track_max, '%r, %r' % (track_min, track_max) else: track_min = track_max = track_range + track_min, track_max = int(track_min), int(track_max) + assert 0 <= track_min <= track_max <= track_count, ( + track_min, track_max, track_count) track_list = [] track_append = track_list.append - for track in xrange(int(track_min) - 1, int(track_max)): + for track in xrange(track_min - 1, track_max): if track in track_dict: raise ValueError, 'Track %i is in 2 groups: %r[%i] & ' \ '%r[%i]' % (track, track_dict[track][0], --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:05:03 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7O-0006IT-KX>; Thu, 28 Jan 2010 13:05:02 +0100 Received: from ey-out-2122.google.com ([74.125.78.27]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7O-0005g6-HI>; Thu, 28 Jan 2010 13:05:02 +0100 Received: by ey-out-2122.google.com with SMTP id d26so174815eyd.3 for ; Thu, 28 Jan 2010 04:05:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=Jt4NIhSU+gFgoc0iLgB2Qr+qz2Pu4EBN2zV5k40DqVU=; b=Sso+j76udOEJ1DgnRanMbXX0optu+cdy6nVAFV6L5xbxaGIYee9m/zyey0+UUvUsFL rTOUKmbZxZSxf/MnG4zeuvbrBCzrn9Eq43eW3FD4bP0cNatSlLL/6G+ZW/9aZY34Tu+Z AILNo3zM/rrD4dZGP7IDKXWWZ8yODATcpCdJ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=xImmmW/lWydI/uh93voK1zuevE2amOK6AiI0++UACoVr9rgbS2fin/7lzZPldF1d54 H7nyE5GHkbYiCiKAUKjEt5cMxJ+MpHNtzNaJ2G/qe9z5pwgzA3tLe1rSYiJdEruKhJOi TkNjcv4tGvnqaIGNbTa2ivCKdptC0UcaAF5Cs= Received: by 10.213.110.138 with SMTP id n10mr5691305ebp.24.1264680301812; Thu, 28 Jan 2010 04:05:01 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.05.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:05:01 -0800 (PST) Message-Id: <7b1fc9eb2b95a0138c83114b20a1e4a9ea9d74a7.1264680187.git.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:36:25 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 74.125.78.27 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680302-00000DDD-77DF87E0/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.097821, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 16/17] Add a parameter to override disk title. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:05:03 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- netmd/dump_md.py | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0016-Add-a-parameter-to-override-disk-title.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0016-Add-a-parameter-to-override-disk-title.patch" diff --git a/netmd/dump_md.py b/netmd/dump_md.py index fe2cb44..3e6cac8 100755 --- a/netmd/dump_md.py +++ b/netmd/dump_md.py @@ -4,13 +4,13 @@ import usb1 import libnetmd from time import sleep -def main(bus=None, device_address=None, ext='ogg', track_range=None): +def main(bus=None, device_address=None, ext='ogg', track_range=None, title=None): context = usb1.LibUSBContext() for md in libnetmd.iterdevices(context, bus=bus, device_address=device_address): md_iface = libnetmd.NetMDInterface(md) try: - MDDump(md_iface, ext, track_range) + MDDump(md_iface, ext, track_range, title) finally: md_iface.stop() @@ -43,10 +43,13 @@ def getTrackList(md_iface, track_range): title)) return result -def MDDump(md_iface, ext, track_range): - ascii_title = md_iface.getDiscTitle() - wchar_title = md_iface.getDiscTitle(True).decode('shift_jis') - disc_title = wchar_title or ascii_title +def MDDump(md_iface, ext, track_range, disk_title_override=None): + if disk_title_override is None: + ascii_title = md_iface.getDiscTitle() + wchar_title = md_iface.getDiscTitle(True).decode('shift_jis') + disc_title = wchar_title or ascii_title + else: + disc_title = disk_title_override if disc_title == '': directory = '.' else: @@ -101,6 +104,7 @@ if __name__ == '__main__': parser.add_option('-b', '--bus') parser.add_option('-d', '--device') parser.add_option('-t', '--track-range') + parser.add_option('-T', '--title') (options, args) = parser.parse_args() assert len(args) < 2 if len(args) == 1: @@ -124,5 +128,5 @@ if __name__ == '__main__': else: track_range = int(track_range) - 1 main(bus=options.bus, device_address=options.device, ext=ext, - track_range=track_range) + track_range=track_range, title=options.title) --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:05:04 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7P-0006Ip-II>; Thu, 28 Jan 2010 13:05:03 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7P-0005gx-EP>; Thu, 28 Jan 2010 13:05:03 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:05:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=bV3M4mrEAFYdS1bnZPsvfwX1cJEBBP91iRR3MRZoxaE=; b=T32svaoEKYlzEbHcR9JDEJ/qehWybPonPhjEBEqRN/jXrWrArNH+qHhiiVR+xppb1z kxL9kE1mr10nVySfd80h0DUpYhZ3H7mRlElQgFQ+NC48y031samwTkZ2dqoMg3RUkoH/ eGWAsziliStqGKPy76KKYydEhSCHqSWjMTzTw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=ssoJHKz0fwO7ku3fN8ZEih/rJp4+DhaCINHnunBA52R/8hqhtaJGo4vbii0xzoAzYA clLT71ad1b0e6XMVm2eLXpQzhMoDPPSGGFEqyCyKY25c0TxZUFncLuizLTgYjZm9z8NO HMpcZx0DURPBkZDFDrz3lZtTr1FQDYWJqFE/4= Received: by 10.213.37.14 with SMTP id v14mr420356ebd.28.1264680303143; Thu, 28 Jan 2010 04:05:03 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.05.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:05:02 -0800 (PST) Message-Id: <27315bb2909a4dabde37420a987e705571a02a83.1264680187.git.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Tue, 26 Jan 2010 21:09:23 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680303-00000DDD-E680E23A/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.024693, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.8 required=5.0 tests=DATE_IN_PAST_24_48, DNS_FROM_RFC_POST,FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 02/17] This is no "WTF ?", simply a pointer to ISO packet descriptor. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:05:04 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- netmd/libusb1.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0002-This-is-no-WTF-simply-a-pointer-to-ISO-packet-descri.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0002-This-is-no-WTF-simply-a-pointer-to-ISO-packet-descri.patch" diff --git a/netmd/libusb1.py b/netmd/libusb1.py index 7c99505..9f68be5 100644 --- a/netmd/libusb1.py +++ b/netmd/libusb1.py @@ -448,6 +448,7 @@ class libusb_iso_packet_descriptor(Structure): _fields_ = [('length', c_uint), ('actual_length', c_uint), ('status', c_int)] # enum libusb_transfer_status +libusb_iso_packet_descriptor_p = POINTER(libusb_iso_packet_descriptor) class libusb_transfer(Structure): pass @@ -467,8 +468,7 @@ libusb_transfer._fields_ = [('dev_handle', libusb_device_handle_p), ('user_data', c_void_p), ('buffer', c_char_p), ('num_iso_packets', c_int), - ('iso_packet_desc', - libusb_iso_packet_descriptor * 0) # XXX: WTF ? + ('iso_packet_desc', libusb_iso_packet_descriptor_p) ] #int libusb_init(libusb_context **ctx); --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:05:06 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7R-0006JF-2d>; Thu, 28 Jan 2010 13:05:05 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7Q-0005gx-V4>; Thu, 28 Jan 2010 13:05:05 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:05:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=lMCSJ295QmIcqvFPTysF+CpOhVihM7JP40Y3+2od3UU=; b=Kjo1M/37I27czjV7GEhWOmVFOaS8RuPWIogiJXwfKM7wHwmHuLLqItfk4JbNw3qUgw 7aPd9KEXYuyhM2PuZMAsqnexd9fDA+qzUTjEoUkhGRsLP3rbbNQ5dlc4qddFD1w+U9e5 2iZ/px+7zAFowr4Hekrzdkt5CVQ+R2PJZuGSw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=fTr+w8EFjQw1HIX0DYWTEJTpWRyksk5c8uLUcxBmBuVSq/jd26nLDuJtSbD+XHJG+W UnAIllnBSCeZ+OJgtQBPKbtAS1J0+pKzEOedlI/5kpA2gSstS3bpfqo7KiXQXcqKXgOk OQG/OkftqE6ShnfDNXOOYUUcQ9JKTF1nGNPto= Received: by 10.213.100.208 with SMTP id z16mr1925867ebn.80.1264680304729; Thu, 28 Jan 2010 04:05:04 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.05.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:05:04 -0800 (PST) Message-Id: <3962f3e0f347de33c52999040cafe39e6476dcd2.1264680187.git.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:15:48 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680305-00000DDD-7CF47C89/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.391042, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 15/17] Make lsmd display track groups. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:05:06 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit Remove "untested" comment from getTrackGroupList. --- netmd/libnetmd.py | 1 - netmd/lsmd.py | 25 ++++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0015-Make-lsmd-display-track-groups.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0015-Make-lsmd-display-track-groups.patch" diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index 883457b..5e50398 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -670,7 +670,6 @@ class NetMDInterface(object): group title track number list """ - # XXX: not tested raw_title = self._getDiscTitle() group_list = raw_title.split('//') track_dict = {} diff --git a/netmd/lsmd.py b/netmd/lsmd.py index 088e784..c7821b4 100755 --- a/netmd/lsmd.py +++ b/netmd/lsmd.py @@ -49,15 +49,22 @@ def listMD(md): (disc_total - disc_left) / float(disc_total) * 100) track_count = md_iface.getTrackCount() print '%i tracks' % (track_count, ) - for track in xrange(track_count): - hour, minute, second, sample = md_iface.getTrackLength(track) - codec, channel_count = md_iface.getTrackEncoding(track) - flags = md_iface.getTrackFlags(track) - print '%03i: %02i:%02i:%02i+%03i %s %s %s %r %s' % (track, hour, - minute, second, sample, codec_name_dict[codec], - channel_count_dict[channel_count], flag_dict[flags], - md_iface.getTrackTitle(track), - md_iface.getTrackTitle(track, True).decode('shift_jis')) + for group, (group_name, track_list) in enumerate( + md_iface.getTrackGroupList()): + if group_name is None: + prefix = '' + else: + prefix = ' ' + print 'Group %r' % (group_name or group + 1, ) + for track, real_track in enumerate(track_list): + hour, minute, second, sample = md_iface.getTrackLength(real_track) + codec, channel_count = md_iface.getTrackEncoding(real_track) + flags = md_iface.getTrackFlags(real_track) + print '%s%03i: %02i:%02i:%02i+%03i %s %s %s %r %s' % (prefix, + track, hour, minute, second, sample, codec_name_dict[codec], + channel_count_dict[channel_count], flag_dict[flags], + md_iface.getTrackTitle(real_track), + md_iface.getTrackTitle(real_track, True).decode('shift_jis')) if __name__ == '__main__': from optparse import OptionParser --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:05:07 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7S-0006Ja-6o>; Thu, 28 Jan 2010 13:05:06 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7S-0005gx-3F>; Thu, 28 Jan 2010 13:05:06 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:05:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=pCPQ0oICI6zLm8g9JdSVzN0tMILGjOgwfjuM5Xwo88w=; b=rxlEgB66d47hp7lxa7xkPhPHYnYceu+klLZ8JoFBkNRON78fbUEj5Smbxn0kvb4YJ0 rk95wSKNEg7S4qof2ooHurankYCMqF9I50v5o78CKcEUWJjfvmfImUbSau8AN4Uo93j6 z0+2HmJrTAxAe8MfZJfUfh8KUqJ45nKt/EYxE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=tNc3svITVpzCnOWri/3jXh2//4agizMLDT44R1zuNQ4N4zNOoI8ACEO+/6TmbAb5pH 7vgNHaxthgzFqbO4F+Ym5dVJdUE3ddMYHv4pj1aoSY+dCD1Z2UGwGqVEqPOflv14R5Ha mEU/Jrf6Pllhg5bNq1NC+hUSSh2dft7SAI4/Q= Received: by 10.213.100.133 with SMTP id y5mr1723433ebn.26.1264680305699; Thu, 28 Jan 2010 04:05:05 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.05.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:05:05 -0800 (PST) Message-Id: In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:14:50 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680306-00000DDD-EFC86E61/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.007205, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 14/17] Generate an extra group containing all tracks which are in no group. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:05:07 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit It has None as its title to make it stand out of regular groups. --- netmd/libnetmd.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0014-Generate-an-extra-group-containing-all-tracks-which-.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0014-Generate-an-extra-group-containing-all-tracks-which-.patch" diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index 5a9829e..883457b 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -700,6 +700,9 @@ class NetMDInterface(object): track_dict[track] = group_name, group_index track_append(track) append((group_name, track_list)) + track_list = [x for x in xrange(track_count) if x not in track_dict] + if len(track_list): + append((None, track_list)) return result def getTrackTitle(self, track, wchar=False): --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:05:08 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7T-0006Jv-SI>; Thu, 28 Jan 2010 13:05:07 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7T-0005gx-O0>; Thu, 28 Jan 2010 13:05:07 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:05:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=j604in+hU+99bR1DM11KWFO1eTMmz5/Oi1sGdOlE+Ak=; b=hQrwhMHnu1k+yhCTW8hzABR9G8ujtAzNmUEyBjeYDK3mASQnZBXS6DqWIYfNyR4Q/v 4Y3JEOe1ejL8gEphb2Zy+903zpVUlkeR53Sgq7WN6T+CQJSWYYtFbjj6d3VL8PJEhdyZ bwDTpP61VCoRfJD6hQcfNhdsriCG5OyVAjr6E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=vWrf5DvhgJKyQETWmCRhRmA/jMJkhiXfbcoeD0pyE1+NR3zRKgup03IGkWDCmGBBVJ YAkvvMMtFyTBIHkGEW6oOOe/YdbSjk2rCqSQReDonDZu6aw/0R6nvlyFbid7rq3JkhBE HRtT1zo/zebV04k8j8SszY3v/EaUoHN/Gwf5c= Received: by 10.213.1.148 with SMTP id 20mr1372377ebf.89.1264680307259; Thu, 28 Jan 2010 04:05:07 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.05.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:05:06 -0800 (PST) Message-Id: In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Tue, 26 Jan 2010 21:14:07 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680307-00000DDD-9562B8E8/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.001220, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.8 required=5.0 tests=DATE_IN_PAST_24_48, DNS_FROM_RFC_POST,FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 05/17] Export methods to release resources. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:05:09 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit This allows user to work-around race conditions in interpreter shutdown, where context might be freed before handle - for example. --- netmd/usb1.py | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0005-Export-methods-to-release-resources.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0005-Export-methods-to-release-resources.patch" diff --git a/netmd/usb1.py b/netmd/usb1.py index e9e3ea1..d22f52a 100644 --- a/netmd/usb1.py +++ b/netmd/usb1.py @@ -9,11 +9,19 @@ __all__ = ['LibUSBContext'] STRING_LENGTH = 256 class USBDeviceHandle(object): + handle = None + def __init__(self, handle): self.handle = handle def __del__(self): - libusb1.libusb_close(self.handle) + self.close() + + def close(self): + handle = self.handle + if handle is not None: + libusb1.libusb_close(handle) + self.handle = None def getConfiguration(self): configuration = c_int() @@ -313,8 +321,13 @@ class LibUSBContext(object): self.context_p = context_p def __del__(self): - if self.context_p is not None: - libusb1.libusb_exit(self.context_p) + self.exit() + + def exit(self): + context_p = self.context_p + if context_p is not None: + libusb1.libusb_exit(context_p) + self.context_p = None def getDeviceList(self): device_p_p = libusb1.libusb_device_p_p() --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:05:09 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7U-0006KW-Os>; Thu, 28 Jan 2010 13:05:09 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7U-0005gx-LW>; Thu, 28 Jan 2010 13:05:08 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:05:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=/VbX80IhWWQ2L6jDGdMAm1H4PYQ/bNatdCl/+IsiO5Q=; b=uLfbjDNvBYHoeXaNtC4SY7gZmzCgXbig+TAM76VbK2EECPhsYEeNKgAlfGNVM6cSEZ r+imMFhx7l0Wig7QznKtAcYL7m06Ri/QYK1Sr3gJf86PXLwbHk3tymZeQlpQRUcn83G+ 0kgbhJeJF4fdJSQEKPlAnMHBwoI3dCuPhnUIQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=wJjbvQDqmougTq1FdMdDKKy2pxfAfTi5t/q6l/IXKGwcCUSyMSzQDEmucVbcIRAV3d TrGkGklNWH9EpqGrTpmjqF3zw8jlB95zZgEyWRhXr7SDlVvzNbjn6mRlsNIex04oVWdl 7stPT2HAiMqg8sES0eRk1TKJMzqeo7ve5l5ZE= Received: by 10.213.100.203 with SMTP id z11mr3611640ebn.51.1264680308458; Thu, 28 Jan 2010 04:05:08 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.05.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:05:08 -0800 (PST) Message-Id: In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:38:08 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680309-00000DDD-2C9052C5/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.194224, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 17/17] Fix a syntax error. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:05:10 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- netmd/dump_md.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0017-Fix-a-syntax-error.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0017-Fix-a-syntax-error.patch" diff --git a/netmd/dump_md.py b/netmd/dump_md.py index 3e6cac8..d9bed30 100755 --- a/netmd/dump_md.py +++ b/netmd/dump_md.py @@ -67,7 +67,7 @@ def MDDump(md_iface, ext, track_range, disk_title_override=None): # Attemp to reduce the MD play delay by... print 'Waiting for MD...' # Waiting for the seek to complete... - while md_iface.getPosition() != [track, 0, 0, 0, 1] and + while md_iface.getPosition() != [track, 0, 0, 0, 1] and \ md_iface.getPosition() != [track, 0, 0, 0, 2]: sleep(1) # And waiting for the play to actualy begin. --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:05:11 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7W-0006L2-S3>; Thu, 28 Jan 2010 13:05:10 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7W-0005gx-Oy>; Thu, 28 Jan 2010 13:05:10 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:05:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=Rp/JuP5FfYwzkTBMa2CUG0AMFFbLg8bfcvVAuGG+KMo=; b=IjsfXAVZib6OTZRG+R78a6bDoK2ERKeRjEvo5xYHULfBpX4ig4E8eVxUEVp505AcM4 hLbrhebBc3xQybgB5c0l3njN41EcnLzLN3XTwX+rF0GCN1J7YTNzrd0wZ0N4+s+uBt20 HK4XZx9i+tmHk/0YgvqLu0EjIQ5x/8NSO58RM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=gmP0I8yokOKf/gGOSYQtKyCi9TQvJPCgVp0cxKNT7q+SdkBY0uTx3o0LNQxWXSRrjq 7JwDcv16kqZitCkm7oaI2KOuUhpFXY0+44XuJPAJmKhP++DF2BwOrmGj0xDn2uLY2Mdd WZflwRDx/tlOlWIor764LyUa4IRkQQQVhrXqk= Received: by 10.213.109.67 with SMTP id i3mr2945890ebp.52.1264680310431; Thu, 28 Jan 2010 04:05:10 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.05.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:05:09 -0800 (PST) Message-Id: <945c1e48ce7d02b8cfd1f13555ceeaf19d71e7c9.1264680187.git.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Wed, 27 Jan 2010 20:34:07 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680310-00000DDD-8BBA087A/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.267526, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 09/17] Fix segfaults at interpreter exit. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:05:12 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- netmd/usb1.py | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0009-Fix-segfaults-at-interpreter-exit.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0009-Fix-segfaults-at-interpreter-exit.patch" diff --git a/netmd/usb1.py b/netmd/usb1.py index c5d9f77..925adfc 100644 --- a/netmd/usb1.py +++ b/netmd/usb1.py @@ -11,7 +11,10 @@ STRING_LENGTH = 256 class USBDeviceHandle(object): handle = None - def __init__(self, handle): + def __init__(self, context, handle): + # XXX Context parameter is just here as a hint for garbage collector: + # It must collect USBDeviceHandle instance before their LibUSBContext. + self.context = context self.handle = handle def __del__(self): @@ -232,7 +235,8 @@ class USBDevice(object): configuration_descriptor_list = None - def __init__(self, device_p): + def __init__(self, context, device_p): + self.context = context libusb1.libusb_ref_device(device_p) self.device_p = device_p # Fetch device descriptor @@ -373,7 +377,7 @@ class USBDevice(object): result = libusb1.libusb_open(self.device_p, byref(handle)) if result: raise libusb1.USBError, result - return USBDeviceHandle(handle) + return USBDeviceHandle(self.context, handle) class LibUSBContext(object): @@ -399,7 +403,7 @@ class LibUSBContext(object): device_p_p = libusb1.libusb_device_p_p() device_list_len = libusb1.libusb_get_device_list(self.context_p, byref(device_p_p)) - result = [USBDevice(x) for x in device_p_p[:device_list_len]] + result = [USBDevice(self, x) for x in device_p_p[:device_list_len]] # XXX: causes problems, why ? #libusb1.libusb_free_device_list(device_p_p, 1) return result @@ -408,7 +412,7 @@ class LibUSBContext(object): handle_p = libusb1.libusb_open_device_with_vid_pid(self.context_p, vendor_id, product_id) if handle_p: - result = USBDeviceHandle(handle_p) + result = USBDeviceHandle(self, handle_p) else: result = None return result --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:05:13 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7Y-0006LS-H8>; Thu, 28 Jan 2010 13:05:12 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7Y-0005gx-Dc>; Thu, 28 Jan 2010 13:05:12 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:05:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=LY/S5AWdBmvyXhM2xEvq/J+6YafCzaJEaPtmg4xnEQg=; b=fcrdDq0xxA2GTKQAApnbWgpF4sRScrHmf20ttJK3v2dR0Gtpu+9dsg8v8l7a5LJBNV fSv1FQ7UM08vAD1Pm0UDP2BA0EXdjRXTKreJIbvmYmCyAqokYciDhmFCdrQG+QikwpX6 1v2Y3/pibRwmRdoiGiFQCmkt9mGYlExKTTqgk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=Bd3nHAqJOaSETb4YvhYduGac/cNea3pxG4oHXxhI5o9WXoVq5H9K7VXtyL7Xxq7luj Gg+WdNFMXqlorozzdgxKc05Vbnn9feNSIUiZpye7lmuWQOfU+aqYCEzPnSwSfZ3+fZCJ NbANU3bAzVr4WLjoWYXrRBHZxWKkghbZ+mXYs= Received: by 10.213.54.74 with SMTP id p10mr163564ebg.54.1264680312219; Thu, 28 Jan 2010 04:05:12 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.05.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:05:11 -0800 (PST) Message-Id: <8df4344fd5b2ec952daae39ee1c5476990a29a64.1264680187.git.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:13:51 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680312-00000DDD-DF1FA799/0-0/0-0 X-Bogosity: Unsure, tests=bogofilter, spamicity=0.469121, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: xx X-Spam-Status: No, score=2.9 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,FU_BOGO_UNSURE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 13/17] Put group name in return value, rather than its computed index. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:05:13 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- netmd/libnetmd.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0013-Put-group-name-in-return-value-rather-than-its-compu.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0013-Put-group-name-in-return-value-rather-than-its-compu.patch" diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index a66a9d9..5a9829e 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -699,7 +699,7 @@ class NetMDInterface(object): track_dict[track][1], group_name, group_index) track_dict[track] = group_name, group_index track_append(track) - append((group, track_list)) + append((group_name, track_list)) return result def getTrackTitle(self, track, wchar=False): --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:05:14 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7Z-0006Lm-F8>; Thu, 28 Jan 2010 13:05:13 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7Z-0005gx-BJ>; Thu, 28 Jan 2010 13:05:13 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:05:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=QzDlVRhPgO+XRHc+S+8aWiZ+C2Cl//ubbk1CpXZoKEg=; b=oM9++FI68AllaN0kdbH2p1GHmHlOvr+kaFuMkRd6VHVj2QUEGNvnqwaa+P6i4ffLE7 WMedu4/8qBnYDJJc3mlCn5kLvdSsYVS0Udw9ETPIfGfUt6p3y0vV1lW8FRYUxklNgAwv TcGwnkgd9BouIeXRBy0ZEs2pzGgcRxhtXn/iY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=QcRu0Vvvb1OzJCD73HVUXR/i22cgaXgEJwLFZIJo7h064CB8gtxNijiHTCrt0eLiD2 2MUORC7aL8C+DhiGAhcqjWh/miT7YFEa6hKVKP115ynNwMBjHWDYnRNX308ieiS22OZr 1FxMlVPaaYQ8KaV4oeB/HHMvL1GK52dyd7fZY= Received: by 10.213.45.202 with SMTP id g10mr5200708ebf.60.1264680312927; Thu, 28 Jan 2010 04:05:12 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.05.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:05:12 -0800 (PST) Message-Id: In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Wed, 27 Jan 2010 08:24:22 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680313-00000DDD-48A862ED/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.018303, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.8 required=5.0 tests=DATE_IN_PAST_24_48, DNS_FROM_RFC_POST,FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 07/17] device_address is an integer, call getDeviceAddress on device. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:05:14 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- netmd/libnetmd.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0007-device_address-is-an-integer-call-getDeviceAddress-o.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0007-device_address-is-an-integer-call-getDeviceAddress-o.patch" diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index a2c1cf2..1d1d531 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -66,7 +66,7 @@ def iterdevices(usb_context, bus=None, device_address=None): if bus is not None and bus != device.getBusNumber(): continue if device_address is not None and \ - device != device_address.getDeviceAddress(): + device_address != device.getDeviceAddress(): continue if (device.getVendorID(), device.getProductID()) in KNOWN_USB_ID_SET: yield NetMD(device.open()) --------------1.6.6-- From plr.vincent@gmail.com Thu Jan 28 13:05:14 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7a-0006M3-0V>; Thu, 28 Jan 2010 13:05:14 +0100 Received: from mail-ew0-f228.google.com ([209.85.219.228]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaT7Z-0005gx-T3>; Thu, 28 Jan 2010 13:05:13 +0100 Received: by mail-ew0-f228.google.com with SMTP id 28so41144ewy.15 for ; Thu, 28 Jan 2010 04:05:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type :x-bogosity:x-uid; bh=ImUbE1y2oTnkOj/Zw9K8EigLucUydNnRDkuJJWufw0o=; b=sGOHrz5KuGN9nTVqAbovWsiYspzBORbmi/eGGTqORnfyvjbGC0efbngy7gTHZE/hPB 2Dz3VpvO+TnDTFmi/+zgHu7KuO8e+LImHBOZXdSi2wxkmXMFfCycjkm9TgtYW9aJ1FLw Ejnu4v0Sel4s4gvY6esIAdsVnigGbHLRXGxJM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-bogosity:x-uid; b=vA57xcDdQUmt+m4Wzxk487Nw3RYBzVzLe5hJ9Rx17U4wjucEtIy/5Z2KvmARftX+k2 PI2UMuOX10BIh49yViCUCZ7rIen8C3vWgvwR0PEyrw0OIOUm4UKIgg1S6daNTMdzRni+ AOiLAiZIhnBVy89VRcdUMbW/aHv2v6jX8DtbE= Received: by 10.213.8.26 with SMTP id f26mr233258ebf.14.1264680313702; Thu, 28 Jan 2010 04:05:13 -0800 (PST) Received: from x2.localnet (ALille-154-1-59-213.w86-198.abo.wanadoo.fr [86.198.226.213]) by mx.google.com with ESMTPS id 14sm586169ewy.11.2010.01.28.04.05.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Jan 2010 04:05:13 -0800 (PST) Message-Id: <2702a83a144bb5e6aec603b44e868c8465992f3f.1264680187.git.plr.vincent@gmail.com> In-Reply-To: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> References: <72f89d641521a95454af6df94732f5f7dcd0b0c3.1264680187.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:10:54 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" X-UID: X-Originating-IP: 209.85.219.228 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1264680314-00000DDD-77E7DA45/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.026791, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: x X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 11/17] Change method name: this method returns a list, not a dict. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 12:05:15 -0000 This is a multi-part message in MIME format. --------------1.6.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- netmd/libnetmd.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0011-Change-method-name-this-method-returns-a-list-not-a-.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0011-Change-method-name-this-method-returns-a-list-not-a-.patch" diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index 1d1d531..def234a 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -663,7 +663,7 @@ class NetMDInterface(object): title = ''; return title - def getTrackGroupDict(self): + def getTrackGroupList(self): """ Return a list representing track groups. This list is composed of 2-tuples: --------------1.6.6-- From glaubitz@physik.fu-berlin.de Thu Jan 28 23:02:49 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NacRr-0001XM-Ue>; Thu, 28 Jan 2010 23:02:48 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1NacRr-0003pE-SQ>; Thu, 28 Jan 2010 23:02:47 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NacRr-0003JQ-NR; Thu, 28 Jan 2010 23:02:47 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1NacRr-0007Yy-LH; Thu, 28 Jan 2010 23:02:47 +0100 Date: Thu, 28 Jan 2010 23:02:47 +0100 To: Vincent Pelletier Message-ID: <20100128220247.GB27484@physik.fu-berlin.de> References: <201001262125.33769.plr.vincent@gmail.com> <20100128100232.GA7653@physik.fu-berlin.de> <201001281302.12133.plr.vincent@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201001281302.12133.plr.vincent@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264716167-00000DDD-5B107605/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.200497, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] [PATCH 1/6] Make function acting on a transfer accept a pointer to transfer. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 22:02:49 -0000 Hi Vincent, On Thu, Jan 28, 2010 at 01:02:11PM +0100, Vincent Pelletier wrote: > Le jeudi 28 janvier 2010 11:02:32, Adrian Glaubitz a écrit : > > All patches except for patch #0005 are malformed, I think it's > > something with the line break? Could you recreate these patches from > > your git repo or do you want me to fix them manually? > > Probably something wrong in mail transfer chain (I used git imap-send to push > it to my gmail account, but had to fetch them back with kmail to submit them > to SMTP). Ah, okey, the linebreak might have got lost in the chain, sh*t happens ;-). > > I'll regenerate them at attachments, all in one batch. > Great, I will apply the patches during the weekend. > Sorry for the inconvenience. > Nah, no worries. I really really appreciate your work. Thanks alot! Adrian From glaubitz@physik.fu-berlin.de Fri Jan 29 10:47:28 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NanRn-0005VJ-3f>; Fri, 29 Jan 2010 10:47:27 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1NanRn-0000nJ-1N>; Fri, 29 Jan 2010 10:47:27 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NanRm-0005yh-St; Fri, 29 Jan 2010 10:47:26 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1NanRm-00049g-Qy; Fri, 29 Jan 2010 10:47:26 +0100 Date: Fri, 29 Jan 2010 10:47:26 +0100 To: Vincent Pelletier Message-ID: <20100129094726.GA14533@physik.fu-berlin.de> References: <201001262125.33769.plr.vincent@gmail.com> <20100128100232.GA7653@physik.fu-berlin.de> <201001281302.12133.plr.vincent@gmail.com> <20100128220247.GB27484@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100128220247.GB27484@physik.fu-berlin.de> User-Agent: Mutt/1.5.20 (2009-06-14) From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264758447-00000DDD-BF242412/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.198069, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] [PATCH 1/6] Make function acting on a transfer accept a pointer to transfer. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 09:47:28 -0000 Hi Vincent, On Thu, Jan 28, 2010 at 11:02:47PM +0100, Adrian Glaubitz wrote: > > Great, I will apply the patches during the weekend. patches are in. There was no commit email to the mailing list unfortunately since the script which sends the mails was broken but it's fixed again now. Adrian From glaubitz@physik.fu-berlin.de Fri Jan 29 18:13:03 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NauP0-0003Vt-Uc>; Fri, 29 Jan 2010 18:13:03 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NauP0-0004fH-Sj>; Fri, 29 Jan 2010 18:13:02 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NauP0-0007wT-O1 for linux-minidisc@lists.fu-berlin.de; Fri, 29 Jan 2010 18:13:02 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1NauP0-0003ce-Ge for ; Fri, 29 Jan 2010 18:13:02 +0100 Date: Fri, 29 Jan 2010 18:13:02 +0100 Message-Id: To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 8995b139981dabbb24e4ced958e1684d9b6fc05e X-Git-Newrev: 42d18a749c155eb8ea3ab5cb709caecfeaa024bd From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264785182-00000DDD-A848FA0D/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Benin.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkmen branch, master, updated. 42d18a749c155eb8ea3ab5cb709caecfeaa024bd X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 17:13:03 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkmen". The branch, master has been updated via 42d18a749c155eb8ea3ab5cb709caecfeaa024bd (commit) from 8995b139981dabbb24e4ced958e1684d9b6fc05e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 42d18a749c155eb8ea3ab5cb709caecfeaa024bd Author: Pliubis Apostolos Date: Fri Jan 29 18:12:14 2010 +0100 Added Greek translation. ----------------------------------------------------------------------- Summary of changes: qhimdtransfer/qhimdtransfer.pro | 2 +- .../{qhimdtransfer_ar.ts => qhimdtransfer_gr.ts} | 133 ++++++++++---------- 2 files changed, 67 insertions(+), 68 deletions(-) copy qhimdtransfer/{qhimdtransfer_ar.ts => qhimdtransfer_gr.ts} (53%) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkmen From glaubitz@physik.fu-berlin.de Fri Jan 29 20:15:11 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NawJC-0007AY-0i>; Fri, 29 Jan 2010 20:15:10 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NawJB-0000Oo-Uh>; Fri, 29 Jan 2010 20:15:09 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NawJB-0008IV-PW for linux-minidisc@lists.fu-berlin.de; Fri, 29 Jan 2010 20:15:09 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1NawJB-0006xF-Ne for ; Fri, 29 Jan 2010 20:15:09 +0100 Date: Fri, 29 Jan 2010 20:15:09 +0100 To: linux-minidisc@lists.fu-berlin.de Message-ID: <20100129191509.GA26643@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264792510-00000DDD-6C38CB13/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000101, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Subject: [linux-minidisc] New Ubuntu packages X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 19:15:12 -0000 Hi, I have uploaded new Ubuntu packages for Jaunty, Karmic and Lucid. Changes are: * Update to git 20100129. * Include himdformat. Packages can be found on my lauchpad site: Adrian From glaubitz@physik.fu-berlin.de Fri Jan 29 21:08:41 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1Nax8y-0000Ms-56>; Fri, 29 Jan 2010 21:08:40 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1Nax8y-0004De-34>; Fri, 29 Jan 2010 21:08:40 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Nax8x-0008SS-U0 for linux-minidisc@lists.fu-berlin.de; Fri, 29 Jan 2010 21:08:39 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1Nax8x-0007wK-Pn for ; Fri, 29 Jan 2010 21:08:39 +0100 Date: Fri, 29 Jan 2010 21:08:39 +0100 Message-Id: To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 42d18a749c155eb8ea3ab5cb709caecfeaa024bd X-Git-Newrev: 06592c34d35961b939e48634fad64e4cd19dc9db From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264795720-00000DDD-32796A74/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkmen branch, master, updated. 06592c34d35961b939e48634fad64e4cd19dc9db X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 20:08:41 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkmen". The branch, master has been updated via 06592c34d35961b939e48634fad64e4cd19dc9db (commit) from 42d18a749c155eb8ea3ab5cb709caecfeaa024bd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 06592c34d35961b939e48634fad64e4cd19dc9db Author: Adrian Glaubitz Date: Fri Jan 29 21:07:56 2010 +0100 Corrected filename for Greek translation. Was: qhimdtransfer_gr.ts and is now qhimdtransfer_el.ts. ----------------------------------------------------------------------- Summary of changes: qhimdtransfer/qhimdtransfer.pro | 2 +- .../{qhimdtransfer_gr.ts => qhimdtransfer_el.ts} | 0 2 files changed, 1 insertions(+), 1 deletions(-) rename qhimdtransfer/{qhimdtransfer_gr.ts => qhimdtransfer_el.ts} (100%) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkmen From glaubitz@physik.fu-berlin.de Fri Jan 29 21:32:32 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaxW3-00015G-AO>; Fri, 29 Jan 2010 21:32:31 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaxW3-0003vn-80>; Fri, 29 Jan 2010 21:32:31 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NaxW3-00005a-2c for linux-minidisc@lists.fu-berlin.de; Fri, 29 Jan 2010 21:32:31 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1NaxW2-0008R3-Uf for ; Fri, 29 Jan 2010 21:32:31 +0100 Date: Fri, 29 Jan 2010 21:32:30 +0100 Message-Id: To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 06592c34d35961b939e48634fad64e4cd19dc9db X-Git-Newrev: 5c204f6d9032ebaa11b77dbcf6493635ca61e39a From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264797151-00000DDD-3507541D/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkmen branch, master, updated. 5c204f6d9032ebaa11b77dbcf6493635ca61e39a X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 20:32:32 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkmen". The branch, master has been updated via 5c204f6d9032ebaa11b77dbcf6493635ca61e39a (commit) from 06592c34d35961b939e48634fad64e4cd19dc9db (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5c204f6d9032ebaa11b77dbcf6493635ca61e39a Author: Adrian Glaubitz Date: Fri Jan 29 21:31:58 2010 +0100 Rename minikey to himddiskid. ----------------------------------------------------------------------- Summary of changes: basictools/Makefile | 2 +- basictools/{minikey.c => himddiskid.c} | 0 2 files changed, 1 insertions(+), 1 deletions(-) rename basictools/{minikey.c => himddiskid.c} (100%) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkmen From glaubitz@physik.fu-berlin.de Fri Jan 29 21:39:44 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1Naxd1-0001Hn-7A>; Fri, 29 Jan 2010 21:39:43 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1Naxd1-0000Jd-53>; Fri, 29 Jan 2010 21:39:43 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Naxd1-00007X-16 for linux-minidisc@lists.fu-berlin.de; Fri, 29 Jan 2010 21:39:43 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1Naxd0-00008B-Sr for ; Fri, 29 Jan 2010 21:39:42 +0100 Date: Fri, 29 Jan 2010 21:39:42 +0100 Message-Id: To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 5c204f6d9032ebaa11b77dbcf6493635ca61e39a X-Git-Newrev: 080b21392ae198a1480f065213bbabc0a1b2c01b From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264797583-00000DDD-B8DCC800/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkmen branch, master, updated. 080b21392ae198a1480f065213bbabc0a1b2c01b X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 20:39:44 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkmen". The branch, master has been updated via 080b21392ae198a1480f065213bbabc0a1b2c01b (commit) from 5c204f6d9032ebaa11b77dbcf6493635ca61e39a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 080b21392ae198a1480f065213bbabc0a1b2c01b Author: Sindre Wetjen Date: Fri Jan 29 21:38:28 2010 +0100 Spell-checked and updated translation for Norwegian (bokmÃ¥l). ----------------------------------------------------------------------- Summary of changes: qhimdtransfer/qhimdtransfer_nb.ts | 86 ++++++++++++++++++------------------ 1 files changed, 43 insertions(+), 43 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkmen From glaubitz@physik.fu-berlin.de Fri Jan 29 21:43:04 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaxgF-0001PS-9M>; Fri, 29 Jan 2010 21:43:03 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NaxgF-0002T5-6r>; Fri, 29 Jan 2010 21:43:03 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NaxgF-00008Q-2W for linux-minidisc@lists.fu-berlin.de; Fri, 29 Jan 2010 21:43:03 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1NaxgE-0000F0-Tq for ; Fri, 29 Jan 2010 21:43:03 +0100 Date: Fri, 29 Jan 2010 21:43:02 +0100 Message-Id: To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 080b21392ae198a1480f065213bbabc0a1b2c01b X-Git-Newrev: b516f97d986b6a84b1b683b9f50783e7e4587763 From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264797783-00000DDD-BF66870A/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkmen branch, master, updated. b516f97d986b6a84b1b683b9f50783e7e4587763 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 20:43:04 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkmen". The branch, master has been updated via b516f97d986b6a84b1b683b9f50783e7e4587763 (commit) from 080b21392ae198a1480f065213bbabc0a1b2c01b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b516f97d986b6a84b1b683b9f50783e7e4587763 Author: Adrian Glaubitz Date: Fri Jan 29 21:42:35 2010 +0100 Rename himdtest to himddump. ----------------------------------------------------------------------- Summary of changes: himd.pro | 2 +- {himdtest => himddump}/.gitignore | 0 himdtest/himdtest.c => himddump/himddump.c | 0 himdtest/himdtest.pro => himddump/himddump.pro | 0 4 files changed, 1 insertions(+), 1 deletions(-) rename {himdtest => himddump}/.gitignore (100%) rename himdtest/himdtest.c => himddump/himddump.c (100%) rename himdtest/himdtest.pro => himddump/himddump.pro (100%) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkmen From glaubitz@physik.fu-berlin.de Fri Jan 29 23:04:59 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NayxW-0003rH-La>; Fri, 29 Jan 2010 23:04:58 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1NayxW-000543-Jq>; Fri, 29 Jan 2010 23:04:58 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NayxW-0000Ml-Eg for linux-minidisc@lists.fu-berlin.de; Fri, 29 Jan 2010 23:04:58 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1NayxW-0001om-AJ for ; Fri, 29 Jan 2010 23:04:58 +0100 Date: Fri, 29 Jan 2010 23:04:58 +0100 Message-Id: To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: b516f97d986b6a84b1b683b9f50783e7e4587763 X-Git-Newrev: 55195be1cd114a2734a62fdb659226ebee69bf40 From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264802698-00000DDD-D9651596/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkmen branch, master, updated. 55195be1cd114a2734a62fdb659226ebee69bf40 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 22:04:59 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkmen". The branch, master has been updated via 55195be1cd114a2734a62fdb659226ebee69bf40 (commit) from b516f97d986b6a84b1b683b9f50783e7e4587763 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 55195be1cd114a2734a62fdb659226ebee69bf40 Author: Adrian Glaubitz Date: Fri Jan 29 23:03:48 2010 +0100 Forgot to rename "himdtest.c" to "himddump.c" in "himddump.pro". ----------------------------------------------------------------------- Summary of changes: himddump/himddump.pro | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkmen From glaubitz@physik.fu-berlin.de Sat Jan 30 01:50:21 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1Nb1XX-00009l-Ki>; Sat, 30 Jan 2010 01:50:19 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1Nb1XX-0008K7-Iu>; Sat, 30 Jan 2010 01:50:19 +0100 Received: from z6.physik.fu-berlin.de ([160.45.66.66]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Nb1XX-0000mP-EG for linux-minidisc@lists.fu-berlin.de; Sat, 30 Jan 2010 01:50:19 +0100 Received: from glaubitz by z6.physik.fu-berlin.de with local (Exim 4.71 #1 (Debian)) id 1Nb1XX-0005aC-CX for ; Sat, 30 Jan 2010 01:50:19 +0100 Date: Sat, 30 Jan 2010 01:50:19 +0100 To: linux-minidisc@lists.fu-berlin.de Message-ID: <20100130005019.GA21263@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.20 (2009-06-14) From: Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-ID: 151147::1264812619-00000DDD-B62CDF94/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.008789, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Subject: [linux-minidisc] Updated Ubuntu packages X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 00:50:21 -0000 Hi, I just updated the Ubuntu packages. Changes are: * Updated translation for Norwegian (bokmål), thanks to Sindre Wetjen * Fixed filename for Greek translation file * Include himddiskid command line utility As usual, the packages can be found in my PPA: Adrian From plr.vincent@gmail.com Thu Feb 11 22:47:32 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1Nfgsl-0004sW-Tx>; Thu, 11 Feb 2010 22:47:32 +0100 Received: from mail-ew0-f227.google.com ([209.85.219.227]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1Nfgsl-0001Cv-Qa>; Thu, 11 Feb 2010 22:47:31 +0100 Received: by mail-ew0-f227.google.com with SMTP id 27so1899511ewy.38 for ; Thu, 11 Feb 2010 13:47:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type:x-length :x-uid; bh=fF7kVE1N89cBEdtlqoVaIjnl1CoGQjDqtF7hpPgULmo=; b=d9aWFZdnjPVCyCraSD5hV2XXULLasVyit6CkgPxNYXcpDyfp6/USGlO5ZVkVuVTlx+ PXiAQTWmMzDQ/8zu4Ggq4hXUIEJ97MxNKkqAX19mMsuv3WTEfLm95ptl0IhND4IgSCzI nHw2tpTknv9SYOr6F+jnr0FFrgRDTzaQfo5zI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-length:x-uid; b=l+Vrf8ycP7hpfQxevYhaMH1eAtVaZbX4pm5BZhZqTPDlrjy7l/6Q080ix32rbY+nNU jHXBA44eqaMYeZWNHPry7K9Ee8CNn9LXx8zA9ycktEcZKPjiCAJ4/L0i4CiHnEfp0oHn JjzgOq9EPk06ACa3CPjA7nMuVoOwkkOMYTZVI= Received: by 10.213.104.93 with SMTP id n29mr1144633ebo.6.1265924851642; Thu, 11 Feb 2010 13:47:31 -0800 (PST) Received: from x2.localnet (ALille-154-1-20-82.w86-196.abo.wanadoo.fr [86.196.11.82]) by mx.google.com with ESMTPS id 13sm1833059ewy.1.2010.02.11.13.47.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Feb 2010 13:47:31 -0800 (PST) Message-Id: <517da8638d73b593c051ec18568ce017bbf85690.1265924723.git.plr.vincent@gmail.com> In-Reply-To: <0fe2075adf9fe998f5e64b1a5803fef2bbed5d00.1265924723.git.plr.vincent@gmail.com> References: <0fe2075adf9fe998f5e64b1a5803fef2bbed5d00.1265924723.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:15:48 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6.1" X-Length: 1504 X-UID: 72671 X-Originating-IP: 209.85.219.227 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1265924851-00000DDD-020A3A62/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.416436, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: xx X-Spam-Status: No, score=2.5 required=5.0 tests=DATE_IN_PAST_96_XX, DNS_FROM_RFC_POST,FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 10/14] Make lsmd display track groups. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2010 21:47:33 -0000 This is a multi-part message in MIME format. --------------1.6.6.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit Remove "untested" comment from getTrackGroupList. --- netmd/libnetmd.py | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) --------------1.6.6.1 Content-Type: text/x-patch; name="0010-Make-lsmd-display-track-groups.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0010-Make-lsmd-display-track-groups.patch" diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index 883457b..5e50398 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -670,7 +670,6 @@ class NetMDInterface(object): group title track number list """ - # XXX: not tested raw_title = self._getDiscTitle() group_list = raw_title.split('//') track_dict = {} --------------1.6.6.1-- From plr.vincent@gmail.com Thu Feb 11 22:47:34 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1Nfgsn-0004t6-9P>; Thu, 11 Feb 2010 22:47:33 +0100 Received: from ey-out-2122.google.com ([74.125.78.25]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1Nfgsn-0001Ds-5L>; Thu, 11 Feb 2010 22:47:33 +0100 Received: by ey-out-2122.google.com with SMTP id d26so446593eyd.3 for ; Thu, 11 Feb 2010 13:47:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type:x-length :x-uid; bh=DyxGb9ammpZ/Gzbt3iwjqyHz6NA/pZHUxFfnzIs3uDU=; b=Izzmw0i8Jn0ae9/iQl6g1JeZjQEUqkUvbexuOe96Q68KLWsugD2Y3mrcVyM12LXL46 14rALoM7pX5shDe16/d5p/kGlbAOgYn0n1iW4NbudbNB1iu9SQxTiyKzVweN1zFmrJxF JKETEkVJeKoNU/sk6cJNqWCcXYS8xZLYtgBxQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-length:x-uid; b=sT1ahhNoh38i0Ptk0cyPmtamCKmrn7yRnWX6X3UqPjlLJYXEXRBhEjvKJynX1qWYWW Gk7iwftSjCqbWFli4yVPD7iZXxoKx4Ry1EmlUYMh5pD9uLRSbNhPZ1J217Nubb6UCjp3 11ECwlBa4iMO2zhA0dK/gNHM2mcnyIEjLQahg= Received: by 10.213.107.67 with SMTP id a3mr1144900ebp.5.1265924850711; Thu, 11 Feb 2010 13:47:30 -0800 (PST) Received: from x2.localnet (ALille-154-1-20-82.w86-196.abo.wanadoo.fr [86.196.11.82]) by mx.google.com with ESMTPS id 13sm1833059ewy.1.2010.02.11.13.47.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Feb 2010 13:47:30 -0800 (PST) Message-Id: <48d26d931e89c3c27df1ae9c2d82bc5436304e85.1265924723.git.plr.vincent@gmail.com> In-Reply-To: <0fe2075adf9fe998f5e64b1a5803fef2bbed5d00.1265924723.git.plr.vincent@gmail.com> References: <0fe2075adf9fe998f5e64b1a5803fef2bbed5d00.1265924723.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:13:51 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6.1" X-Length: 1956 X-UID: 72669 X-Originating-IP: 74.125.78.25 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1265924853-00000DDD-5A0BFC0B/0-0/0-0 X-Bogosity: Unsure, tests=bogofilter, spamicity=0.469121, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: xxxx X-Spam-Status: No, score=4.0 required=5.0 tests=DATE_IN_PAST_96_XX, DNS_FROM_RFC_POST,FORGED_RCVD_HELO,FU_BOGO_UNSURE,RCVD_BY_IP, SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 08/14] Put group name in return value, rather than its computed index. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2010 21:47:34 -0000 This is a multi-part message in MIME format. --------------1.6.6.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- netmd/libnetmd.py | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) --------------1.6.6.1 Content-Type: text/x-patch; name="0008-Put-group-name-in-return-value-rather-than-its-compu.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0008-Put-group-name-in-return-value-rather-than-its-compu.patch" diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index 5e50398..5a9829e 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -670,6 +670,7 @@ class NetMDInterface(object): group title track number list """ + # XXX: not tested raw_title = self._getDiscTitle() group_list = raw_title.split('//') track_dict = {} @@ -699,9 +700,6 @@ class NetMDInterface(object): track_dict[track] = group_name, group_index track_append(track) append((group_name, track_list)) - track_list = [x for x in xrange(track_count) if x not in track_dict] - if len(track_list): - append((None, track_list)) return result def getTrackTitle(self, track, wchar=False): --------------1.6.6.1-- From plr.vincent@gmail.com Thu Feb 11 22:47:41 2010 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1Nfgst-0004w4-Tj>; Thu, 11 Feb 2010 22:47:39 +0100 Received: from mail-ew0-f227.google.com ([209.85.219.227]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1Nfgst-0001Cu-QW>; Thu, 11 Feb 2010 22:47:39 +0100 Received: by mail-ew0-f227.google.com with SMTP id 27so1899505ewy.38 for ; Thu, 11 Feb 2010 13:47:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:content-type:x-length :x-uid; bh=2ujjXLcw0DAXqSePwsfTVSVaB4ANBrpghxGIdERKlN8=; b=iw+pIfBx/j8LgWHxOv+Lgmfbzd0W+toKkIzYag3Osgi4kV75q9FKG9u7Tevx/C5oA9 +f97CVeAf/XD/xhgFwZppTu4/yPYh/opMI9a3eeI3s9HXZAPeuKO4dR45rEI5NZ7ktt4 AszEirGkgXcWYPs66nvQO1BNwtQg53z2jbN5M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :content-type:x-length:x-uid; b=HpBe9fGXhaBes48a6OLQbV/ym8jjjaNpSUDLkTC2dZgnVgt5NljHfsWvySQIWu4ynK nAJCllAS1BR/NitZY09vrJyAIWHG+4jAunNfRH7GWHCKVpL/4nxnqmFbwszl+5QSra/Y oYHi9+TZgsrr2nGzb7rLaEjbA0R8fMUIz1aW0= Received: by 10.213.37.82 with SMTP id w18mr327119ebd.97.1265924856034; Thu, 11 Feb 2010 13:47:36 -0800 (PST) Received: from x2.localnet (ALille-154-1-20-82.w86-196.abo.wanadoo.fr [86.196.11.82]) by mx.google.com with ESMTPS id 13sm1833059ewy.1.2010.02.11.13.47.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Feb 2010 13:47:35 -0800 (PST) Message-Id: In-Reply-To: <0fe2075adf9fe998f5e64b1a5803fef2bbed5d00.1265924723.git.plr.vincent@gmail.com> References: <0fe2075adf9fe998f5e64b1a5803fef2bbed5d00.1265924723.git.plr.vincent@gmail.com> From: Vincent Pelletier Date: Thu, 28 Jan 2010 08:14:50 +0100 To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6.1" X-Length: 1763 X-UID: 72670 X-Originating-IP: 209.85.219.227 X-ZEDAT-Hint: A X-purgate: clean X-purgate-ID: 151147::1265924859-00000DDD-C8AA9495/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.007205, version=1.1.6 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: xx X-Spam-Status: No, score=2.5 required=5.0 tests=DATE_IN_PAST_96_XX, DNS_FROM_RFC_POST,FORGED_RCVD_HELO,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] [PATCH 09/14] Generate an extra group containing all tracks which are in no group. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2010 21:47:42 -0000 This is a multi-part message in MIME format. --------------1.6.6.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit It has None as its title to make it stand out of regular groups. --- netmd/libnetmd.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) --------------1.6.6.1 Content-Type: text/x-patch; name="0009-Generate-an-extra-group-containing-all-tracks-which-.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0009-Generate-an-extra-group-containing-all-tracks-which-.patch" diff --git a/netmd/libnetmd.py b/netmd/libnetmd.py index 5a9829e..883457b 100644 --- a/netmd/libnetmd.py +++ b/netmd/libnetmd.py @@ -700,6 +700,9 @@ class NetMDInterface(object): track_dict[track] = group_name, group_index track_append(track) append((group_name, track_list)) + track_list = [x for x in xrange(track_count) if x not in track_dict] + if len(track_list): + append((None, track_list)) return result def getTrackTitle(self, track, wchar=False): --------------1.6.6.1--