• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/flac-1.2.1/examples/c/decode/file/

Lines Matching refs:decoder

1 /* example_c_decode_file - Simple FLAC file decoder using libFLAC
35 static FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
36 static void metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
37 static void error_callback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
70 FLAC__StreamDecoder *decoder = 0;
84 if((decoder = FLAC__stream_decoder_new()) == NULL) {
85 fprintf(stderr, "ERROR: allocating decoder\n");
90 (void)FLAC__stream_decoder_set_md5_checking(decoder, true);
92 init_status = FLAC__stream_decoder_init_file(decoder, argv[1], write_callback, metadata_callback, error_callback, /*client_data=*/fout);
94 fprintf(stderr, "ERROR: initializing decoder: %s\n", FLAC__StreamDecoderInitStatusString[init_status]);
99 ok = FLAC__stream_decoder_process_until_end_of_stream(decoder);
101 fprintf(stderr, " state: %s\n", FLAC__StreamDecoderStateString[FLAC__stream_decoder_get_state(decoder)]);
104 FLAC__stream_decoder_delete(decoder);
110 FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
116 (void)decoder;
162 void metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
164 (void)decoder, (void)client_data;
185 void error_callback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
187 (void)decoder, (void)client_data;