data-nova
asked on
media player in delphi
I want to play some .wmv files in my program using the mediaplayer component.
now as you know mediaplayer displays the video in the component linked in the DISPLAY property.
in my program i have linked it to a panel.
the problem is that the video's original dimension are 800 x 600 while my panel is half that size.
this causes the video to be displayed only half. is there any way to resize\zoom the video so that it fits on the panel ?
now as you know mediaplayer displays the video in the component linked in the DISPLAY property.
in my program i have linked it to a panel.
the problem is that the video's original dimension are 800 x 600 while my panel is half that size.
this causes the video to be displayed only half. is there any way to resize\zoom the video so that it fits on the panel ?
Some videos dont play in that, I have been looking at the activex control for WMP but that has really limited information avaiable. I'm having a tough time finding info on that as I think thats actually the better component. I wonder if D2006 has improved their media player so that all files will play on it (on D5 there are alot of videos that have problems).
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There's a problem with DisplayRect - if you make it 1000x100, it will show 1000x100 :) even if real video size is 800x600 (so it should show 133x100 instead of 1000x100), so some calculations will be needed to stretch it proportionally. Say if you need some help with this
ASKER
Hi Zhaawz ,
thanks a lot :)
Glad to help ;]
ASKER
but it cuts the movie , is there anyway to zoom it ?
Does it cut? It should stretch (zoom) a movie to specified rectangle (at least it did so when I tried it).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
oh now it works :) Geo was right the code has to be between Open and PLay.
thanks a lot Zhaawz and Geo