WPF MediaElement pauses when trying to play Windows Media Center recording [closed]
Asked Answered
C

2

6

I have an WPF application that starts a live tv recording using Windows Media Center, using the Windows Media Center SDK, waits 2 minutes and then plays the currently recording file (.wtv) in a WPF MediaElement. The problem is that the video visual will freeze and it is not consistent on when it happens. I have looked into it and discovered that the timeline is still moving so the MediaElement still thinks that the video is playing.

This happens only when trying to play a video file that is currently being recorded, previously recorded shows play just fine. Both Media Center and Media Player can play those files without any hiccups; it is only the WPF MediaElement that has this problem. Any help would be appreciated.

Concentric answered 22/4, 2010 at 18:4 Comment(0)
A
1

My guess is that the way the media element works is that it grabs the size of the file it's about to stream at the time you first play it and gets stuck after that. It's just a guess but I have no other information to go off of.

I do know that the MediaElement is really good at switching streams and resuming in those streams. Perhaps there is a work around you can find where every so often it will refresh the stream and resume from it's current position.

Allopatric answered 29/4, 2010 at 15:58 Comment(0)
D
1

This sounds like an MS bug.

You could possible set up an HTTP proxy for the wtv file, then tell the MediaElement to play the stream and not give it the actual size. Its a lot of work but may just work.

Diagnosis answered 14/5, 2010 at 23:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.