Lines Matching refs:decoder
166 static FLAC__StreamDecoderWriteStatus write_callback_(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
167 static void metadata_callback_(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
168 static void error_callback_(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
178 FLAC__StreamDecoder *decoder;
185 decoder = FLAC__stream_decoder_new();
187 if(0 == decoder)
190 FLAC__stream_decoder_set_md5_checking(decoder, false);
191 FLAC__stream_decoder_set_metadata_ignore_all(decoder);
192 FLAC__stream_decoder_set_metadata_respond(decoder, type);
194 if(FLAC__stream_decoder_init_file(decoder, filename, write_callback_, metadata_callback_, error_callback_, &cd) != FLAC__STREAM_DECODER_INIT_STATUS_OK || cd.got_error) {
195 (void)FLAC__stream_decoder_finish(decoder);
196 FLAC__stream_decoder_delete(decoder);
200 if(!FLAC__stream_decoder_process_until_end_of_metadata(decoder) || cd.got_error) {
201 (void)FLAC__stream_decoder_finish(decoder);
202 FLAC__stream_decoder_delete(decoder);
208 (void)FLAC__stream_decoder_finish(decoder);
209 FLAC__stream_decoder_delete(decoder);
254 FLAC__StreamDecoderWriteStatus write_callback_(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
256 (void)decoder, (void)frame, (void)buffer, (void)client_data;
261 void metadata_callback_(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
264 (void)decoder;
276 void error_callback_(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
279 (void)decoder;
1257 static FLAC__StreamDecoderReadStatus chain_read_ogg_read_cb_(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
1260 (void)decoder;
1272 static FLAC__StreamDecoderWriteStatus chain_read_ogg_write_cb_(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
1274 (void)decoder, (void)frame, (void)buffer, (void)client_data;
1278 static void chain_read_ogg_metadata_cb_(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
1283 (void)decoder;
1301 static void chain_read_ogg_error_cb_(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
1304 (void)decoder, (void)status;
1310 FLAC__StreamDecoder *decoder;
1318 if(0 == (decoder = FLAC__stream_decoder_new())) {
1322 FLAC__stream_decoder_set_metadata_respond_all(decoder);
1323 if(FLAC__stream_decoder_init_ogg_stream(decoder, chain_read_ogg_read_cb_, /*seek_callback=*/0, /*tell_callback=*/0, /*length_callback=*/0, /*eof_callback=*/0, chain_read_ogg_write_cb_, chain_read_ogg_metadata_cb_, chain_read_ogg_error_cb_, chain) != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
1324 FLAC__stream_decoder_delete(decoder);
1331 if(!FLAC__stream_decoder_process_until_end_of_metadata(decoder))
1334 FLAC__stream_decoder_delete(decoder);
1338 FLAC__stream_decoder_delete(decoder);