format_mp3.h 1.17 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
/* Icecast
 *
 * This program is distributed under the GNU General Public License, version 2.
 * A copy of this license is included with this source.
 *
 * Copyright 2000-2004, Jack Moffitt <jack@xiph.org, 
 *                      Michael Smith <msmith@xiph.org>,
 *                      oddsock <oddsock@xiph.org>,
 *                      Karl Heyes <karl@xiph.org>
 *                      and others (see AUTHORS for details).
11
 * Copyright 2014,      Philipp "ph3-der-loewe" Schafft <lion@lion.leolix.org>,
12
13
 */

Michael Smith's avatar
Michael Smith committed
14
/* format_mp3.h
15
16
17
18
 **
 ** mp3 format plugin
 **
 */
Michael Smith's avatar
Michael Smith committed
19
20
21
#ifndef __FORMAT_MP3_H__
#define __FORMAT_MP3_H__

22
23
24
25
#define MP3_METADATA_TITLE  "X_ICY_TITLE"
#define MP3_METADATA_ARTIST "X_ICY_ARTIST"
#define MP3_METADATA_URL    "X_ICY_URL"

Michael Smith's avatar
Michael Smith committed
26
typedef struct {
27
28
29
    /* These are for inline metadata */
    int inline_metadata_interval;
    int offset;
30
    int interval;
31
    char *inline_url;
Karl Heyes's avatar
Karl Heyes committed
32
33
34
    int update_metadata;

    refbuf_t *metadata;
35
    refbuf_t *read_data;
36
    int read_count;
Karl Heyes's avatar
Karl Heyes committed
37
38
39
40
41
    mutex_t url_lock;

    unsigned build_metadata_len;
    unsigned build_metadata_offset;
    char build_metadata[4081];
Michael Smith's avatar
Michael Smith committed
42
43
} mp3_state;

Karl Heyes's avatar
Karl Heyes committed
44
int format_mp3_get_plugin(struct source_tag *src);
Michael Smith's avatar
Michael Smith committed
45
46

#endif  /* __FORMAT_MP3_H__ */