Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TMediaPlayer Fullscreen

1 view
Skip to first unread message

Frank

unread,
Mar 13, 2001, 3:32:46 PM3/13/01
to
use this: (you need a TMediaPlayer and a TPanel Component on your Form,
myFile represents the movie to open!)

With MediaPlayer1 do
begin
filename := myFile;
display := panel1;
open;
displayrect:= rect(0, 0, screen.width, screen.height);
play;
end;

This should play the movie Fullscren
"Haran" <harulia...@hotmail.remove.com> schrieb im Newsbeitrag
news:1103_984598790@haruliah1...
> Hi there,
> How can I get the TMediaPlayer component to playback videos in fullscreen
mode?
> I don't want to set the display rect to the client's screen size because
the playback slows down exponentially.
>
> Thanks,
> Haran
>
>
>


Haran

unread,
Mar 13, 2001, 4:42:32 PM3/13/01
to
Hi Frank,

I tried that solution beforehand, but that's essentially stretching the display rectangle to the client's resolution. However, switch into fullscreen mode is another feature
entirely.

Try this: Change your resolution to 1024 or higher. Then run Window's Media player on an mpeg that's relatively large (320*240). If you maximize vs. hitting alt+enter,
you'll see the difference.

Stretching it causes the renderer to slow down exponentially (ie the higher the res, the higher the frame drop rate). I want to change the screen mode (like screen mode
13 is 320*240*8bit colour I think, back in the Pascal days).
But I was hoping that the TMediaplayer control mimicked the Windows media player where it changes to the highest available fullscreen mode.

(Fullscreen mode is also a requirement for most 3D games, they are generally not accelerated in a window)

I guess it doesn't, and I'm most likely going to have to implement it via Directshow and the Jedi headers.
If anyone has taken this route, I'd love some direction.

Haran

Frank

unread,
Mar 16, 2001, 8:39:18 AM3/16/01
to
Sorry i was too fast with sending the source. The source from the other
Message will cause system hang ups under winNT if you want to play more than
one Movie. This overworked code allows you to play as many Movies as you
like.

procedure TForm1.Button1Click(Sender: TObject);
const longName :pchar ='f:\delphi\eCC Showcase\ANIM1.MPG'; //your complete
FileName
var ret, shortName : Pchar;
err : DWord;
begin
//getting the short Name (8:3) of selected File
shortName := strAlloc(521);
GetShortPathName(longName, shortname, 512);

//Sending a close Command to the MCi.
ret := strAlloc(255);
err := mciSendString(pchar('close movie'), 0, 0, 0);
// no error Check because at the first call there is no MCI device to
close


//open a new MCI Device with the selected movie File;
err := mciSendString(pchar('open '+shortName+' alias movie'), 0, 0, 0);
shortName := nil;
// if an Error was traced then display a MessageBox with the mciError
String
if err<>0 then
begin
mciGetErrorString(err, ret, 255);
messageDlg(ret, mtinformation, [mbok], 0);
end;

//Sending the "play fullscreen Commadn to the windows MCI
err := mciSendString(pchar('play movie fullscreen'), 0, 0, 0);
// if an Error was traced then display a MessageBox with the mciError
String
if err<>0 then
begin
mciGetErrorString(err, ret, 255);
messageDlg(ret, mtinformation, [mbok], 0);
end;
ret := nil;
end;


"Haran" <harulia...@hotmail.remove.com> schrieb im Newsbeitrag

news:1103_984519752@haruliah1...

Haran

unread,
Mar 16, 2001, 2:44:13 PM3/16/01
to
Thank you immensely Frank for your help. This is precisely the solution I was looking for!

Thanks again,
Haran


On Fri, 16 Mar 2001 14:00:14 +0100, "Frank" <amber...@gmx.de> wrote:
> Sorry for the mistake. I thought you'd like to stretch the movie to full
> screen. So I was wrong!
>
> But I have a solution fpr displaying a movie in Fullscreen Mode (as you want
> to). you need to include the mmSystem Unit to run the code, nothing else.
>
>

0 new messages