SEAL Forum Index SEAL
The SEAL Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Seal Multimedia API Draft Specification 0.1

 
Post new topic   Reply to topic    SEAL Forum Index -> General
View previous topic :: View next topic  
Author Message
orudge
Administrator


Joined: 07 Oct 2001
Posts: 1332
Location: United Kingdom

PostPosted: Sun Sep 01, 2002 5:30 am    Post subject: Seal Multimedia API Draft Specification 0.1 Reply with quote

Here is an incomplete draft specification of the Seal Multimedia API, which will replace SFA in Seal 3.0.

Code:

                            Seal Multimedia API (SMA) Specification
                                         Version 0.1

                                Copyright (c) Owen Rudge 2002
                                     All Rights Reserved

Ogg and Vorbis are trademarks of Xiphophorus. DivX is a trademark of DivX Networks. Microsoft
is a registered trademark of Microsoft Corporation. QuickTime is a registered trademark of
Apple Computer, Inc. Indeo is a registered trademark of Intel Corporation. All other trademarks
acknowledged.

THIS DOCUMENT IS INCOMPLETE. IT IS A WORK IN PROGRESS. PLEASE NOTE THAT ANY OF THE TEXT IS
LIABLE TO CHANGE IN FUTURE REVISIONS. THE TECHNICAL DETAILS SHOULD NOT BE RELIED ON TO BE
CORRECT - THEY MAY CHANGE IN THE FUTURE.

TABLE OF CONTENTS
=================

1. OVERVIEW
   1. What is SMA?
   2. Input Drivers
   3. Demultiplexer Drivers

1. OVERVIEW
===========

1.1. WHAT IS SMA?
-----------------

The Seal Mulimedia API is a brand new API for Seal 3.0 which provides a fully-featured
API for multimedia use. SMA uses a driver system, and there are several types of
driver:

- Output driver
  The output driver takes sound or video from an earlier stage and plays it back, displays
  it on the screen, writes it to a file, sends it over the Internet, or whatever.

- Decoder driver
  Decoder drivers take compressed input and decode it to PCM sound or raw video. For example,
  an Ogg Vorbis decoder would take a Vorbis bitstream as input, and produce PCM sound as an
  output. Decoder drivers are identified by four-character codes, called FOURCCs. For example,
  'DIV3' is the FOURCC code for DivX 3.x.

- Encoder driver
  Encoder drivers are the opposite of decoders - they take raw data and compress it. For example,
  an Ogg Vorbis encoder would take a raw PCM stream and would produce a Vorbis stream.

- Demultiplexer (demuxer) driver
  A demuxer driver reads from an input stream and splits it up into its component parts. For
  example, a demuxer driver for MPG files would produce an MPEG video stream and an MPEG audio
  stream. A demuxer driver for WAV files would produce an audio stream of the appropriate format
  - if the WAV file was in Microsoft ADPCM format, it would produce a Microsoft ADPCM stream, for
  instance. Some demuxers produce just audio, some just video, and some both. Some may also
  produce other information - subtitles, for example. An Ogg demuxer may produce a DivX video
  stream, a Vorbis audio stream and a subtitle stream.

- Multiplexer driver
  A multiplexer driver combines data from input streams and sends it to an output driver. It is
  the opposite of a demultiplexer (demuxer) driver. For example, an Ogg Multiplexer may take a
  DivX compressed video stream (although it doesn't have to be this - it could be, for example,
  a Cinepak or Indeo compressed stream) and an MPEG Layer-3 audio stream and combine it into an
  OGM file.

- Input driver
  An input driver reads data from a file and sends it to the appropriate demuxer. For example,
  the standard input driver may open a file and ask each demuxer driver in turn if this file
  is the correct type for the driver. However, an input driver does not have to take its source
  from a file - it may take video and audio from the Internet, or from a video capture card, or
  it may take raw audio from an audio CD.

- Custom application drivers
  Custom application drivers let programs process audio and video before it reaches its final
  destination. This may be to provide a visualisation of audio, for example.

For instance, the steps involved in decoding an MP3 file and playing it back could be as follows:

         /----------------------\
         |       MYMP3.MP3      |
         \----------------------/
                    |
         /----------------------\
         |   File Input driver  |
         \----------------------/
                    |
         /----------------------\
         |      MP3 Demuxer     |
         \----------------------/
                    |
         /----------------------\
         | MPEG Layer-3 Decoder |
         \----------------------/
                    |
         /----------------------\
         | Allegro sound output |
         |       driver         |
         \----------------------/

   Figure 1.1.1 - Decoding a typical MP3 file

However, the steps involved in decoding a QuickTime movie and running the sound and video
through a custom application driver would be quite different:

                  /----------------------\
                  |       VIDEO.MOV      |
                  \----------------------/
                             |
                  /----------------------\
                  |   File Input driver  |
                  \----------------------/
                             |
                  /----------------------\
                  |   QuickTime Demuxer  |
                  \----------------------/
                     /                 \
                    /                   \
                   /                     \
      /----------------------\  /----------------------\
      |    Sorenson Video    |  |     QDesign Music    |
      |       Decoder        |  |       Decoder        |
      \----------------------/  \----------------------/
                 |                         |
      /----------------------\  /----------------------\
      |   Custom App Driver  |  |   Custom App Driver  |
      \----------------------/  \----------------------/
                 |                         |
      /----------------------\  /----------------------\
      | Allegro sound output |  |    Windowed video    |
      |        driver        |  |     output driver    |
      \----------------------/  \----------------------/

           Figure 1.1.2 - Decoding a QuickTime movie

2. INPUT DRIVERS
----------------

Input drivers read data from files, the Internet or some other input source and pass it on to
the appropriate demuxer. They export a variety of functions for seeking, reading data, and so
on. Of course, with some input types, seeking is not possible and you must just take the input
data as you get it - for example, you cannot seek within some types of streaming media.

The first job of an input driver is to cycle through each demuxer and ask them to try and
identify the file type, as in the following example:

 - Input Driver (MYFILE.AVI)
   - Ask WAV demuxer to identify file type - returns false
   - Ask MPEG demuxer to identify file type - returns false
   - Ask AVI demuxer to identify file type - returns true
   - Stop

 Figure 1.2.1 - Identifying the demuxer to use

SMA or the host application then passes control onto the demuxer, which initializes and when
required, begins reading data.

3. DEMULTIPLEXER DRIVERS
------------------------

Demultiplexer drivers read data via input drivers and identify the streams in the file. Streams
are usually identified by a four-letter code, a FOURCC. Certain types of media may not have
streams (for example, raw audio) or may use different stream identification methods. The demuxer
must translate between the system the file uses and the FOURCC system used by SMA. WAV files
store the codec used in a 'format tag', which is a 16-bit integer. The standard for SMA decoders
that usually only have a WAV format tag is to have a FOURCC of 'WVxx', where 'xx' is the
format tag. The DSP TrueSpeech FOURCC would then be, in a C-style string, 'WV\x0\x22' (ie,
'WV' then a NULL character and then hexadecimal character 22 (decimal 34, or ").

Extending the example in figure 1.2.1, the following diagram shows the demultiplexing stage.

 - Input Driver (MYFILE.AVI)
   - Ask WAV demuxer to identify file type - returns false
   - Ask MPEG demuxer to identify file type - returns false
   - Ask AVI demuxer to identify file type - returns true

   - AVI Demultiplexer
     - Read AVI header
     - Compare video FOURCC with FOURCCs of decoder drivers
       - Compare 'cvid' with 'iv50' - false
       - Compare 'cvid' with 'mrle' - false
       - Compare 'cvid' with 'div3' - false
       - Compare 'cvid' with 'cvid' - true
     - Create FOURCC from audio format tag
     - Compare audio FOURCC with FOURCCs of decoder drivers
       - Compare 'wv\x0\x2' with 'wv\x1\x30' - false
       - Compare 'wv\x0\x2' with 'wv\x0\x6' - false
       - Compare 'wv\x0\x2' with 'wv\x2\x2' - false
       - Compare 'wv\x0\x2' with 'wv\x0\x2' - true

                                 * * * TO BE COMPLETED * * *


Comments welcome.
_________________
Owen Rudge
http://www.owenrudge.net/

Currently Playing (last time I was online, anyway):
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
orudge
Administrator


Joined: 07 Oct 2001
Posts: 1332
Location: United Kingdom

PostPosted: Sun Sep 01, 2002 5:31 am    Post subject: Reply with quote

Hmmm, if you are viewing at 800x600 or smaller, the layout will be messed up. I designed the document in Notepad at 800x600. Try copying and pasting (or going Quote, copy and paste) into Notepad and maximising the window if it's messed up.
_________________
Owen Rudge
http://www.owenrudge.net/

Currently Playing (last time I was online, anyway):
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
DaNo



Joined: 29 Jun 2002
Posts: 102
Location: The Netherlands

PostPosted: Sun Sep 01, 2002 7:41 am    Post subject: Reply with quote

I am running 800x600 but no probs..
_________________
The name is DaNo, and he's got a licence to program in VB, C and Assembly Language.
What more can we say about a living legend?

Programmer of the DaNoOS: http://home.planet.nl/~esch0090
Back to top
View user's profile Send private message Send e-mail MSN Messenger
orudge
Administrator


Joined: 07 Oct 2001
Posts: 1332
Location: United Kingdom

PostPosted: Sun Sep 01, 2002 10:26 am    Post subject: Reply with quote

Well, if your fonts are smaller than the standard sizes, you may not notice problems. However, some things wrap before they are meant to.

Anyway, what do you think of the actual specification itself?
_________________
Owen Rudge
http://www.owenrudge.net/

Currently Playing (last time I was online, anyway):
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
DaNo



Joined: 29 Jun 2002
Posts: 102
Location: The Netherlands

PostPosted: Sun Sep 01, 2002 11:08 am    Post subject: Reply with quote

looks good
_________________
The name is DaNo, and he's got a licence to program in VB, C and Assembly Language.
What more can we say about a living legend?

Programmer of the DaNoOS: http://home.planet.nl/~esch0090
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Lynx



Joined: 15 May 2002
Posts: 7

PostPosted: Mon Sep 02, 2002 1:08 pm    Post subject: Reply with quote

orudge wrote:
Well, if your fonts are smaller than the standard sizes, you may not notice problems. However, some things wrap before they are meant to.

Anyway, what do you think of the actual specification itself?


Well, Owen... I'm here to say that we are probably the only people who are interested in development of all these projects. The only way to move on is to get MORE developers. Where can we get more DOS freaks?

I would suggest FIDO conference RU.DOS. Some time ago I gave them latest SEAL to try and they said that it's fine, but:

1) Doesn't have KEYBOARD SHORTCUTS - that was major issue.
2) Is very unstable...
whatever.

I think you should try to contact that conference and post some messages in english, moderator is a very friendly person.


DOS Ressurection is almost impossible


I appreciate all work which you've done so far, including huge site, all software and of course game patches

I'm thinking to quit dos scene. I was making network freedos distro exactly 2 years ago, but somebody stole my test harddrive from iCafe where I was testing package with different boxes... That was the first time when I lost all my interest in DOS. Idea about making something extra cool came back when I came back to scene and noticed new quickview which is BEST DOS PIECE OF SOFTWARE CREATED IN LAST 2 YEARS. But that was it - no new Arachne, no nothing. Except SEAL... Even Open Cubic Player sucked. Everyone left the boat...

I'd like to hear some comments from you as one of the last "captains on the ship".

Thanks in advance.
_________________
Just a Freak, emuFreak!
Back to top
View user's profile Send private message Visit poster's website
orudge
Administrator


Joined: 07 Oct 2001
Posts: 1332
Location: United Kingdom

PostPosted: Mon Sep 02, 2002 1:45 pm    Post subject: Reply with quote

I've used Quick View - it's very good, and very small for such a fully-featured piece. Keyboard shortcuts should be present in Seal 3.0.

As for finding more developers, the FreeDOS ocmmunity is quite large, and there are a number of DOS hobbyists out there, but the DOS userbase is shrinking, as DOS gets older and so on...
_________________
Owen Rudge
http://www.owenrudge.net/

Currently Playing (last time I was online, anyway):
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    SEAL Forum Index -> General All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group