Displaying 18 results from an estimated 18 matches for "flac__streamdecoderreadstatus".
2012 Jul 11
1
Decoding a continues stream
...e until the stream is empty, but I will add new
data to the stream once it is empty.
*void **MyFlacCoder::**decode(char *data, int bytes)
{
mBuffer = input;
mBufferBytes = bytes;
FLAC__stream_decoder_process_until_end_of_stream(mDecoder);
}
*
My read callback looks as follows:
*
FLAC__StreamDecoderReadStatus flacReadDecode(const FLAC__StreamDecoder
*decoder, FLAC__byte buffer[], size_t *bytes, void *client)
{
MyFlacCoder *coder = (MyFlacCoder*) client;
int size =min(*bytes, coder->mBufferBytes);
if(size <= 0)
{
*bytes = 0;
return FLAC__STREAM_DECODER_READ_ST...
2004 Sep 10
2
Storing FLAC in Matroska
...you for your answers.
I using the following code to try simply decode a flac file and write the
decoded data raw PCM file. The resulting file is just noise and pops, so is
the decoded data in a different format than PCM?
struct flacData {
FILE *inputFile;
FILE *outputFile;
char *filename;
};
FLAC__StreamDecoderReadStatus flac_DecoderReadCallback(const
FLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void
*client_data)
{
flacData *ourData = (flacData *)client_data;
*bytes = fread((void *)buffer, 1, *bytes, ourData->inputFile);
return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
};
FLAC__Str...
2009 Jun 01
0
Bug in bitreader for short reads?
...multiples of 4, and that produces decoding problems.
The problem is very easy to reproduce: in the read callback, always
return 1 byte, regardless of how many bytes are asked for.
For example, in a typical read callback routine, one can do the
(simplified) following and see the problem:
static FLAC__StreamDecoderReadStatus
FlacDecoder_ReadCallback(const FLAC__StreamDecoder* flac,
FLAC__byte buffer[],
size_t* bytes,
void* client_data)
{
*bytes=1; /* <--- this was added to alwa...
2009 Jun 04
0
Bug in bitreader for short reads?
...duces decoding
> problems.The problem is very easy to reproduce:
> in the read callback, always return 1 byte, regardless of
> how many bytes are asked for.For example, in a
> typical read callback routine, one can do the (simplified)
> following and see the problem:
> static
> FLAC__StreamDecoderReadStatus FlacDecoder_ReadCallback(const
> FLAC__StreamDecoder* flac,
> FLAC__byte
>
> buffer[],
> size_t*
>
> bytes,
> void*
>
> client_data){ *...
2013 Jul 02
2
About Decode Streaming
Thank you so much for polite help Martijn.
Allison,
My read callback function is just ;
* /// \brief read callback function of decoder*
* FLAC__StreamDecoderReadStatus decoderReadCallback( const
FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void
*callback_param)*
* {*
* // mutex lock*
* m_mutex.lock();*
*
*
* // copy buffer array to m_pile_array*
* if(input_pile_size > 0) {*
* memcpy(input_pile_array, buffer, input_pile_size);*
* *bytes = i...
2009 Jun 01
0
Bug in bitreader for short reads?
...multiples of 4, and that produces decoding problems.
The problem is very easy to reproduce: in the read callback, always
return 1 byte, regardless of how many bytes are asked for.
For example, in a typical read callback routine, one can do the
(simplified) following and see the problem:
static FLAC__StreamDecoderReadStatus
FlacDecoder_ReadCallback(const FLAC__StreamDecoder* flac,
FLAC__byte buffer[],
size_t* bytes,
void* client_data)
{
*bytes=1; /* <--- this was added to alwa...
2009 Jun 04
0
Bug in bitreader for short reads?
...duces decoding
> problems.The problem is very easy to reproduce:
> in the read callback, always return 1 byte, regardless of
> how many bytes are asked for.For example, in a
> typical read callback routine, one can do the (simplified)
> following and see the problem:
> static
> FLAC__StreamDecoderReadStatus FlacDecoder_ReadCallback(const
> FLAC__StreamDecoder* flac,
> FLAC__byte
>
> buffer[],
> size_t*
>
> bytes,
> void*
>
> client_data) {...
2024 Sep 01
1
Feedback on implementation of decoding of chained streams
brianw wrote:
> On Sep 1, 2024, at 12:44 PM, Martijn van Beurden wrote:
>> Everything works, but as is with any change to the API, I don't know
>> whether it is convenient for API users other than the flac command
>> line tool. So, I'd like some feedback.
I only looked briefly, but I had a few questions.
How does FLAC__stream_decoder_get_total_samples() work for
2004 Sep 10
2
Error initializing flac stream decoder.
I've cross-compiled flac for the armv4l processor (rio receiver), and
i'm trying to start up a decode thread :
#include <FLAC/stream_decoder.h>
....
FLAC__StreamDecoder *flac = NULL;
flac = FLAC__stream_decoder_new();
if (flac == NULL) {
printf("[DECODE] Unable to initalize flac object\n");
2004 Sep 10
2
Error initializing flac stream decoder.
...ck. The flac
file I'm using is a 16/44.1 wav file i encoded(and decoded to verify it
worked).
Any thoughts? Alas, although I can generate a core file, I havn't been
able to get get gdb to recognize it. Is there any way to turn on
verbose debugging messages from flac?
Thanks,
Reza
FLAC__StreamDecoderReadStatus rio_flac_read(const FLAC__StreamDecoder
*decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data) {
r_glue *g = (r_glue*) client_data;
unsigned int bytesAvailable = rio_ringbuffer_datasize(
g->readAhead );
unsigned int bytesToCopy = 0;
char* inBu...
2024 Sep 02
1
Feedback on implementation of decoding of chained streams
...plication
- FLAC__stream_decoder_set_metadata_respond_all
- FLAC__stream_decoder_set_metadata_ignore
- FLAC__stream_decoder_set_metadata_ignore_all
That means the metadata filters can now be changed after
initialization, which wasn't possible before.
Additionally, two structs were changed. To
FLAC__StreamDecoderReadStatus,
FLAC__STREAM_DECODER_READ_STATUS_END_OF_LINK was added. To
FLAC__StreamDecoderState, FLAC__STREAM_DECODER_END_OF_LINK was added.
These two additions break the ABI compatibility.
Op zo 1 sep 2024 om 23:55 schreef Timothy B. Terriberry <tterribe at xiph.org>:
>
> brianw wrote:
> >...
2004 Sep 10
2
Storing FLAC in Matroska
Hello,
I'm looking into storing FLAC audio in Matroska and I have a few
questions.
1. Can I use libflac to extract the compressed frames?
Or will I need to write up a simple file parser?
2. What is required to decode the frames?
From the docs I understand that you need the FRAME and you may need the
METADATA_BLOCK.
Thanks,
Jory Stone
jcsston@toughguy.net
Matroska, the new,
2013 Jul 01
2
About Decode Streaming
Sorry, I am newbie.
Sample codes are from
https://github.com/oneman/libflac/tree/master/examples/cpp.
I used FLAC__stream_decoder_process_single function but it still gives
exception. Maybe I could not control read callback, you're right.
I will check it and write result in this thread.
Thanks for help.
2013/7/1 Martijn van Beurden <mvanb1 at gmail.com>
> I'll top-post this
2013 Jul 02
3
About Decode Streaming
Yes, I have tried plain wav data with file and stream functions of decoder
and encoder. They work succesfully.
You're right about FLAC can't find the first block in stream, because I
didn't add any metadata in stream. The documentation of FLAC says that
metadata callback function is optional for stream function of decoder, so I
didn't need adding metadata.
Actually, I am sure
2013 Jul 02
0
About Decode Streaming
...ode, so you may
answer easily.
This is decoder init stream function.
*FLAC__stream_decoder_init_stream(m_decoder, decoderReadCallback, NULL,
NULL, NULL, NULL, decoderWriteCallback, NULL, decoderErrorCallback,
input_pile_array);*
*
*
Then, callbacks
*
*
/// \brief read callback function of decoder
FLAC__StreamDecoderReadStatus decoderReadCallback(const FLAC__StreamDecoder
*decoder,
FLAC__byte buffer[],
size_t *bytes,
void *callback_param
);
/// \brief write callback function of decoder
FLAC__StreamDecoderWriteStatus decoderWriteCallback(const
FLAC__StreamDecoder *decoder,
const FLAC__Frame *frame,
const FLAC__int...
2013 Jul 02
2
About Decode Streaming
...tream function.
>
> *FLAC__stream_decoder_init_stream(m_decoder, decoderReadCallback, NULL,
> NULL, NULL, NULL, decoderWriteCallback, NULL, decoderErrorCallback,
> input_pile_array);*
> *
> *
> Then, callbacks
> *
> *
> /// \brief read callback function of decoder
> FLAC__StreamDecoderReadStatus decoderReadCallback(const
> FLAC__StreamDecoder *decoder,
> FLAC__byte buffer[],
> size_t *bytes,
> void *callback_param
> );
>
> /// \brief write callback function of decoder
> FLAC__StreamDecoderWriteStatus decoderWriteCallback(const
> FLAC__StreamDecoder *decoder...
2007 Jul 14
2
PATCH : Fix missing protoypes
....h"
+#include "local_string_utils.h"
/* $OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $
*
--- src/libFLAC/metadata_iterators.c 2007-07-14 08:45:49 +0000
+++ src/libFLAC/metadata_iterators.c 2007-07-15 00:48:41 +0000
@@ -1198,6 +1198,7 @@
return true;
}
+static
FLAC__StreamDecoderReadStatus chain_read_ogg_read_cb_(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
{
FLAC__Metadata_Chain *chain = (FLAC__Metadata_Chain*)client_data;
@@ -2318,6 +2319,7 @@
return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK;
}
+static
FLAC__Metadata_SimpleItera...
2004 Sep 10
0
http streaming in the xmms plugin
...n unsupported
+ return FLAC__stream_decoder_get_state ((const FLAC__StreamDecoder *) decoder) ==
+ FLAC__STREAM_DECODER_UNINITIALIZED;
+ }
+
+ static FLAC__bool http_decoder_set_url (void *decoder, const char* url)
+ {
+ (void) decoder;
+ url_ = g_strdup (url);
return true;
}
! static FLAC__StreamDecoderReadStatus http_decoder_read_callback (const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)
! {
! (void) decoder;
! (void) client_data;
! *bytes = flac_http_read (buffer, *bytes);
! return *bytes ? FLAC__STREAM_DECODER_READ_STATUS_CONTINUE : FLAC__STREAM_DECODER_REA...