![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | More than 3 MediaElements Don't Work Hi, I've been toying around with the idea of creating a small 3x3 video wall for a while and tried tonight to get it going. I have a grid that contains 9 small grids in a 3x3 square, and in each grid is a single MediaElement. On the click event of the Grid, the contained MediaElement should start playing the video. When you click on another grid, all other videos pause, and the new one starts playing. That was the theory, in practice, it works up until the 4th video is clicked, then nothing happens. The fourth video doesn't ever even render a black frame at the start, although the previous video does pause. It is always on the 4th video, no matter what order, what speed I try clicking on the grids. Obviously WPF/Avalon is still a way from being finished, but MediaElement does seem rather flaky at the moment. I updated the two files in system32 that I saw was a fix for black screen no audio, and this appears to have worked. But for some reason 3 does seem to be a hard limit that I can't get past, whatever the videos. For reference, instead of simply pausing the videos, I tried Closing them, to see if this would help, it didn't. My secondary question is, once a video has been Closed, how do you start it again? Play() won't work as "the only valid operations on a closed file are Open and Close" (paraphrased from debug output)... but Open doesn't even exist?! In summary, a) Is there something up with more than 3 open MediaElements at once playing Video? b) What is the best way of putting a video on hold while another one plays, Pause? Close then reopen (somehow?)? Many thanks, Adam Miles |
| | #2 (permalink) |
| Guest | RE: More than 3 MediaElements Don't Work > I've been toying around with the idea of creating a small 3x3 video wall for > a while and tried tonight to get it going. I have a grid that contains 9 > small grids in a 3x3 square, and in each grid is a single MediaElement. On > the click event of the Grid, the contained MediaElement should start playing > the video. When you click on another grid, all other videos pause, and the > new one starts playing. This is quite an inefficient way of doing things. You might want to consider grabbing the output of a video and putting it into an image using a RenderTargetBitmap rather than keeping the videos in a paused state. Videos use significant resources even while paused. > That was the theory, in practice, it works up until the 4th video is > clicked, then nothing happens. The fourth video doesn't ever even render a > black frame at the start, although the previous video does pause. It is > always on the 4th video, no matter what order, what speed I try clicking on > the grids. This is a known issue on older versions of Avalon and will be fixed in the Beta 2 release. > Obviously WPF/Avalon is still a way from being finished, but MediaElement > does seem rather flaky at the moment. I updated the two files in system32 > that I saw was a fix for black screen no audio, and this appears to have > worked. But for some reason 3 does seem to be a hard limit that I can't get > past, whatever the videos. You are likely running out of video memory. You could probably get past this limit by upgrading your video card and/or playing videos with lower resolutions. > For reference, instead of simply pausing the videos, I tried Closing them, > to see if this would help, it didn't. My secondary question is, once a video > has been Closed, how do you start it again? Play() won't work as "the only > valid operations on a closed file are Open and Close" (paraphrased from debug > output)... but Open doesn't even exist?! I suppose this is a bit confusing. There is an Open method on MediaPlayer. The analogue for MediaElement is the Source property. Yes, Close is supposed to clean up all resources. This is another bug that will be fixed in the Beta 2 release. > In summary, a) Is there something up with more than 3 open MediaElements at > once playing Video? 3 isn't a magic number, but yes there are problems with multiple videos in previous releases of Avalon. They will be fixed in the Beta 2 release. > b) What is the best way of putting a video on hold while another one plays, > Pause? Close then reopen (somehow?)? Closing is definitely preferable to keeping the video paused in terms of efficiency. If you wish to keep the output of the video then you will have to capture it using a RenderTargetBitmap. Tom |
| | #3 (permalink) |
| Guest | RE: More than 3 MediaElements Don't Work What version of WinFX are you running on? There have been a number of improvements to MediaElement in later builds. Depending on the type of hardware you have, we added software fallback of video starting with Feb CTP. You may just be running out of video memory. Closing and subsequently playing a MediaElement is expected to work, perhaps it is a known bug in the build you are using (we have had some in the past). I would try playing with the LoadedBehavior, UnloadedBehavior, and Source properties to see if you can get it to reopen the file. Ideally, we recommend using as few MediaElements as possible to enable your scenario, as they are a pretty heavy resource. In your scenario, it sounds like you should be able to open all files on a single MediaElement, or perhaps switch between two of them (one plays the current video while the other preloads the next). If all else fails, I would listen to the MediaFailed event and see if there is a useful message there. Thanks, Ed "Adam Miles" wrote: > Hi, > > I've been toying around with the idea of creating a small 3x3 video wall for > a while and tried tonight to get it going. I have a grid that contains 9 > small grids in a 3x3 square, and in each grid is a single MediaElement. On > the click event of the Grid, the contained MediaElement should start playing > the video. When you click on another grid, all other videos pause, and the > new one starts playing. > > That was the theory, in practice, it works up until the 4th video is > clicked, then nothing happens. The fourth video doesn't ever even render a > black frame at the start, although the previous video does pause. It is > always on the 4th video, no matter what order, what speed I try clicking on > the grids. > > Obviously WPF/Avalon is still a way from being finished, but MediaElement > does seem rather flaky at the moment. I updated the two files in system32 > that I saw was a fix for black screen no audio, and this appears to have > worked. But for some reason 3 does seem to be a hard limit that I can't get > past, whatever the videos. > > For reference, instead of simply pausing the videos, I tried Closing them, > to see if this would help, it didn't. My secondary question is, once a video > has been Closed, how do you start it again? Play() won't work as "the only > valid operations on a closed file are Open and Close" (paraphrased from debug > output)... but Open doesn't even exist?! > > In summary, a) Is there something up with more than 3 open MediaElements at > once playing Video? > b) What is the best way of putting a video on hold while another one plays, > Pause? Close then reopen (somehow?)? > > Many thanks, > > Adam Miles |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Still searching for way to get Vista search to work: Why doesn't FilterFilesWithUnknownExtensions registry key work in Vista? | Celegans | Vista General | 11 | 08-31-2007 09:04 AM |
| Some administrator work doesn't work | Rem-8 | Vista General | 4 | 05-19-2007 07:08 AM |
| all cd's don't work, but dvd's still work | Phil | Vista hardware & devices | 2 | 05-18-2007 09:35 AM |
| HP LaserJet 1010 don't work in Vista since Beta2 - Advanced 1384 Printing Support drivers for XP don't work | Alexey | Vista print fax & scan | 2 | 10-18-2006 07:05 PM |
| Will all the programs that work on xp work on vista? | exciter | Vista General | 14 | 10-06-2006 11:40 PM |