search for: ov_open_callbacks

Displaying 20 results from an estimated 53 matches for "ov_open_callbacks".

2006 Sep 14
2
ov_open_callbacks() performance & memory requirements
Hi guys, I'm writing a sample playback engine using vorbisfile, but I've hit a performance problem - hoping someone here can help! I'm using ov_open_callbacks() to decode memory-based ogg files. It works OK, but when I call ov_open_callbacks() approximately 300k of memory is used (presumably to initialise the decoder). It also takes some time to execute ov_open_callbacks() - the read & seek functions are being called a huge number of times, even for...
2012 Dec 05
7
ov_open_callbacks takes so much time to open 210 MB OGG file
Why ov_open_callbacks(fd_, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) takes so long to open OGG file? The OGG file has just 210 MB. It takes a lot of time open the file. I am working on OGG audio recorder and player. Thanks in advance! With kind regards, Pavel
2002 Mar 04
1
ov_open_callbacks
Hi` Is there some example code on how to use ov_open_callbacks with VorbisFile? The documentation I found is _very_ sparse and if possible I don't want to spend much time adding streaming from memory to my code. http://www.xiph.org/ogg/vorbis/doc/vorbisfile/ov_callbacks.html <p>Thanks, -- Daniel, Epic Games Inc. <p>--- >8 ---- List archi...
2010 Jan 06
1
Initializing vorbis using ov_open_callbacks fail with OV_ENOTVORBIS. But why?
...h same serial number are handled equivalently: stored in ogg_stream_state using ogg_stream_packetin to add them to ogg_stream_state and using ogg_stream_pageout to get ogg encapsulated vorbis pages. ..I hope up to this point no logical error.. next step: the idea was now to init vorbis using ov_open_callbacks, but this function failed with OV_ENOTVORBIS, when reading the first portion of data (callback function reads new data) 1.do you know what could cause the error? 2.does vorbis need a minimal ammout of data to initialize? 3.do I forgot to initialize some comment struct in advance? thanks for any...
2001 Sep 25
2
Couple more problems (ov_open_callbacks)
...at; I've verified my audio playback code by using a generated sine wave (sounds correct). So that leads to a problem with how I'm using ov_read(). I've modeled my code around the sample code, and I check my error returns fairly religiously. The only weird thing I'm doing is using ov_open_callbacks(). My callback routines simply read data out of an in-memory bit bucket, so there's not much code there, e.g. my read function is basically: memcpy(pDst, myStreamPtr, bytes ); myStreamPtr += bytes; ..etc. etc. I didn't bother implementing a close function (I just stubbed it out). Looki...
2003 Mar 02
1
ov_pcm_total() returns always 0 after ov_open_callbacks()...
...of the callback funktions. I also like to mention that ov_info (which uses the read and seek callback funktions) delivers correct values. Thats why i doubt that there's an error in (the rather simple) callback funktions... Is it valid to call ov_pcm_total() on an ogg file that was opened with ov_open_callbacks()? If it is not: How can i calculate the size of the audiobuffer? I have realy no idea what i've done wrong, so please let me know if you have any ideas. Thank's in advance, Mike <p>... by the way, how can i find out with which version of the librarys i am working with? <p>--...
2004 Sep 07
3
Introducing ov_open_callbacksp and ov_clearp
...bad design because you'll get stuck with that: each time an internal modification will occur, outer code may have to be fixed or re-compiled). I propose to add that to vorbisfile.h: /* same as ov_clear but frees memory associated to vf too */ IMPORT_C int ov_clearp(OggVorbis_File *vf); /* same ov_open_callbacks but also allocates the OggVorbis_File object into *vf, if any error happen, returns same code as ov_open_callbacks and free any memory allocated */ IMPORT_C int ov_open_callbacksp(void *datasource, OggVorbis_File **vf, char *initial, long ibytes, ov_callbacks callbacks); IMPORT_C int ov_info_basi...
2001 Jan 03
1
Use of const
...al,long ibytes){ ov_callbacks callbacks = { (size_t (*)(void *, size_t, size_t, void *)) fread, (int (*)(void *, ogg_int64_t, int)) _fseek64_wrap, (int (*)(void *)) 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 a...
2005 Jun 30
2
Reading from memory and ov_open
Hi, I've been working with oggvorbis-win32sdk-1.0.1 and have a semi-hypothetical question. Let's suppose that, for whatever reason, I've allocated a block of memory, and I've loaded into this memory a perfectly valid ogg vorbis file. Now I'd like to decode this vorbis data, but I'm stuck calling ov_open() because I don't have a FILE*, I have a block of memory. (This
2003 Jun 23
3
Cannot get ogm infos
Help is needed ! I cannot extract infos from video stream in an .ogm file using the VorbisFile library. It seems that I can only open .ogg files (audio)! When I call "ov_open_callbacks" it generates a message error. Here is my procedure in pascal: code: _____ procedure GetOGMInfo; var F : TFileStream; vf: OggVorbis_File; res: integer; begin F := TFileStream.Create("OGM FileName", fmOpenRead); res := ov_open_callbacks(F, vf, nil, 0, ops_callbacks);...
2004 Apr 12
3
Decoding with 8 bit-samples
Hi! I'd like to make a stereo 8-bit wav file from a stereo (16 bit) ogg vorbis file (in delphi, with the vorbisfile). I use: ret := ov_open_callbacks(filein,vf,nil,0,ops_callbacks); if ret = 0 Then begin fileOut := TFileStream.Create(savedlg.FileName,fmCreate); repeat ret := ov_read(VF, pcmout, BufferSize, 0, 1, 1, nil); //'cause of the 8-bit fileOut.Write(pcmout,ret); until ret = 0; end; The...
2012 May 27
1
Thread Problem.
...ov_clear(&strm.ovf); // Get next song strm.raw_ogg = music_queue[0]; music_queue.pop_front(); strm.pos = 0; if(strm.raw_ogg != NULL) { if(ov_open_callbacks(&strm, &strm.ovf, NULL, 0, my_callbacks) < 0) { panic("ov_open_callbacks failed - 2\n"); } } else { // NULL pointer si...
2001 Sep 25
2
Controlling
More newbie questions, please bear with me =) I've got my high level code pretty well structured, and I'm now trying to decode vorbis streams on the fly using the ov_open_callbacks() routines. I can't seem to figure out how to tell it what output format I want -- is this possible? For example, I would like to be able to specify number of channels output (e.g. stereo vs. sum-to-mono vs. reversed stereo) and possibly the ideal output frequency (to match user configuration...
2004 Oct 11
1
Streaming API?
I'm new to Speex and was wondering if there is a nice streaming API similar to Vorbis' "ov_open_callbacks", "ov_read", "ov_time_tell", etc. If not, is there an easy way to get Speex streaming from files? My appologies if this has already been answered a million times, but the archives aren't currently accessable! Thanks, Kevin -------------- next part -------------- An HT...
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/archive...
2002 Apr 01
1
Fw: ov_open failing with all files
...am able to open (and play), blowfish encrypted files using the ov_open_callback (and openssl BIO functions), so I thought maybe I had struck some silly problem with the default FILE * handlers. So I whipped up a basic callback handlers for FILE * that return -1 on the seek function, but a call to ov_open_callbacks fails with the same results. I'm using a static build of RC3 with MFC dll on Visual C++ 6. Any ideas? TIA Lance FILE *fd = fopen("c:\\Welcome.ogg", "r"); if ((ret = ov_open(fd, &m_file, NULL, 0)) < 0) { switch (ret) case OV_EREAD: TRACE(" - A read from m...
2001 Apr 03
1
playing vorbis file stored in a buffer array
Hi, I'm building an rtsp client/server that will support vorbis and I'm trying to determine the best way to play the vorbis content as the array is continuously being filled. Currently, I can download an ogg file via rtsp and write it out to a FILE and then play_file (from ogg123) it when it's done -- so the file is in the correct format. What would you recommend? -- Wayne Davis
2005 Jun 08
1
c# source to interop call vorbisfile.dll
Hi, Can anyone tell me where I can get sample C# code to call the native (win32) dll vorbisfile.dll to decode a vorbis Stream? I want the native performance of this methodology, however Ive tried porting the invocation code to C# and keep getting null reference errors when Calling ov_open_callback. Thanks - Adam -------------- next part -------------- An HTML attachment was
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 need more specific information about the seek algorithm. As far as I know, I could use ogg_sy...
2017 Apr 06
2
Zero length reported.
..._WIN32 #include <io.h> #include <fcntl.h> #endif char pcmout[4096]; int main (int argc, char** argv) { OggVorbis_File vf; int eof = 0; int current_section; #ifdef _WIN32 _setmode (_fileno (stdin), _O_BINARY); _setmode (_fileno (stdout), _O_BINARY); #endif if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) { fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n"); exit (1); } { char** ptr = ov_comment (&vf, -1)->user_comments; vorbis_info* vi = ov_info (&vf, -1);...