Resource Page DescriptionClass libraries and example Applications to jump start development with and learning about Silverlight's MediaStreamSource.
Quick Start
To get a quick look, download Release 1.2.0.0 and look at the source in the following two projects:
- MediaParsers.Desktop
- Mp3MediaStreamSource.SL4
After that right click on and debug the projects:
- Mp3MediaStreamSourceDemo.SL4
- Mp3MediaStreamSourceDemo.Phone
Most recent update is 1.2.0.0
Changes in 1.2.0.0:
- Added Windows Phone 7 Sample
- Development of this code has been made public on https://github.com/loarabia/ManagedMediaHelpers
- There are a number of issues both meaty and small and more ready to be filed and built. Please fork the code and do great things with it and send me pull requests.
- Code releases will continue to be done on CodeGallery each time a new version of Silverlight or Silverlight based technology RTMs or when enough folks add new features to the library.
- Code Cleanup
- Updated Mp3MediaStreamSource to run on Windows Phone 7
- Updated Mp3MediaStreamSource to not require reading the entire file into memory
- Updated to support Duration
- Updated to support streaming content
Special thanks to Stephen Lau for contributing much of this work.
Background
Why ?
This project grew out of 3 desires:
- Provide a MediaStreamSource sample that is useful for educating developers on development with Silverlight's MediaStreamSource
- Provide helper classes which make it easier to use MediaStreamSource for certain scenarios (Mp3 for now)
- Prime the Silverlight development community with MediaStreamSource code to see what creative things can be built
What is in this project ?
This project contains 4 things.
- A Silverlight class library, MediaParsers, which contains helper classes for working with Mp3 files, including tools to help find the right point in an Mp3 file to begin playback from and Managed implementations of fundamental media structures.
- A Silverlight Test Project built for nunit, MediaParsersTests, which provides core code coverage for the MediaParsers library.
- A Sliverlight class library, Mp3MediaStreamSource, which has arguably the simplest logic imaginable for using Mp3 file streams with a MediaStreamSource.
- A Sliverlight Application demo, Mp3MediaStreamSourceDemo and Mp3MediaStreamSourceDemoWeb, which shows the simplest interaction between a MediaElement and a MediaStreamSource.
What is a MediaStreamSource ?
The MediaStreamSource is a piece of the Silverlight runtime that removes a the influence of a media file's container, giving developers direct access to APIs for manipulating encoded elementary audio and video streams.
Why would anyone want to remove the container ?
For one thing, having access to elementary streams means that developers can now implement scenarios that other solutions haven't necessarily provided thus far. One example of this is adaptive streaming or multi-bitrate support as was seen during the 2008 Olympics. For another reason, having access to elementary streams allows developers to implement scenarios that the Silverlight runtime hasn't had a chance to implement yet or that the runtime might not be able to implement in the same timeframe that a developer wants it. Examples of this could be, RTSP:T protocol support, SHOUTcast protocol support, seamless audio looping, ID3 v1 and ID3 v2 metadata support, and many other scenarios.
Tools used by this project
Visual Studio 2010 UltimateStyleCopWindows Phone 7 Toolsgitgithub
Who are you?
Larry Olson
|