diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-17 00:01:32 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 21:20:13 +0000 |
commit | 8cb555460ff79e636a7907fb2589e16db98c8600 (patch) | |
tree | 930a3878c7641c9ce045b24f0ade1309e36d5806 /lib/rbcodec/metadata/metadata.h | |
parent | 0c4f89370d05056faa789aa9cabcccc4e509fb9f (diff) | |
download | rockbox-8cb555460ff79e636a7907fb2589e16db98c8600.tar.gz rockbox-8cb555460ff79e636a7907fb2589e16db98c8600.zip |
[3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.
Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
Diffstat (limited to 'lib/rbcodec/metadata/metadata.h')
-rw-r--r-- | lib/rbcodec/metadata/metadata.h | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/rbcodec/metadata/metadata.h b/lib/rbcodec/metadata/metadata.h index a7ebcf16e5..5c78eae9d4 100644 --- a/lib/rbcodec/metadata/metadata.h +++ b/lib/rbcodec/metadata/metadata.h | |||
@@ -37,7 +37,6 @@ enum | |||
37 | AFMT_MPA_L2, /* MPEG Audio layer 2 */ | 37 | AFMT_MPA_L2, /* MPEG Audio layer 2 */ |
38 | AFMT_MPA_L3, /* MPEG Audio layer 3 */ | 38 | AFMT_MPA_L3, /* MPEG Audio layer 3 */ |
39 | 39 | ||
40 | #if CONFIG_CODEC == SWCODEC | ||
41 | AFMT_AIFF, /* Audio Interchange File Format */ | 40 | AFMT_AIFF, /* Audio Interchange File Format */ |
42 | AFMT_PCM_WAV, /* Uncompressed PCM in a WAV file */ | 41 | AFMT_PCM_WAV, /* Uncompressed PCM in a WAV file */ |
43 | AFMT_OGG_VORBIS, /* Ogg Vorbis */ | 42 | AFMT_OGG_VORBIS, /* Ogg Vorbis */ |
@@ -91,7 +90,6 @@ enum | |||
91 | AFMT_KSS, /* KSS (MSX computer KSS Music File) */ | 90 | AFMT_KSS, /* KSS (MSX computer KSS Music File) */ |
92 | AFMT_OPUS, /* Opus (see http://www.opus-codec.org ) */ | 91 | AFMT_OPUS, /* Opus (see http://www.opus-codec.org ) */ |
93 | AFMT_AAC_BSF, | 92 | AFMT_AAC_BSF, |
94 | #endif | ||
95 | 93 | ||
96 | /* add new formats at any index above this line to have a sensible order - | 94 | /* add new formats at any index above this line to have a sensible order - |
97 | specified array index inits are used */ | 95 | specified array index inits are used */ |
@@ -99,7 +97,7 @@ enum | |||
99 | 97 | ||
100 | AFMT_NUM_CODECS, | 98 | AFMT_NUM_CODECS, |
101 | 99 | ||
102 | #if CONFIG_CODEC == SWCODEC && defined(HAVE_RECORDING) | 100 | #if defined(HAVE_RECORDING) |
103 | /* masks to decompose parts */ | 101 | /* masks to decompose parts */ |
104 | CODEC_AFMT_MASK = 0x0fff, | 102 | CODEC_AFMT_MASK = 0x0fff, |
105 | CODEC_TYPE_MASK = 0x7000, | 103 | CODEC_TYPE_MASK = 0x7000, |
@@ -107,10 +105,9 @@ enum | |||
107 | /* switch for specifying codec type when requesting a filename */ | 105 | /* switch for specifying codec type when requesting a filename */ |
108 | CODEC_TYPE_DECODER = (0 << 12), /* default */ | 106 | CODEC_TYPE_DECODER = (0 << 12), /* default */ |
109 | CODEC_TYPE_ENCODER = (1 << 12), | 107 | CODEC_TYPE_ENCODER = (1 << 12), |
110 | #endif /* CONFIG_CODEC == SWCODEC && defined(HAVE_RECORDING) */ | 108 | #endif /* defined(HAVE_RECORDING) */ |
111 | }; | 109 | }; |
112 | 110 | ||
113 | #if CONFIG_CODEC == SWCODEC | ||
114 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) | 111 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) |
115 | #define CODEC_EXTENSION "so" | 112 | #define CODEC_EXTENSION "so" |
116 | #define CODEC_PREFIX "lib" | 113 | #define CODEC_PREFIX "lib" |
@@ -157,24 +154,16 @@ extern const int rec_format_afmt[REC_NUM_FORMATS]; | |||
157 | { label, root_fname, func, ext_list } | 154 | { label, root_fname, func, ext_list } |
158 | #endif /* HAVE_RECORDING */ | 155 | #endif /* HAVE_RECORDING */ |
159 | 156 | ||
160 | #else /* !SWCODEC */ | ||
161 | |||
162 | #define AFMT_ENTRY(label, root_fname, enc_root_fname, func, ext_list) \ | ||
163 | { label, func, ext_list } | ||
164 | #endif /* CONFIG_CODEC == SWCODEC */ | ||
165 | |||
166 | /** Database of audio formats **/ | 157 | /** Database of audio formats **/ |
167 | /* record describing the audio format */ | 158 | /* record describing the audio format */ |
168 | struct mp3entry; | 159 | struct mp3entry; |
169 | struct afmt_entry | 160 | struct afmt_entry |
170 | { | 161 | { |
171 | const char *label; /* format label */ | 162 | const char *label; /* format label */ |
172 | #if CONFIG_CODEC == SWCODEC | ||
173 | const char *codec_root_fn; /* root codec filename (sans _enc and .codec) */ | 163 | const char *codec_root_fn; /* root codec filename (sans _enc and .codec) */ |
174 | #ifdef HAVE_RECORDING | 164 | #ifdef HAVE_RECORDING |
175 | const char *codec_enc_root_fn; /* filename of encoder codec */ | 165 | const char *codec_enc_root_fn; /* filename of encoder codec */ |
176 | #endif | 166 | #endif |
177 | #endif | ||
178 | bool (*parse_func)(int fd, struct mp3entry *id3); /* return true on success */ | 167 | bool (*parse_func)(int fd, struct mp3entry *id3); /* return true on success */ |
179 | const char *ext_list; /* NULL terminated extension | 168 | const char *ext_list; /* NULL terminated extension |
180 | list for type with the first as | 169 | list for type with the first as |
@@ -305,14 +294,12 @@ struct mp3entry { | |||
305 | #endif | 294 | #endif |
306 | 295 | ||
307 | /* replaygain support */ | 296 | /* replaygain support */ |
308 | #if CONFIG_CODEC == SWCODEC | ||
309 | long track_level; /* holds the level in dB * (1<<FP_BITS) */ | 297 | long track_level; /* holds the level in dB * (1<<FP_BITS) */ |
310 | long album_level; | 298 | long album_level; |
311 | long track_gain; /* s19.12 signed fixed point. 0 for no gain. */ | 299 | long track_gain; /* s19.12 signed fixed point. 0 for no gain. */ |
312 | long album_gain; | 300 | long album_gain; |
313 | long track_peak; /* s19.12 signed fixed point. 0 for no peak. */ | 301 | long track_peak; /* s19.12 signed fixed point. 0 for no peak. */ |
314 | long album_peak; | 302 | long album_peak; |
315 | #endif | ||
316 | 303 | ||
317 | #ifdef HAVE_ALBUMART | 304 | #ifdef HAVE_ALBUMART |
318 | bool has_embedded_albumart; | 305 | bool has_embedded_albumart; |
@@ -335,13 +322,11 @@ void adjust_mp3entry(struct mp3entry *entry, void *dest, const void *orig); | |||
335 | void copy_mp3entry(struct mp3entry *dest, const struct mp3entry *orig); | 322 | void copy_mp3entry(struct mp3entry *dest, const struct mp3entry *orig); |
336 | void wipe_mp3entry(struct mp3entry *id3); | 323 | void wipe_mp3entry(struct mp3entry *id3); |
337 | 324 | ||
338 | #if CONFIG_CODEC == SWCODEC | ||
339 | void fill_metadata_from_path(struct mp3entry *id3, const char *trackname); | 325 | void fill_metadata_from_path(struct mp3entry *id3, const char *trackname); |
340 | int get_audio_base_codec_type(int type); | 326 | int get_audio_base_codec_type(int type); |
341 | void strip_tags(int handle_id); | 327 | void strip_tags(int handle_id); |
342 | bool rbcodec_format_is_atomic(int afmt); | 328 | bool rbcodec_format_is_atomic(int afmt); |
343 | bool format_buffers_with_offset(int afmt); | 329 | bool format_buffers_with_offset(int afmt); |
344 | #endif | ||
345 | 330 | ||
346 | #endif | 331 | #endif |
347 | 332 | ||