[vorbis] Streaming ogg from filepointer pointing to archiveofmany oggs. Ogg stream does not stop after end of one ogg file- what todo ?
Andre Krause
post at andre-krause.net
Fri Apr 23 11:46:49 PDT 2004
So far, the section - variable check works. The music stops playing. But
now i have a problem i suspect to be a bug in ogg:
Assume i have a simple archive "musik.pak", created by simply concatenating
binary files together, consisting of 4 files:
Somebinarygarbage.dat (1000 bytes)
Test1.ogg (5kbytes)
Test2.ogg (5kbytes)
Somebinarygarbage.dat (1000 bytes)
Test3.ogg (5kbytes)
<p>Now i create a file pointer and place the filepointer to the beginning of
test1.ogg:
fp=fopen("musik.pak","rb");
fseek(fp,1000, SEEK_SET);
This works fine. Test1.ogg gets played.
Now placing the filepointer to the beginning of test2.ogg,
fseek(fp,6000, SEEK_SET);
Gives a problem. Now, ov_open fails and returns -123 (OV_EBADLINK ). What
does this mean ?
The filepointer was placed to the beginning of a simple ogg, just like
placing it to test1.ogg...
Placing the filepointer to the beginning of test3.ogg results in the same
error code.
Please, can someone give me an idea what's going wrong ?
<p>> -----Original Message-----
> From: owner-vorbis at xiph.org [mailto:owner-vorbis at xiph.org] On
> Behalf Of Andre Krause
> Sent: Freitag, 23. April 2004 00:36
> To: vorbis at xiph.org
> Subject: RE: [vorbis] Streaming ogg from filepointer pointing
> to archiveofmany oggs. Ogg stream does not stop after end of
> one ogg file- what todo ?
>
> At the moment i have simply cat'ed oggs along with other
> stuff like images etc in one bif .pak file. It's
> uncompressed. It simply custom made for my current game in
> development. So i first will try to test method #1, checking
> the section var.
> After this i give a try to the callback method, because it
> would be great if sdl_mixer would support streaming of oggs
> from and SDL_rwops. At the moment, only mod-streaming was
> implemented by someone. Maybe i will manage to do the same for oggs :)
>
> Thanks alot for the help sp far !
>
>
>
> > -----Original Message-----
> > From: owner-vorbis at xiph.org [mailto:owner-vorbis at xiph.org]
> On Behalf
> > Of Kenneth C. Arnold
> > Sent: Donnerstag, 22. April 2004 03:46
> > To: vorbis at xiph.org
> > Subject: Re: [vorbis] Streaming ogg from filepointer pointing to
> > archive ofmany oggs. Ogg stream does not stop after end of one ogg
> > file - what todo ?
> >
> > Michael Smith wrote:
> > > There are two ways you can do this:
> >
> > This depends on what sort of 'archive' he means.
> >
> > If by 'archive' he means trying to play back an uncompressed tar or
> > zip file in which you've stuffed Ogg's, then definitely implement
> > callbacks to read the correct parts of the archive in the
> right order
> > and keep track of what's going on. Anything less is necessarily
> > somewhat sloppy.
> > (This is Mike's option #2.)
> >
> > If by 'archive' he actually means a bunch of Ogg's cat-ed together,
> > then follow option #1. Ogg was designed for this.
> > This case is what allows e.g. streaming radio to work. You can
> > certainly query the vorbisfile library for any relevant information
> > about each stream. If your stream is seekable, then it
> calculates and
> > stores position, length, channel count, and other information about
> > each stream as it loads.
> > Otherwise, you can only get information for the current stream.
> >
> > Apologies if any answers confused you.
> >
> > Ken
> >
> > <lurk mode="on">
> >
> > --- >8 ----
> > List archives: http://www.xiph.org/archives/ Ogg project
> > homepage: http://www.xiph.org/ogg/ To unsubscribe from this
> list, send
> > a message to 'vorbis-request at xiph.org'
> > containing only the word 'unsubscribe' in the body. No subject is
> > needed.
> > Unsubscribe messages sent to the list will be ignored/filtered.
> >
> >
>
> --- >8 ----
> List archives: http://www.xiph.org/archives/ Ogg project
> homepage: http://www.xiph.org/ogg/ To unsubscribe from this
> list, send a message to 'vorbis-request at xiph.org'
> containing only the word 'unsubscribe' in the body. No
> subject is needed.
> Unsubscribe messages sent to the list will be ignored/filtered.
>
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis
mailing list