Re: File_Vorbis Latest... [FOLLOWUP]

From: Date: Wed, 13 Aug 2003 15:36:58 +0000
Subject: Re: File_Vorbis Latest... [FOLLOWUP]
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19677@lists.php.net to get a copy of this message
> On 13 Aug 2003 at 12:22, David Grant wrote: >> Perhaps an array in the following format might be an idea: >> >> Array ( >> OGG_STREAM_VORBIS => Array ( >> 'pattern' => "vorbis", >> 'mime' = "application/ogg", >> 'type' = "audio", >> ) >> ) >> >> I'll hack something together this evening. > > But 'mime'? Are you sure? The stream itself doesn't have a real > "mime"-type - only the container. application/ogg is the mime type for a vorbis stream: http://www.vorbis.com/faq.psp#mimetype Obviously, it was a bit stupid of me to include such a confusing example. :) Here's a better one: Array ( OGG_STREAM_VORBIS => Array ( 'pattern' => "speex", 'mime' = "audio/x-speex", 'type' = "audio", ) ) >> >> > While designing File_Ogg: >> >> > a) be sure to implement some return for "stream-type unknown" b) >> >> > maybe tell the type of a stream (e.g. theora, speex, ...) even >> >> > though you haven't implemented them. This would allow full >> >> > scanning an ogg container without actually being able to retrieve >> >> > streaminfo for every stream. >> >> >> >> a) Shouldn't this throw an error? >> > An error in an array? Hmm ... you could probably return an object of >> > type PEAR_Error, okay - but scanning through an ogg container and >> > finding one (of many) streams that is unknown doesn't necessarily >> > mean that a real "error" occured, does it? >> >> I see. I misunderstood. So you were thinking along the lines of a >> seperate OGG_STREAM_UNKNOWN constant? I thought you meant that the >> user would request an unknown stream, in which case an error should >> definitely be raised. > > I just meant that when you scan an ogg-container for streams there > might be one stream (future implementation) you can digest from the > others but which your class doesn't know yet. In this situation an > OGG_STREAM_UNKNOWN would be useful and it should be taken into > consideration at design-time. > But as you proposed: At least if it's possible to digest flac, speex, > theora etc. as well (but not retrieve information from those streams > yet) I'd love to see a way to at least say which of these streams are > in the container. Digestion is not a problem in terms of stream recognition (well, I say that now, because I haven't tried it yet :P), so you will have what you require. When you will have it, however, is a different matter! :) Regards, David

« previous php.pear.dev (#19677) next »