Closes #1312 (closed), the RFC behind this.
The design and implementation are based on WebKit's GStreamer implementation of this specification, converted to C, though the amount of layers relative to the WebKit implementation has been reduced.
The public APIs defined are Media Source, Source Buffer, and Source Buffer List which map directly to the concepts in the specification. The Media Source is the entry point to the API and maintains a group of Source Buffers. Applications feed raw data into the Source Buffers which then parse it as audio, video, and text streams that are stored in memory in their original encoding to be used by a media player.
The media player is anything that incorporates a GStreamer pipeline that has a
msesrc source element inside. The
msesrc is a special source element that can attach to a Media Source and consume the media data stored in its Source Buffers and forward the media through the pipeline.
Each Source Buffer receives a stream of bytes from the application which are hopefully a valid multimedia stream. The Source Buffer uses an Append Pipeline to process the incoming data. The Append Pipeline is its own pipeline composed of an
parsebin, and zero or more
appsinks. As the stream is processed, the pipeline creates one appsink per track and forwards parsed samples back to the Source Buffer, which stores each track's samples in separate Track Buffers which organize each track's samples chronologically for future iteration. When the media player wants to play the stream, it will trigger tasks within each Source Buffer to feed samples from each requested track's Track Buffer into a Track Queue through a seek request to the Media Source. Each Track Queue is then polled by tasks within the
msesrc and forwards samples down its pipeline for playback. The
msesrc element is exported from the library in its own plugin and implements a uri handler on the
In its current state the library is capable of handling MP4, WebM, and MP3 input data.
Active Source Buffers property
Append Window modification
Timestamp offset support
[ ] Changing content type
Enforcement of content type constraints
Ready State tracking
Update copyright blocks to include WebKit authors
Add source-level documentation to public APIs