Structure
Purpose
-
Try to get a clean, extensible structure to streaming audio
Factors
-
Presentation format
-
Transport mechanism
-
Push/pull
-
Content description
-
Mechanisms
-
Interfaces declaring types (e.g. WAV interface)
-
Methods returning values (e.g. getContentType())
-
Entries (e.g. Name("Pink Floyd"))
Presentation
-
Many presentation types
-
Many subtypes e.g. 16-bit, little-endian, stereo, sampling at 48kbits/sec
Transport
-
Many transport mechanisms
-
QOS subtypes generally not known
Push/pull
-
A push source knows its sink, and writes to it
-
A push sink must make available an
OutputStream
-
A pull sink knows its source, and reads from it
-
A pull source must make available an
InputStream
Content description
Indefinitely many ways of expressing this
-
Artist: Sinead O'Connor
CD: I do not want what I haven't got
Track: Feel so different
Track #: 1
-
FM station: RRR
Program:
Time:
Interfaces
-
Good way of giving type information
-
Extensible - just add new interfaces
-
Can add multiple types for orthogonal properties
-
Won't handle a larger variety of types
Methods
-
General method to give info
-
Return type is fixed
-
Return type non-extensible?
Entries
-
Arbitrary info can be passed
-
Can be dynamically changed
-
Useful for non-essential information
Independent client
A client that doesn't want to bother with any details would just want to see
sources and sinks
Transport independent
If the push source or pull sink don't want to get involved in the transport
mechanism, they can leave that to the corresponding sink/source
A typical implementation would do
Transport dependent
-
A (pull) source can say what transport mechanisms it can support
-
These can be specified by interfaces
-
An
HttpSource
can return a URL
except this can hold any protocol (http, file, ftp, etc)
-
An
HttpURL
is a wrapper around a URL
that ensures the protocol is http
-
A sink can check from the transport interface if it supports
the transport protocol and can get an
InputStream
for that protocol
Presentation
-
To a first approximation, the presentation type can be described
by an interface
-
presentation.WAV
-
presentation.Ogg
These are (initially) "place-holder" interfaces
-
The presentation type should be orthogonal to transport
-
??? How to handle JMF: MP3 over RTP at only 2.4 kbps, WAV at any
speed over HTTP ???
Http/Wav Source
Flexible pull sink
-
A flexible pull sink will handle
-
A variety of transport type
-
A variety of presentation formats
-
The transport part gets an
InputStream
-
The presentation part takes the
InputStream
and "records" it
Jan Newmarch (http://jan.newmarch.name)
jan@newmarch.name
Last modified: Tue Sep 9 10:31:10 EST 2003
Copyright ©Jan Newmarch