forked from carlosanunes/deadbeef-osx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
junklib.h
131 lines (90 loc) · 3.45 KB
/
junklib.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/* junklib -- library for reading tags from various audio files for deadbeef player
http://deadbeef.sourceforge.net
Copyright (C) 2009-2013 Alexey Yakovenko
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Alexey Yakovenko [email protected]
*/
#ifndef __JUNKLIB_H
#define __JUNKLIB_H
#include <stdio.h>
#include "deadbeef.h"
struct playItem_s;
int
junk_id3v1_read (struct playItem_s *it, DB_FILE *fp);
int
junk_id3v1_find (DB_FILE *fp);
int
junk_id3v1_write (FILE *fp, struct playItem_s *it, const char *enc);
int
junk_id3v2_find (DB_FILE *fp, int *psize);
int
junk_id3v2_read_full (struct playItem_s *it, DB_id3v2_tag_t *tag, DB_FILE *fp);
int
junk_id3v2_convert_24_to_23 (DB_id3v2_tag_t *tag24, DB_id3v2_tag_t *tag23);
int
junk_id3v2_convert_23_to_24 (DB_id3v2_tag_t *tag23, DB_id3v2_tag_t *tag24);
int
junk_id3v2_convert_22_to_24 (DB_id3v2_tag_t *tag22, DB_id3v2_tag_t *tag24);
int
junk_id3v2_convert_apev2_to_24 (DB_apev2_tag_t *ape, DB_id3v2_tag_t *tag24);
DB_id3v2_frame_t *
junk_id3v2_add_text_frame (DB_id3v2_tag_t *tag, const char *frame_id, const char *value);
int
junk_id3v2_remove_frames (DB_id3v2_tag_t *tag, const char *frame_id);
int
junk_id3v2_write (FILE *file, DB_id3v2_tag_t *tag);
void
junk_id3v2_free (DB_id3v2_tag_t *tag);
int
junk_id3v2_read (struct playItem_s *it, DB_FILE *fp);
int
junk_apev2_read_full (struct playItem_s *it, DB_apev2_tag_t *tag_store, DB_FILE *fp);
int
junk_apev2_read_full_mem (struct playItem_s *it, DB_apev2_tag_t *tag_store, char *mem, int memsize);
int
junk_apev2_read (struct playItem_s *it, DB_FILE *fp);
int
junk_apev2_read_mem (struct playItem_s *it, char *mem, int size);
int
junk_apev2_find (DB_FILE *fp, int32_t *psize, uint32_t *pflags, uint32_t *pnumitems);
DB_apev2_frame_t *
junk_apev2_add_text_frame (DB_apev2_tag_t *tag, const char *frame_id, const char *value);
int
junk_apev2_remove_frames (DB_apev2_tag_t *tag, const char *frame_id);
void
junk_apev2_free (DB_apev2_tag_t *tag);
int
junk_apev2_write (FILE *fp, DB_apev2_tag_t *tag, int write_header, int write_footer);
int
junk_get_leading_size_stdio (FILE *fp);
int
junk_get_leading_size (DB_FILE *fp);
const char *
junk_detect_charset (const char *s);
int
junk_iconv (const char *in, int inlen, char *out, int outlen, const char *cs_in, const char *cs_out);
int
junk_recode (const char *in, int inlen, char *out, int outlen, const char *cs);
int
junk_rewrite_tags (struct playItem_s *it, uint32_t junk_flags, int id3v2_version, const char *id3v1_encoding);
void
junk_enable_cp1251_detection (int enable);
void
junk_configchanged (void);
void
junk_enable_cp936_detection (int enable);
const char *
junk_detect_charset_len (const char *s, int len);
#endif // __JUNKLIB_H