OggVorbis player

Russell Penney lists at rustycoin.com.au
Sun Nov 13 21:28:26 UTC 2005


I will try to dig up what I had (it has been a while) but real-life things
are taking precedent at the moment. 

I am not a "real" programmer (this is a hobby) so what I was really after
was some mentoring...well a person(s) who I could pass stuff to and have the
error of my ways pointed out, preferably in a supportive way ;)

I have said this before, I am happy to do the work but I need help doing it.

Obviously a good design is important and I feel there is too much "just do
it" and not enough "lets plan this". I think multimedia and file handling in
general are areas that shouldn't just have a solution thrown in but need to
be carefully thought out.

So to get started here are some random thoughts in no particular order:

Have abstract classes for each fundamental type of media:
Image
VideoStream
AudioStream

That class defines the minimum interface to each type.
Sub-types can have other features but there is a minimum of functionality
for each class to be compliant.
Compliance means that the Codec has passed a minimum set of tests and is
added to an official extension package.

*Player*
Each fundamental type has a player capable of presenting the data of the
instance on a particular interface. Audio would really only need one (the
sound card) although the potential is there for packages for network
broadcast, HTPC systems, multi zone, etc.
Think of these as a data sink perhaps. It's the object that pulls data in
i.e. it's the controller.
The Sink would request data in a format that can be negotiated between the
sink and the source of the data. There would be several "default" standards
that are particular for each Media. I.e. Audio has each channel data
interleaved or in a separate Array and/or 16 bit or 8 bit or 32 bit.
Basically each standard transforms a set of data to the native format of
that Media Sink.


Each Media and Format can really be broken down into:
*a container of pixel data
*a container of containers of pixel data (video)
*a container of PCM values
*a container of some other fundamental type i.e. characters (String), UTF, 
*a container of one or more of the above containers

*File Formats or Really Byte Stream Formats*
They must be able to detect the signature of many different byte stream
formats to "parse" the correct one.

Perhaps? Use MEPS pattern to parse Formats. Another instance method
(to:startingAt:) could be used to emit a byte stream representation.

CodecFactory holds the mapping of extension and keyword to classes that can
encode/decode the format.
CodecFactory newFromExtension: 'jpg' 
CodecFactory newFromKeyword: 'JPEG' 
CodecFactory newFromKeyword: 'ITU-123' 
CodecFactory newFromKeyword: 'RFC1120'
CodecFactory newFromMIMEType: 'image/jpeg'

*Signatures*
How do you identify a file (rather than something that has a MIME type) as
being a certain type?

*Methods*
parse:
parse:withMetadata:

> -----Original Message-----
> From: Giovanni Corriga [mailto:giovanni at corriga.net]
> Sent: Saturday, 12 November 2005 8:33 PM
> To: The general-purpose Squeak developers list
> Cc: Russell Penney
> Subject: RE: OggVorbis player
> 
> Il giorno sab, 12/11/2005 alle 10.20 +1100, Russell Penney ha scritto:
> > The current status of the Ogg code hasn't changed from what is on
> SqueakMap.
> > I got distracted by real-life and a desire to come up with a Resource
> > framework to handle all the different types of media. I looked at
> > integrating to the Sound framework that is in Squeak and was turned off
> > completely.
> >
> > IMHO Squeak should have the Multimedia title removed and replaced with
> > Multi-Spaghetti. Yes it can use lots of different media as long as you
> know
> > exactly what type it is first and figure out where that reader is in the
> > hierarchy (and hope it was finished and not just hacked for one person's
> > benefit). As Squeak has evolved, the Multimedia part has devolved.
> >
> > I posted a Resource framework a while back to get some comments if it
> would
> > gain acceptance and heard nothing back. I have just looked at
> VisualWorks
> > 7.3.1 and saw they have almost exactly the same idea finished! I am
> going to
> > explore a bit further with a view of doing something similar for Squeak
> but
> > I must admit I am discouraged by the lack of interest of the movers and
> > shakers of this community.
> >
> 
> Russell,
> 
> would you mind posting again the announcement of your Resource
> framework? This way I could report it on The Weekly Squeak and advertise
> it a little.
> 
> 	Giovanni






More information about the Squeak-dev mailing list