Skip to content

Step 1 to MKV accomplished (the easy step)

December 8, 2012

I think I know the approach I’m going to need to take to get MKV files to play in any WinRT/Windows Store app.  And that is to use the MediaStreamSource extension that is available through Silverlight.  There is a sample available on Microsoft’s website that shows how to do a very basic implementation of this.  It basically allows you to set the source of your mediaelement with a custom source… not just one that mediaelement can automatically recognize.

The sample just generates simple PCM source (pulse modulating wave – what all sound files get turned into before going to the sound hardware) within a Media Foundation object called a Source (duh) and sets that source as the mediaelement’s source.  The trouble with the sample is that it’s half C++ and half C# and written for ARM.  It took me a day to figure out since I have no idea how to set the compiler paths and stuff for C++, but I put it into Simple TV Library and made it play the PCM source when a MKV file was selected.  Out of the speakers came:  Bzzzzzzzzz.  Perfect!

So the easy part is done.  I have a framework setup in which to play any container format I want as long as the streams inside use known codecs.  The hard part is going to be writing an MKV parser… something that will read the actual file and create individual streams.

I’m hoping that this method is going to work in the end.  So far, I can’t see why not.

Advertisements

From → Beta, Matroska

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: