source: roaraudio/roard/include/codecfilter_flac.h @ 5823:f9f70dbaa376

Last change on this file since 5823:f9f70dbaa376 was 5823:f9f70dbaa376, checked in by phi, 11 years ago

updated copyright

File size: 2.3 KB
Line 
1//codecfilter_flac.h:
2
3/*
4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2013
5 *
6 *  This file is part of roard a part of RoarAudio,
7 *  a cross-platform sound system for both, home and professional use.
8 *  See README for details.
9 *
10 *  This file is free software; you can redistribute it and/or modify
11 *  it under the terms of the GNU General Public License version 3
12 *  as published by the Free Software Foundation.
13 *
14 *  RoarAudio is distributed in the hope that it will be useful,
15 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *  GNU General Public License for more details.
18 *
19 *  You should have received a copy of the GNU General Public License
20 *  along with this software; see the file COPYING.  If not, write to
21 *  the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 *  Boston, MA 02110-1301, USA.
23 *
24 */
25
26#ifndef _CODECFILTER_FLAC_H_
27#define _CODECFILTER_FLAC_H_
28
29#include <roaraudio.h>
30
31#if defined(ROAR_HAVE_LIBFLAC)
32
33#include <FLAC/all.h>
34
35struct codecfilter_flac_inst {
36 struct roar_stream_server * ss;
37 struct {
38  FLAC__StreamDecoder * decoder;
39  struct roar_buffer * written;
40  ssize_t readret;
41  size_t readc;
42 } decoder;
43};
44
45FLAC__StreamDecoderReadStatus cf_flac_cb_read(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data);
46FLAC__StreamDecoderWriteStatus cf_flac_cb_write(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
47void cf_flac_cb_metadata(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
48void cf_flac_cb_error(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
49
50int cf_flac_open(CODECFILTER_USERDATA_T * inst, int codec,
51                                            struct roar_stream_server * info,
52                                            struct roar_codecfilter   * filter);
53
54int cf_flac_close(CODECFILTER_USERDATA_T   inst);
55
56int cf_flac_write(CODECFILTER_USERDATA_T   inst, char * buf, int len);
57int cf_flac_read(CODECFILTER_USERDATA_T   inst, char * buf, int len);
58
59int cf_flac_ctl(CODECFILTER_USERDATA_T   inst, int cmd, void * data);
60
61#endif
62
63#endif
64
65//ll
Note: See TracBrowser for help on using the repository browser.