Article View: borland.public.cppbuilder.multimedia
Article #1289Re: Video size
From: Formentz
Date: Mon, 14 May 2001 12:55
Date: Mon, 14 May 2001 12:55
35 lines
1703 bytes
1703 bytes
Yeah!!
I got it!!
MCI_DGV_RECT_PARMS mdwp;
mciSendCommand(MediaPlayer->DeviceID, MCI_WHERE,
MCI_TEST | MCI_DGV_WHERE_DESTINATION,
(DWORD)&mdwp));
OriginalSize=mdwp.rc;
now to resize the video :
TRect r=Panel1->BoundsRect;
double cWdt=r.Right-r.Left,
cHgt=r.Bottom-r.Top,
sWdt=OriginalSize.Right-OriginalSize.Left,
sHgt=OriginalSize.Bottom-OriginalSize.Top;
TRect dest=Rect(0,0,cWdt,cWdt/sWdt*sHgt);
if(dest.Bottom>cHgt) dest=Rect(0,0,cHgt/sHgt*sWdt,cHgt);
MediaPlayer->DisplayRect=dest;
Ciao
Formentz
"Formentz" <francesco@leotron.com> ha scritto nel messaggio
news:3affc796_1@dnews...
> Hi all,
> how could I get the default width and height of a video, so I can resize
it
> mantaining the right ratio?
> I am using standard TMediaPlayer and the Display is a TPanel.
>
> TIA
> Ciao
> Formentz
>
>
Technical Details
Message-ID:
<3affd521_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.icl.net!colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3affc796_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d0fc,4dc60e07e536b50e X-Google-Attributes: gid10d0fc,public X-Google-ArrivalTime: 2001-05-14 06:09:55 PST From: "Formentz" <francesco@leotron.com> Newsgroups: borland.public.cppbuilder.multimedia References: <3affc796_1@dnews> Subject: Re: Video size Date: Mon, 14 May 2001 14:55:02 +0200 Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 62.122.22.198 Message-ID: <3affd521_2@dnews> X-Trace: dnews 989844769 62.122.22.198 (14 May 2001 05:52:49 -0700) Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.icl.net!colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews