locked
Video playback slow with MediaClock RRS feed

  • Question

  • Is there any reason why using a MediaClock to playback video would be any slower than using a MediaElement directly?

    I'm experience much slower playback when I use the following to play video:
       MediaTimeline mt = new MediaTimeline(source);
       MediaClock mc = mt.CreateClock();
       _videoElement.Clock = mc;
       mc.Controller.Begin();


    than with
       _videoElement.Source = source;
       _videoElement.Play();

    The latter is definately at the correct framerate, but the former is probably pushing 15fps.

    -greg

    Wednesday, March 22, 2006 2:28 AM

Answers

  • There is no obvious reason why using a MediaClock would negatively impact the framerate of the video.

    3 Questions:
    1) What WPF bits are you using?
    2) What is your hardware (CPU, video card, ...)?
    3) Are you setting a SpeedRatio in your MediaClock at all?  Setting this to a non-unit value could cause us to drop some video frames.

    Thanks a lot,
    Ed

    Tuesday, April 4, 2006 5:04 PM