473,799 Members | 3,106 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WPF MediaElement Resume jumps video backwards

Hello,

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

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.Controlle r.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.Cl ock;

if (clock != null)
{
if (clock.IsPaused )
{
clock.Controlle r.Resume();
}
else
{
clock.Controlle r.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
0 3052

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2778
by: Keith Langer | last post by:
I have an application which consists of a main work thread and multiple threads which each maintain a TCP socket. When a configuration change occurs, all activity on the socket threads must be halted. If a socket is no longer in the configuration, that thread must be aborted and the socket must be closed. After the configuration is complete, the remaining threads must be resumed. I currently have the following architecture:
1
10335
by: Lonewolf | last post by:
Hi everyone, pls forgive me for my lack of knowledge and skills if my question sounds very stupid. I am trying to implement a video conferencing software and I am currently looking at a few set of technologies, among them WMP, RealMedia, H.323 and XviD (not sure if it is suitable for streaming even) . I would like to seek the advice of those experts on the following questions, 1) What is the best technologies to be used, in terms of...
8
3667
by: Nehmo | last post by:
When a page has a JavaScript "link" to a video, like http://www.msnbc.msn.com/id/10478942/ . How do you get the URL of the actual video? Isn't it in the source somewhere? -- )|:__ Nehmo __:|(
1
3658
by: garylinux | last post by:
Is there a way to get the length of a video clip (divix/xvid) in seconds? oh this is on linux. I first tryed to see if mplayer would tell me then I could wrap the call in a popen object and be done but it does not appear to output the length. Now I am looking at pymedia .It would be nice if there was some actual docmentation for it.
12
4491
by: Pallas | last post by:
Hi all, I've produced some high-def videos and I want people to be able to watch them on my website, but I may want to prevent downloads and I certainly want to prevent them from editing them. How can I impose such limitations? I have asked Google Video if they will ever permit
0
1418
by: Piotrekk | last post by:
Hi I have a little problem. Having small mavie.avi ( divx compression ) i've noticed that candle fire on movie.avi in windows media player is displayed properly but in my mediaelement candle fire in focal point is black. Same problem is few seconds later with regular lamp ( only the little elements on lamp ). I have tried different codecs. Really don't know what could be the problem. The video also seem to have small lags.
0
325
by: Piotrekk | last post by:
Hi I have a little problem. Having small mavie.avi ( divx compression ) i've noticed that candle fire on movie.avi in windows media player is displayed properly but in my mediaelement candle fire in focal point is black. Sometimes I see such a problems when I use wrong codecs to decode the movie. Same problem is few seconds later with regular lamp ( only the little elements on lamp ). I have tried different codecs so i think that's not...
1
3692
by: cbmeeks | last post by:
I just want to play some m4a files I have. Some, are DRM-locked down crap that I got from iTunes (never again will I buy DRM music). But, I have some .m4a files that are DRM free (from Amazon). They play just fine in Windows Media Player 11 and even my Sony PSP. I have created a MediaElement control in a WPF app and when I put the source as a mp3 file, it works. But when I switch to a m4a file, I get nothing.
3
8651
by: pavanip | last post by:
Hi, I am new to Silverlight application.I want to display video using Mediaelement tag and I used the below code to play video. <Canvas> <MediaElement x:Name="mPlayer" Width="640" Height="480" Source="a_video.avi"/> <Button x:Name="bPlay" Background="Green" Width="100" Height="45" Canvas.Left="8" Canvas.Top="497" Content="Play" /> <Button x:Name="bPause" Background="Yellow" Width="100" Height="45"...
1
10228
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7565
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.