By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,338 Members | 1,094 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,338 IT Pros & Developers. It's quick & easy.

WPF MediaElement Resume jumps video backwards

P: n/a
Hello,

I have a strange problem with Pause and Resume using a
MediaElement.Clock.

I implemented a MediaElement to display a video and implemented a GUI
around it to make the typical Start/Stop/Pause/Resume functionality
available.

For one particular video I work with the clock.Controller.Resume()
function causes the clock to jump back several seconds (or frames?)
first and then starting to play the video from that position. This is
quite a nuisance because I am trying to keep the video synchronized
with another video that I restart at the same time (and which doesn't
jump backwards first). Is there anything that could explain this
behaviour?

My pause/resume code is quite trivial. Here an excerpt:

public void PauseResume()
{
MediaClock clock = mediaElement.Clock;

if (clock != null)
{
if (clock.IsPaused)
{
clock.Controller.Resume();
}
else
{
clock.Controller.Pause();
}
}
}

If anyone has ideas as to why this could be happening, I'd be very
interested!
(Would it be possible that is has to do with the way the video is
encoded? Keyframe? etc.?)

Cheers,
Petra
Nov 10 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.