The media player can play the WMV, but the tmediaplayer cannot. Why? Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiMultimedia/html/delphi_2006120509535089.html
Compile a video playback software using tmediaplayer,
We originally intended to use a newer twindowsmediaplayer. However, the latter does not support alignclient, that is, it is completely filled and can only be scaled according to the proportion of the original screen. However, tmediaplayer allows the playback screen to be stretched in any proportion. I like this style.
However, tmediaplayer supports too few formats. After I download the WMV format from the Internet using a media player, tmediaplayer can also play the WMV format. I have tried it in 98 and 2000, normal
However, on a Windows professional, the media player can play the video, but the tmediaplayer does not work. I directly called mcisendstring in winmm. DLL to open it,
Check the Registry. There are also mciextensions and MCI. Why?
Will the operating system be reinstalled?
This may be the reason for the operating system, because after the decoder is registered, the basic players can call it.
On
You can import the player that comes with windows to Delphi through import ActiveX, c: \ windows \ system32 \ WMP. dll. This is better than the built-in one.
Use ActiveX controls !! :)
Mediaplayer1.devicetype: = dtautoselect;
You can play the video.
If the DAT file is copied directly on the VCD, add the following to win. ini:
[MCI extensions]
Dat = mpegvideo
If you do not have a WMV, add the following:
WMV = mpegvideo
We recommend that you do not use tmediaplayer or DirectShow to write data. I have been studying how to use DirectShow to write data to the player over the past few days. It is much easier to use than tmediaplayer. But there is a not small problem has not been resolved, refer to the http://community.csdn.net/Expert/topic/5250/5250214.xml? Temp =. 6135218.
By the way, after the tmediaplayer image is scaled, what about the sharpening image?
This is because the quality of the displayrect image is reduced after the displayrect is directly changed, and the image quality is obviously jagged.
Twindowmediaplayer is not as good as twindowmediaplayer.
Agree upstairs
However, twindowsmediaplayer cannot be stretched and can only be scaled in proportion to the original screen.
You 'd better use DirectShow and other technologies to write your own data. If you do not have this knowledge, use the control in Delphi or the mediaplayer control. I know how to enable twindowsmediaplayer to support arbitrary scaling. Contact me.
Email: about521 at 163.com
MSN: cownew@hotmail.com
QQ: 57077490