search for: seek_func

Displaying 12 results from an estimated 12 matches for "seek_func".

2014 Feb 02
1
Trouble implementing ov_callbacks, endless loop calling seek_func
Hello list, I've been having a tough time adding windows resource support to my ogg vorbise decoder, although I think I am close. Basically when I call ov_open_callbacks(), it doesn't ever return and repeatedly calls my seek_func. I'm hoping it is something obvious, but I can't see why my seek_func is being called endlessly. If the file is seekable, I should return 0, right? If any one can take a look at the following callback functions and see if they can spot what I'm doing wrong, it'd be much appreciate...
2004 Oct 14
3
patch for non-seekable streams on Windows
...ve been trying to get oggdec to work with input streamed in through a pipe or a socket. This seems to work on Linux and OS X, but not on Windows. I've found that code in vorbisfile.c tests the input stream for seekability by invoking fseek in the following way: int offsettest=(f?callbacks.seek_func(f,0,SEEK_CUR) : -1); Unfortunately, fseek succeeds for a socket on Windows (even though it's not seekable) with the parameters specified. A more definitive test (and one that does work on Windows) is to attempt to seek to the end. I've attached a patch to vorbisfile.c that fixes my prob...
2014 Feb 02
0
unsubscribe
...person managing the list at > vorbis-owner at xiph.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Vorbis digest..." > Today's Topics: > > 1. Trouble implementing ov_callbacks, endless loop calling > seek_func (Rich E) > > From: Rich E <reakinator at gmail.com> > Subject: [Vorbis] Trouble implementing ov_callbacks, endless loop calling seek_func > Date: 2 February, 2014 1:54:15 AM PST > To: vorbis at xiph.org > > > Hello list, > > I've been having a tough time...
2004 Apr 17
1
Reading OGG embedded in a pack file
...m. // Assumes stream is positioned to start of OGG data // Not a complete function, just enought to show what I am trying to do void readFromPackfile( FILE * pStream ) { OggVorbis_File vf; ov_callbacks callbacks; vorbis_info *info; callbacks.read_func = sdl_read_func; callbacks.seek_func = sdl_seek_func; // Will setting this to NULL let me read from the middle of a stream? callbacks.tell_func = sdl_tell_func; callbacks.close_func = sdl_close_func; if ( ov_open_callbacks( pStream, &vf, NULL, 0, callbacks)==0 ) { // Valid OGG data, so do some code here...
2001 Sep 06
1
NULLs in ov_callbacks
When calling ov_open_callbacks(), is it safe to have seek_func, tell_func, and close_func all equal to NULL? If not, which ones must I provide and how can I return an error e.g., data source is not seekable? -- Ignacio Vazquez-Abrams <ignacio@openservices.net> --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://...
2004 Sep 06
1
Fixing libvorbisfile to handle largefiles
...arger than 2GB on a BSD platform where `long' is a 32-bit quantity. Now I've decided to look at this again, and see if I can patch things in a more logical way, and ask about possible problems that may be introduced. First of all, libvorbisfile. ov_callbacks contains four functions. The seek_func already uses a 64-bit type for the offset, so no change needs to be made there. However, when accessing large files, the tell_function will need to return a 64-bit type as well. This is going to change the API, isn't it? Anyway, here's the needed patch to accomplish this, based on source...
2009 Jun 04
0
ogg audio streaming problem
...se juce c++ library which uses vorbisfile.c to read and write ogg format. I updated the lengthInSamples of the ogg file to the size of ogg file. After certain chunk of data is downloaded, ogg length in samples is initialized by callbacks.read_func = &oggReadCallback; callbacks.seek_func = &oggSeekCallback; callbacks.close_func = &oggCloseCallback; callbacks.tell_func = &oggTellCallback; const int err = ov_open_callbacks (input, &ovFile, 0, 0, callbacks); lengthInSamples = (uint32) ov_pcm_total (&ovFile, -1); input is the file strea...
2001 Jan 03
1
Use of const
...fclose, (long (*)(void *)) ftell }; return ov_open_callbacks((void *)f, vf, initial, ibytes, callbacks); } int ov_open_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes, ov_callbacks callbacks) { long offset=(f?callbacks.seek_func(f,0,SEEK_CUR):-1); int ret; *initial = 0; initial is passed as const in the first call, but then passed as non-const in the call to ov_open_callbacks. Olaf van der Spek Almere, Holland Olaf@XCC.TMFWeb.NL http://xcc.tiberian.com/ --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg...
2009 Jun 04
1
ogg audio streaming problem
...se juce c++ library which uses vorbisfile.c to read and write ogg format. I updated the lengthInSamples of the ogg file to the size of ogg file. After certain chunk of data is downloaded, ogg length in samples is initialized by callbacks.read_func = &oggReadCallback; callbacks.seek_func = &oggSeekCallback; callbacks.close_func = &oggCloseCallback; callbacks.tell_func = &oggTellCallback; const int err = ov_open_callbacks (input, &ovFile, 0, 0, callbacks); lengthInSamples = (uint32) ov_pcm_total (&ovFile, -1); input is the file strea...
2000 Apr 21
3
vorbisfile updates, and a couple of questions
...-based vorbisfile. Yay! If you want to use this new functionality: look at the ov_callbacks struct in vorbisfile.h, then create appropriate functions, and continue... The functions you write should follow their stdio counterparts in terms of return values as closely as possible. Most importantly, seek_func() MUST return -1 if the stream is unseekable. In this case, tell_func() isn't going to be used, but be consistent and implement it - it might get used in the future. If you can't give a result, return -1 from this too. When I get around to it, I'll convert the winamp plugin over to us...
2006 Aug 30
2
Continued:How can I seek in Ogg Vorbis file, but not using Vorbisfile library?
Hello, All. First, I want to thank Ian Malone and Ralph Giles, thanks for your kind replies. But I still have problems about seek. As you suggested, I could use ov_open_callbacks() to supply my own read/write/seek functions. So, can you give me an example? I?m sorry for my ignorance, because I haven?t used callbacks before. I analyzed the vorbisfile.c in Tremor, and I think I
2004 May 23
4
Various Ogg Vorbis largefile notes and/or patches
Greetings one and all; I'm not subscribed to this list so I'm first sending this message to verify that mails from me make it through, and then later I'll send the juicy messages with patches. Also, the address I'm using is IPv6-only and doesn't often work, so drop me from any replies and I'll catch the archives, or drop only the hostname part to get an IPv4 address that