gstreamer/gst/asfdemux
Julien Moutte 430e217dbd gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23  Julien MOUTTE  <julien@moutte.net>

* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
..
asfheaders.h gst/asfdemux/: lot's of fixes to make data extraction simpler and get the code architecture and compiler independant.... 2004-01-27 01:27:04 +00:00
gstasfdemux.c gst/: First batch implementing audio and video codec tags in demuxers. 2004-02-23 22:16:21 +00:00
gstasfdemux.h Riff, EBML, fourcc etc. work. Not fully finished, but better than what we used to have and definately worth a first b... 2003-12-07 20:00:33 +00:00
gstasfmux.c gst/intfloat/, gst/oneton: Removed, replaced by audioconvert and interleave respectively. 2004-02-20 14:17:57 +00:00
gstasfmux.h ASF muxer, largely based on ffmpeg's one, but well-integrated in GStreamer. Demuxer still needs work. 2003-08-26 19:28:20 +00:00
Makefile.am fixes for ASF: 2003-12-19 02:39:38 +00:00
README Change everyone to video/x-msvideo 2003-11-27 21:48:40 +00:00

ASF Demuxer Plugin
==================

Overview
--------

This plugin is a demuxer for Microsoft's ASF Advanced Streaming Format
or ASF [1]. This demuxer only supports ASF v1.0 since the vast
majority of existing ASF files use that version. The spcification
has been derived from a third party source [2] without reference to
the original.

Design
------

The ASF format can carry any combination of audio, video or
'ASF_Command_Media' streams. For simplicity it is assumed that each
file can carry up to 16 audio streams and 16 video streams. These are
implemented as dynamic pads and appear as appropriate once the file
headers have been parsed.

    (-------------------------)
    ! asfdemux                !
    !                    (video/raw0)---
    !                    (video/raw1)---
    !                    (video/raw...
  --- src                     !
    !                    (audio/raw0)---
    !                    (audio/raw0)---
    !                    (audio/raw...
    !                         !
    (-------------------------)


Known stream fourccs are:

Type		Tags		MIME type
------------------------------------------
H263		H263 I263	
MJPEG		MJPG		video/jpeg	
MPEG4		DIVX divx DX50	video/mpeg
		XVID xvid mp4s	
		MP4S M4S2 m4s2
		0x04000000
MSMPEG4V1	MPG4		video/mpeg
MSMPEG4V2	MP42		video/mpeg
MSMPEG4V3	MP43 DIV3	video/mpeg
WMV1		WMV1

These video stream headers is very similar to that used in the AVI
format as are the audio stream headers. In addition the content types
are basically the same also so, for compatibility with existing
plugins the src pads are set up as video/x-msvideo. This enables
compatibility with the ffmpeg plugin.

The demuxing process begins with the loop function gst_asf_demux_loop
and parses the file in a recursive tree as follows:

	gst_asf_demux_loop()
	+-> gst_asf_demux_process_object()   <----
	    +-> gst_asf_demux_process_stream()    \
	    |-> gst_asf_demux_process_file()      |
	    |-> gst_asf_demux_process_header()  --+
	    |-> gst_asf_demux_process_data()
		+-> gst_asf_demux_process_segment()
		    +-> gst_asf_demux_process_chunk()

Todo
----

- Support for ASF v2.0
- Support for command media streams



References
----------

[1] Microsoft. ASF Specification - Windows Media Technologies. 
http://www.microsoft.com/windows/windowsmedia/WM7/format/asfspec11300e.asp

[2] divx at euro.ru. ASF format version 1.0,
reconstruction. http://avifile.sourceforge.net/asf-1.0.htm