Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

media player in borland c++ builder

Status
Not open for further replies.

mironto

Programmer
May 12, 2001
26
SK
Hi, I would like to know how to get movie dimensions when I open file in TMediaPlayer. I want it to display the video in some TPanel and set dimensions for the panel, so it fits the movie dimensions.
I would also want to know how to resize video, because when I set Display anything besides NULL, the video is always 100% and is croped if the display is not big enough.
thanks for tips
 
Here is an example on how to set the size of a TPanel
to movie dimensions.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
if (OpenDialog1->Execute()) {
MediaPlayer1->Display = Panel1;
MediaPlayer1->FileName = OpenDialog1->FileName;

MediaPlayer1->Open();

Panel1->Width = MediaPlayer1->DisplayRect.Right;
Panel1->Height = MediaPlayer1->DisplayRect.Bottom;

MediaPlayer1->Play();
}
}

I don't know how the scale the movie :-(

/Blixten
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top