DVD-Video in a Window (Windows CE 5.0)
The basic player application described in Creating a Simple DVD Player will take keyboard input from your Windows CE device and simply let the output from the DVD-Video renderer appear on its natural output destination.
For most scenarios, this means that the output will appear on a separate television display attached to the Windows CE device.
An application that plays DVD-Video back through a window on the screen of your Windows CE device, hereafter referred to simply as a window, requires additional architectural considerations for both the software and the hardware in your device.
The following illustration shows the architecture for such an application implemented with hardware decoding.
When you are presenting DVD-Video data in a window, the user actually sees two completely separate graphics sources merged together on the screen. The first source is the normal graphics display of your Windows CE device. The second source is the DVD-Video output from your decoder.
With a software decoding solution, the two graphics sources could be said to come from the same place, your device's CPU. No further hardware considerations, other than an uncommonly powerful CPU for an embedded device, are required. With a hardware decoding solution, the two graphics sources come from two different places, the main CPU for the system graphics and the decoding chip for the DVD-Video. As a result, the two sources must be brought together through a physical connection that passes the video data into the device's graphics card.
With the video signal sent to the graphics card on the device, your application can display the output through an overlay surface managed by Microsoft DirectDraw®, which is an API designed to provide high-level programming tools to access low-level capabilities on 2-D graphics hardware, see DirectDraw Application Development.
Specifically, DirectDraw allows your application to control video ports, which are regions of the frame buffer specifically reserved for external video data. Because the data originates from outside of the Windows CE windowing system, one of the challenges in displaying DVD-Video to a window is making sure that the video port and overlay surface correctly align and track with the window.
It could be said that user experience of seeing DVD-Video data inside a window is an illusion. The user is really shown an empty window that happens to have an overlay surface of the correct size sitting on top of it and displaying data from a video port. The DVDSample sample application is an example of this technique.
The issue of making sure that the video overlay correctly coincides with the application window is complicated by the various output formats, such as anamorphic and letterbox, and aspect ratios, such as 4:3 and 16:9, supported by the DVD-Video format.
When designing your application, be careful to account for the content that your application is expected to play back and how it might change through either authored changes, user playback choice, and user manipulation of your application's playback window.
See Also
Advanced DVD Player Application Topics
Send Feedback on this topic to the authors