User Tools

Site Tools


portingnetmd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
portingnetmd [2012/03/06 19:54] glaubitzportingnetmd [2012/03/06 23:19] (current) – [Redesigning the transfer code for streaming] megadiscman
Line 89: Line 89:
  
 ==== Redesigning the transfer code for streaming ==== ==== Redesigning the transfer code for streaming ====
 +The netmd download code currently requires the whole data to download in memory at once as soon as the download command is submitted to the NetMD unit. This is not desireable, especially not when downloading raw uncompressed PCM data to record a ATRAC1 (SP) track. 
 +You do need to know the total number of frames and the total number of "packets" you download before starting the download, though. As PCM and ATRAC are both constant bit rates (constant frame size), knowing the number of packets is a simple task given the input file. The concept of packets is interesting mainly for DRM stuff, as each "packet" may be encrypted with a different data encrypt key, but it could make sense to re-use this concept for the transfer chunks. 
 +Implementing streaming means the interface has to be changed in one of two ways: Either, there is no single "download track" call, but a start download, send partial data, and end download call is exposed separately, or the download function gets passed a pointer to a callback function to read a packet worth of data. The callback function could return arbitrary sized packets, as long as after transferring the initially announced number of packets also the initally announced number of frames is transferred.
 ==== Supporting other formats than LP2 encoded WAV files ==== ==== Supporting other formats than LP2 encoded WAV files ====
  
-==== Integration into //qhimdtransfer ====+==== Integration into qhimdtransfer ==== 
 + 
 +Currently, all NetMD functionality can be accessed by means of the command line utility //netmdctl// only. While such a command line utility might the interface of choice for many power users, most users are used to the comfort of a graphical user interface and usually avoid the command line. We have received many support requests from users asking why their NetMD Walkman when hooked up to the computer doesn't show up in //qhimdtransfer//. Hence, there is clearly a need to integrate the NetMD functionality into the GUI. 
 + 
 +Since //qhimdtransfer// was originally designed to access //libhimd// (i.e., the library for HiMD access), some changes will have to be introduced to the Qt code of the UI app to be able to integrate with //libnetmd// which provides a different interface model as compared to //libhimd//, however there are also many similarities. For example, both //libhimd// and //libnetmd// provide a means to retrieve the tracklist which is used in //qhimdtransfer// to fill the listview containing the tracks. For //libhimd//, a Qt model class is used to abstract the contents of a HiMD, the same should be used for //libnetmd//. The model is then subsequently used to translate access to the listview of the UI to //libnetmd// (download, upload etc). 
 + 
 +Since //libnetmd// principally provides a means to select the active NetMD device in its //open// routine, //qhimdtransfer// should be equipped with a dialogue to allow the user to choose the NetMD device they want to use. We suggest an additional function (in terms of Qt, an "action") in the UI called "Connect to NetMD" and rename the existing "Connect" to "Connect to HiMD". Clicking "Connect to NetMD" will initiate //libnetmd// to iterate over the connected NetMD devices, present the user a list with the connected devices and then let them choose the device they'd like to use. After that, //qhimdtransfer// should request the tracklist from //libnetmd// and build up the model and hence the list view with the track information retrieved from //libnetmd//
 + 
 +An appropriate "Disconnect" function should be added as well which will allow disconnecting both HiMD and NetMD devices (depending on what kind of devices is currently actively connected to). 
 + 
 +Naturally, digital upload functionality should be enabled only if the NetMD hardware supports it (which is the case for the MZ-RH1 only).
  
 ==== Port the analog NetMD copy script ==== ==== Port the analog NetMD copy script ====
 +
 +The analog NetMD copy script provides a means to allow uploads for NetMD devices which do not support digital uploads. The code can be found in **netmd/dump_md.py** in the git repository. The code was written by Vincent Pelletier and he should be contacted on list regarding any questions. In principal, it will already be sufficient if the functionality has been ported to //libnetmd// and can be used through //netmdctl//.
 +
 +This task is **optional** and is recommended to be tackled after the previous tasks have been finished (order of priority). However, it's naturally up to the student what they choose to work on.
portingnetmd.1331063691.txt.gz · Last modified: 2012/03/06 19:54 by glaubitz

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki