2004-02-24 00:41:20 +01:00
|
|
|
/* the Music Player Daemon (MPD)
|
2007-04-05 05:22:33 +02:00
|
|
|
* Copyright (C) 2003-2007 by Warren Dukes (warren.dukes@gmail.com)
|
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"
|
2007-12-28 03:56:25 +01:00
|
|
|
#include "path.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
|
|
|
|
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;
|
2006-07-20 18:02:40 +02:00
|
|
|
AudioFormat audioFormat;
|
2007-12-28 03:56:25 +01:00
|
|
|
char utf8url[MPD_PATH_MAX];
|
2006-07-20 18:02:40 +02:00
|
|
|
volatile float totalTime;
|
2004-02-24 00:41:20 +01:00
|
|
|
} DecoderControl;
|
|
|
|
|
2006-07-20 18:02:40 +02:00
|
|
|
void decodeSigHandler(int sig, siginfo_t * siginfo, void *v);
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2006-08-20 02:50:44 +02:00
|
|
|
void decode(void);
|
2004-02-24 00:41:20 +01:00
|
|
|
|
|
|
|
#endif
|