Is there a re-distribuatable files list for ActiveMovie? Are there
legal restrictions involved in doing such a thing? Is there another
possible solution for playing .mpg files from Delphi?
Getting a fix for MediaPlayer would be the easiest thing if I cannot
place the ActiveMovie files into my installation.
Thanks,
Dennis
"It looks like the filename is mandatory under D4 when AutoOpen is set to
true. This is contrary to the way it worked under D3 and also contrary
to the documentation which states
"If AutoOpen is True, the media player attempts to open the multimedia
device specified by the DeviceType property (or FileName if DeviceType
is dtAutoSelect) when the form containing the media player component is
created at runtime. "
To fix this you need to add two lines to the MPlayer.pas file and
include your new file into the project.
line 820
OpenParm.lpstrElementName := PChar(FElementName);
change to
if FElementName <> '' then
OpenParm.lpstrElementName := PChar(FElementName);
and line 835
FFlags := FFlags or mci_Open_Element;
change to
if FElementName <> '' then
FFlags := FFlags or mci_Open_Element;
I would put the new MPlayer.pas in your project directory and add the
pas file to your project so it will use the changed one over the D4
packaged one."
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Mild mannered supermen are held in kryptonite, and the wise and foolish
virgins giggle with their bodies glowing bright. Through the door a harvest
feast is lit by candlelight; it's the bottom of the staircase that spirals out
of sight.
(new classic Genesis) Carpet Crawlers 1999
--
I tried using the ActiveMovie component and everything worked fine. This component
has a ReadyState property that you can check while it is loading the file. You can't
try to play it until it is ready to go. Is there a similar mechanism with Media
Player? I need it to find the file and load it instead of imediately returning with
the cannot open file error.
Thanks,
Dennis
Changes made to mplayer.pas. Error unchanged.
Here's the code:
procedure TForm1.Button1Click(Sender: TObject);
begin
If OpenDialog1.Execute Then
Begin
MediaPlayer1.FileName := OpenDialog1.FileName;
MediaPlayer1.Open;
End;
end;
I know the file name is valid here. It works great if the .mpg file is on the
hard drive, but when the file is on a CD-ROM I get "MMSYSTEM275 Cannot find
specified file. Make sure the path & filename are correct." This is on a PII 400
with Win 98.
On another computer I get "MMSYSTEM277 a problem occurred initializing MCI. Try
restarting Windows." This is on a P133 Notebook running Windows 95. Does this
mean that this computer cannot play .mpg files? What needs to be added to the
computer for it to handle .mpg files? Is there a way to update the mmsystem.dll?
Thanks for your help,
Dennis
In your case there are several properties that may have relevance. First
the Notify property will generate OnNotify events if it is set to true.
The NotifyValue property will then return the last notify events result.
This taken in conjunction with the Mode property should do what you
want. I would think that the Mode property will be mpNotReady while the
mpg is loading.
Dennis Palmer wrote:
>
> I know the file name is valid here. It works great if the .mpg file is on the
> hard drive, but when the file is on a CD-ROM I get "MMSYSTEM275 Cannot find
> specified file. Make sure the path & filename are correct." This is on a PII 400
> with Win 98.
>
If you have a small demo program of this e-mail me and I'll look at it.
> On another computer I get "MMSYSTEM277 a problem occurred initializing MCI. Try
> restarting Windows." This is on a P133 Notebook running Windows 95. Does this
> mean that this computer cannot play .mpg files? What needs to be added to the
> computer for it to handle .mpg files? Is there a way to update the mmsystem.dll?
>
Try updating the media player on this machine. That is probably the problem on
this one (it should at least be getting the same message as the first machine).
Also you might need to update to the latest comctl32.dll. you can find that at
http://www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp.
> Thanks for your help,
> Dennis
>
--