[Musicpd-dev-team] outputs and mpd protocol spec

2013-11-20 Thread Javier Domingo
Hi,

I am looking at the current mpd protocol spec, and it is quite vague in
several aspects, which makes difficult to know what is the intended answer
of a query, etc.

One of this examples, is the audio output management. The protocol spec
just tells us that Shows information about all outputs., which doesn't
give any clue to someone trying to implement the protocol.

And if we look at the current mpd implementation, the mpd server, we get
the following flow:

 $ telnet localhost 6600
 Trying ::1...
 Connected to localhost.
 Escape character is '^]'.
 OK MPD 0.16.0
 outputs
 outputid: 0
 outputname: My ALSA Device
 outputenabled: 1
 OK
 disableoutput 0
 OK
 outputs
 outputid: 0
 outputname: My ALSA Device
 outputenabled: 0
 OK


Which reading the protocol leads you to think that outputenabled: 0 means
muted and 1 means unmuted (this is, enabled). In mpc says Output 1 (My
ALSA Device) is disabled so, alright till here.

But if you go to gmpc, you see that it interprets ouputenabled the opposite
way, and so do many other of the programs listed in the recommended third
party programs.

Would it be possible to write more concisely what each command is meant to
do and what the output is supposed to be? Or is there any way I can propose
changes to this specs?

Thanks for your attention,

Cheers,

Javier Domingo Cansino
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk___
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team


Re: [Musicpd-dev-team] What if I want to use stickers?

2013-08-28 Thread Javier Domingo Cansino
  Do you think you can provide a list of the stickers used in StoMpd, or
  the way it is used to see if we can update a document with this?
 
 With pleasure. I'll get back to you.

Has been any new on this? I would like to have such list!


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk
___
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team


Re: [Musicpd-dev-team] Support for Musicbrainz ratings

2013-08-16 Thread Javier Domingo
musicbrainz is for gathering metadata. Ratings are totally personal.
Javier Domingo Cansino
Research  Development Junior Engineer
Fon Labs Workgroup, Getxo - Spain.


On Fri, Aug 16, 2013 at 8:45 AM, Grant emailgr...@gmail.com wrote:
 You can always extend the mpd protocol through stickers, adding there
 the rating to the meta. But that would be your own implementation. I
 don't know about any way of obtaining it but through hacks.

 Thank you.  I suppose I can just refer to musicbrainz.org whenever I
 want the info.

 - Grant


 Do any mpd clients support Musicbrainz ratings in any capacity?  If
 not, does anyone have a suggestion for keeping track of which tracks I
 like?  I just switched from gmpc to cantata but I'd like to find a
 method that works across clients.

 - Grant

 Is there no method for this sort of thing?

 - Grant

--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
___
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team


[Musicpd-dev-team] MPD Plugins

2013-07-03 Thread Javier Domingo
Hi!

First of all, I may say that everything I will mention here is from
reading the code. The only docs I have found on this are:

1. http://www.musicpd.org/doc/developer/ Which gives coding guidelines
2. http://www.musicpd.org/doc/api/html/ Which just documents a part of
the code, nothing directly regarding the plugins
3. http://www.musicpd.org/doc/user/ch05.html Which is much more
complete (for the user).

Having the docs into account, the code I read, and a conversation I
had with cirrus (irc) yesterday, I want to ask, first of all, if there
is any other docs I have missed.

Then, what regards the mpd plugins. Some definitions I have learnt, if
you can confirm or correct them, I would much appreciate it:

- Archive plugin: It is in charge of getting input streams from
compressed blocks
- Database plugin: Is in charge of saving and gathering the Library,
made up of: song meta, song uri, playlists and directories. It is also
used for searching in the Database
- Filter plugin: It is to transform PCM data
- Input plugin: It converts from URIs to real PCM data
- Mixer plugin: It controls the output volume
- Output plugin: It controls the output device and the data it is passed to it
- Playlist plugin: It converts from playlist uri to internal mpd
playlist format, and is able to use that format to gather songs

I haven't understood much about the DatabasePlugin.

What is to Visit()? I thought it was to search, but I was told Visit()
would only sometimes be equivalent. I have tried reading the code but
is not too clear to me.

 /**
 * Visit the selected entities.
 */
 virtual bool Visit(const DatabaseSelection selection,
   VisitDirectory visit_directory,
   VisitSong visit_song,
   VisitPlaylist visit_playlist,
   GError **error_r) const = 0;

The definition of Visit() is this (the others are calling this). The
DatabaseSelection is defined like this:

 struct DatabaseSelection {
  const char *uri;
  bool recursive;
  const SongFilter *filter;

  DatabaseSelection(const char *_uri, bool _recursive,
const SongFilter *_filter=nullptr)
   :uri(_uri), recursive(_recursive), filter(_filter) {
   assert(uri != NULL);
  }

 gcc_pure
 bool Match(const song song) const;
 };

So If I want to search in that DatabasePlugin, I may create a
SongFilter, with it, create a DatabaseSelection struct, and then I
still have to fill up the Visit* args.

Those Visit* arguments are defined as:

 typedef std::functionbool(const Directory , GError **) VisitDirectory;
 typedef std::functionbool(struct song , GError **) VisitSong;
 typedef std::functionbool(const PlaylistInfo , const Directory ,
   GError **) VisitPlaylist;

 typedef std::functionbool(const char *, GError **) VisitString;

Which for me mean:
- VisitDirectory: A directory to search on
- VisitSong: I don't understand this arg, because DatabasSelection
already has what to search for
- VisitPlaylist: I don't understand this
- VisitString: Neither understand

I promise I have tried hard trying to understand mpd's internals, but
got stuck here. Really stuck.

Any clarifications you make I would much appreciate them,

Cheers,

Javier Domingo Cansino
Research  Development Junior Engineer
Fon Labs Workgroup, Getxo - Spain.

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team