locked
MediaElement fails with HRESULT - 0xC00D5212

    Question

  • Hello,

    currently i am developing a Windows Phone App (8.1) and using MediaElement to decode and display video streams over the network. I used the MediaStreamSource streaming sample as reference and i am able to play H264 frames without any issue.

    When i try to do the same for a MJPEG encoded frames the MediaElement fails after starting with the error MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED : HRESULT - 0xC00D5212

    My code looks like this:

    VideoEncodingProperties videoProps =  new VideoEncodingProperties();
    videoProps.Subtype = MediaEncodingSubtypes.Mjpg;
    
    videoProps.Width = (uint)videoParams.width;
    videoProps.Height = (uint)videoParams.height;
    
    VideoStreamDescriptor videoDesc = new VideoStreamDescriptor(videoProps);
    this.videoSource = new MediaStreamSource(videoDesc);
    this.videoSource.CanSeek = false;
    this.videoSource.BufferTime = TimeSpan.FromMilliseconds(0);
    this.videoSource.Starting += videoSource_Starting;
    this.videoSource.SampleRequested += videoSource_SampleRequested;
    this.videoSource.Closed += videoSource_Closed;

    When i insert the subtype H264 it will work. From the error message i assume that the decoder is not available or am i missing some parameters ? (Same behaviour on device and emulator)

    Saturday, October 04, 2014 2:06 PM

Answers

  • Hello,

    You are correct. We do not currently ship a MJPEG decoder on the Phone platform. You will need to find a 3rd party solution or you can write your own decoder.

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    • Marked as answer by IDGH Tuesday, October 07, 2014 9:08 AM
    Monday, October 06, 2014 5:50 PM
    Moderator

All replies

  • I'll ask our media guru to check on this post.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, October 06, 2014 12:30 PM
    Moderator
  • Hello,

    You are correct. We do not currently ship a MJPEG decoder on the Phone platform. You will need to find a 3rd party solution or you can write your own decoder.

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    • Marked as answer by IDGH Tuesday, October 07, 2014 9:08 AM
    Monday, October 06, 2014 5:50 PM
    Moderator
  • Hello,

    i already found a solution, thanks.

    Tuesday, October 07, 2014 9:08 AM