From 49cf9767ab17d1c6919fe879b24c2b5596c1e53c Mon Sep 17 00:00:00 2001 From: thor Date: Sun, 23 Dec 2007 10:35:03 +0000 Subject: [PATCH] Update remote control doc and push version of interface to v3. git-svn-id: svn://scm.orgis.org/mpg123/trunk@1302 35dc7657-300d-0410-a2e5-dc2837fedb53 --- doc/README.remote | 113 ++++++++++++++++++++++++++---------------- src/control_generic.c | 2 +- 2 files changed, 71 insertions(+), 44 deletions(-) diff --git a/doc/README.remote b/doc/README.remote index 0ccb8b0e..355c7e82 100644 --- a/doc/README.remote +++ b/doc/README.remote @@ -20,7 +20,7 @@ The command respones are still sent to standard out or standard error (depending COMMAND CODES ------------- -You can get this info via the control command "help" +You can get this info via the control command "help". HELP/H: command listing (LONG/SHORT forms), command case insensitve @@ -40,10 +40,22 @@ RVA off|(mix|radio)|(album|audiophile): set rva mode EQ/E : set equalizer value for frequency band on channel +SEEK/K |<+offset>|<-offset>: jump to output sample position or change position by offset + SEQ : simple eq setting... SILENCE: be silent during playback (meaning silence in text form) +TAG/T: Print all available (ID3) tag info, for ID3v2 that gives output of all collected text fields, using the ID3v2.3/4 4-character +names. + +meaning of the @S stream info: +S +The @I lines after loading a track give some ID3 info, the format: + @I ID3:artist album year comment genretext + where artist,album and comment are exactly 30 characters each, year is 4 characters, genre text unspecified. + You will encounter "@I ID3.genre:" and "@I ID3.track:". + Then, there is an excerpt of ID3v2 info in the structure RESPONSE CODES -------------- @@ -51,74 +63,89 @@ RESPONSE CODES Note: mpg123 returns errors on stderr, so your frontend should look not only at stdout but also at stderr for responses. -@R MPG123 - Startup version message +@R MPG123 (ThOr) v3 + Startup version message. Rverything after MPG123 is auxilliary information about behaviour and command support, ID3v2 tag support is new in v3. @I ID3: - Status message after loading a song (ID3 song info) - a = title (exactly 30 chars) - b = artist (exactly 30 chars) - c = album (exactly 30 chars) - d = year (exactly 4 chars) - e = comment (exactly 30 chars) - f = genre (string) + Status message after loading a song (ID3 song info) + a = title (exactly 30 chars) + b = artist (exactly 30 chars) + c = album (exactly 30 chars) + d = year (exactly 4 chars) + e = comment (exactly 30 chars) + f = genre (string) + +@I ID3.genre: +@I ID3.track: + Optional lines with additional ID3v1 info (if present): Genre ID and track number in set. + +@I ID3v2.title: + After loading a track with ID3v2 info, such lines occur for every line of the "title" data field and likewise for other fields (author, album, etc). @I Status message after loading a song (no ID3 song info) a = filename without path and extension @S ... - Stream info at beginning of playback, meaning - S + Stream info at beginning of playback, meaning + S @S - Status message after loading a song (stream info) - a = mpeg type (string) - b = layer (int) - c = sampling frequency (int) - d = mode (string) - e = mode extension (int) - f = framesize (int) - g = stereo (int) - h = copyright (int) - i = error protection (int) - j = emphasis (int) - k = bitrate (int) - l = extension (int) + Status message after loading a song (stream info) + a = mpeg type (string) + b = layer (int) + c = sampling frequency (int) + d = mode (string) + e = mode extension (int) + f = framesize (int) + g = stereo (int) + h = copyright (int) + i = error protection (int) + j = emphasis (int) + k = bitrate (int) + l = extension (int) @F - Status message during playing (frame info) - a = framecount (int) - b = frames left this song (int) - c = seconds (float) - d = seconds left (float) + Status message during playing (frame info) + a = framecount (int) + b = frames left this song (int) + c = seconds (float) + d = seconds left (float) @P - Playing status - a = 0: playing stopped - a = 1: playing paused - a = 2: playing unpaused + Playing status + a = 0: playing stopped + a = 1: playing paused + a = 2: playing unpaused @E - An error occured - Errors may be also reported by mpg123 through - stderr (without @E) - a = error message (string) + An error occured + Errors may be also reported by mpg123 through + stderr (without @E) + a = error message (string) @J - Jumped to frame n. + Jumped to frame n. @RVA - Switched to specified RVA mode. + Switched to specified RVA mode. @V % - Set volume to specified value (float, percent). + Set volume to specified value (float, percent). @ : : - Set equalizer value z for band y of channel x. + Set equalizer value z for band y of channel x. @bass: mid: treble: - Set simple equalizer control for bass, mid, treble. + Set simple equalizer control for bass, mid, treble. + +@T + The output is multiple lines, begin marked by "@T {", end by "@T }". + ID3v1 data is like in the @I info lines, just with "@T" in front. + An ID3v2 data field is introduced via ([ ... ] means optional): + @T ID3v2.[ [lang()] desc()]: + The lines of data follow with "=" prefixed: + @T = Info about the equalizer control: diff --git a/src/control_generic.c b/src/control_generic.c index 588bd54a..496f021a 100644 --- a/src/control_generic.c +++ b/src/control_generic.c @@ -261,7 +261,7 @@ int control_generic (mpg123_handle *fr) #endif /* the command behaviour is different, so is the ID */ /* now also with version for command availability */ - fprintf(outstream, "@R MPG123 (ThOr) v2\n"); + fprintf(outstream, "@R MPG123 (ThOr) v3\n"); #ifdef FIFO if(param.fifo) {