How can I play a video File(MPEG and AVI) using DirectX
The Video file will be opened as video and audio streams. The sample application "PlayVideo.zip" shows how to Open and play a video file- Create a Multimedia stream object
- Initialize a Multimedia stream object
- Add primary a video stream.
- Add default a sound render to primary video stream, so sound will be played back automatically.
- Build the filter graph for our multimedia stream.
- Assign a member to temporary stream pointer.
- Add a reference to file
- Get media stream interface
- Get DirectDraw media stream interface
- Create stream sample
- Get DirectDraw surface interface from Sample.
- Get DirectDraw surface7 interface
- Set stream position to zero and set state to playback
- Update sample media stream and blit video to specified rectangular surface. Restore surface if lost.
- Continue updating till the end of the file.
- Cleanup (Set sample state to stop at the end of play)
Sponsored links
Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Check Out IT Certification Preparation Materials
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Six Sigma Certification
100% Online-Six Sigma Certificate from Villanova - Find Out More Now.
100% Online-Six Sigma Certificate from Villanova - Find Out More Now.
SSH and SFTP support for .NET
Add complete SSH and SFTP support to your .NET framework application
Add complete SSH and SFTP support to your .NET framework application
ASP.NET 3.5 Hosting on Windows 2008!
ASP.NET 3.5/2.0 Hosting on Windows 2008 & 2003! AJAX, LINQ, & Silverlight Ready! 3 Mo. Free!!
ASP.NET 3.5/2.0 Hosting on Windows 2008 & 2003! AJAX, LINQ, & Silverlight Ready! 3 Mo. Free!!
