/* input.h
 * - Input functions
 *
 * $Id: input.h,v 1.6 2002/08/03 08:14:54 msmith Exp $
 *
 * Copyright (c) 2001 Michael Smith <msmith@labyrinth.net.au>
 *
 * This program is distributed under the terms of the GNU General
 * Public License, version 2. You may use, modify, and redistribute
 * it under the terms of this license. A copy should be included
 * with this source.
 */

#ifndef __INPUT_H__
#define __INPUT_H__

#include <shout/shout.h>
#include <vorbis/codec.h>
#error inputmodule used
#include "inputmodule.h"

// #include "inputmodule.h"
// #include "stream.h"
// #include "reencode.h"
// #include "encode.h"
// #include "audio.h"

typedef enum _input_type {
    ICES_NO_TYPE = 0,
    ICES_INPUT_PCM,
    ICES_INPUT_VORBIS
    /* Can add others here in the future, if we want */
} input_type;

typedef enum _input_subtype {
    INPUT_PCM_LE_16,
    INPUT_PCM_BE_16
} input_subtype;



typedef struct {
    unsigned char *buf;
    long len;
    // int count;
    int critical;
    long aux_data;
    input_type type;
    input_subtype subtype;
    char **metadata;
    void (*metadata_update)(input_module_t *self, vorbis_comment *vc);
} input_buffer;


// void input_loop(void);
void free_input_buffer(input_buffer *buf);
void input_loop(void);
void input_flush_queue(runner *run);

#endif /* __INPUT_H__ */


