2004-02-24 00:41:20 +01:00
|
|
|
/* the Music Player Daemon (MPD)
|
2006-07-13 21:20:34 +02:00
|
|
|
* (c)2003-2006 by Warren Dukes (shank@mercury.chem.pitt.edu)
|
2004-02-24 00:41:20 +01:00
|
|
|
* This project's homepage is: http://www.musicpd.org
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DECODE_H
|
|
|
|
#define DECODE_H
|
|
|
|
|
2004-03-18 04:29:25 +01:00
|
|
|
#include "../config.h"
|
2004-06-01 13:18:25 +02:00
|
|
|
#include "tag.h"
|
2004-03-18 04:29:25 +01:00
|
|
|
|
2004-03-22 03:44:22 +01:00
|
|
|
#include "mpd_types.h"
|
2004-05-10 14:35:18 +02:00
|
|
|
#include "audio.h"
|
2004-03-22 03:44:22 +01:00
|
|
|
|
2004-02-24 00:41:20 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <sys/param.h>
|
2005-03-08 01:17:33 +01:00
|
|
|
#include <signal.h>
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2004-05-18 15:13:55 +02:00
|
|
|
#define DECODE_TYPE_FILE 0
|
|
|
|
#define DECODE_TYPE_URL 1
|
2004-02-24 00:41:20 +01:00
|
|
|
|
|
|
|
#define DECODE_STATE_STOP 0
|
2004-05-19 04:14:20 +02:00
|
|
|
#define DECODE_STATE_START 1
|
|
|
|
#define DECODE_STATE_DECODE 2
|
2004-02-24 00:41:20 +01:00
|
|
|
|
|
|
|
#define DECODE_ERROR_NOERROR 0
|
2004-05-18 15:19:30 +02:00
|
|
|
#define DECODE_ERROR_UNKTYPE 10
|
|
|
|
#define DECODE_ERROR_FILE 20
|
2004-05-18 15:13:55 +02:00
|
|
|
|
|
|
|
#define DECODE_SUFFIX_MP3 1
|
|
|
|
#define DECODE_SUFFIX_OGG 2
|
|
|
|
#define DECODE_SUFFIX_FLAC 3
|
|
|
|
#define DECODE_SUFFIX_AAC 4
|
|
|
|
#define DECODE_SUFFIX_MP4 5
|
|
|
|
#define DECODE_SUFFIX_WAVE 6
|
2004-02-24 00:41:20 +01:00
|
|
|
|
|
|
|
typedef struct _DecoderControl {
|
2004-04-15 07:07:04 +02:00
|
|
|
volatile mpd_sint8 state;
|
|
|
|
volatile mpd_sint8 stop;
|
|
|
|
volatile mpd_sint8 start;
|
|
|
|
volatile mpd_uint16 error;
|
|
|
|
volatile mpd_sint8 seek;
|
2004-05-30 15:33:13 +02:00
|
|
|
volatile mpd_sint8 seekError;
|
|
|
|
volatile mpd_sint8 seekable;
|
2004-04-15 07:07:04 +02:00
|
|
|
volatile mpd_sint8 cycleLogFiles;
|
2004-05-10 14:35:18 +02:00
|
|
|
volatile double seekWhere;
|
|
|
|
AudioFormat audioFormat;
|
2004-05-31 13:42:46 +02:00
|
|
|
char utf8url[MAXPATHLEN+1];
|
2004-05-10 14:35:18 +02:00
|
|
|
volatile float totalTime;
|
2004-02-24 00:41:20 +01:00
|
|
|
} DecoderControl;
|
|
|
|
|
2005-03-08 01:17:33 +01:00
|
|
|
void decodeSigHandler(int sig, siginfo_t * siginfo, void * v);
|
2004-02-24 00:41:20 +01:00
|
|
|
|
|
|
|
void decode();
|
|
|
|
|
|
|
|
#endif
|