Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #1  
Old 16-09-2020, 12:49
Cuttlas's Avatar
Cuttlas Cuttlas is offline
Registered User
 
Join Date: Aug 2020
Location: Near You :)
Posts: 56
Thanks: 19
Thanked 8 Times in 4 Posts
Cuttlas is on a distinguished road
Exclamation Play Video Before Welcome Page

Is there any way to play a video before the welcome page and it cover the whole area without any button and when the video finished, it automatically goes to the welcome page?

Reply With Quote
Sponsored Links
  #2  
Old 16-09-2020, 13:04
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 800
Thanks: 1,318
Thanked 1,709 Times in 580 Posts
Cesar82 is on a distinguished road
Yes, you can create a custom form for the video and use ShowModal.

Which library will you play the video with?
You have to use the callback at the end of the video playback to close the CustomForm and then the welcome page will be displayed automatically.
Reply With Quote
  #3  
Old 16-09-2020, 13:13
Cuttlas's Avatar
Cuttlas Cuttlas is offline
Registered User
 
Join Date: Aug 2020
Location: Near You :)
Posts: 56
Thanks: 19
Thanked 8 Times in 4 Posts
Cuttlas is on a distinguished road
Smile

I'm new to inno setup and I'm discovering the ideas.

Could you please provide a script?
The library deos not matter, I just want to play mp4 files.
Reply With Quote
  #4  
Old 03-10-2020, 13:33
DiCaPrIo DiCaPrIo is offline
Registered User
 
Join Date: Apr 2017
Location: Don't Know
Posts: 50
Thanks: 90
Thanked 49 Times in 30 Posts
DiCaPrIo is on a distinguished road
HTML Code:
[Setup]
AppName=Inno Setup Multimedia Library
AppVersion=2.0
CreateAppDir=no
OutputDir=.\

[Files]
Source: ISMediaLib.dll; Flags: dontcopy

[Code]
type
  TDXPlayerState = (DXUninitialized, DXInitialized, DXPlaying, DXPaused, DXStoped);
  TDirectShowEventProc = procedure(EventCode, Param1, Param2: Integer; State: TDXPlayerState);

function MLibGetL:integer; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
function MLibGetT:integer; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
function MLibGetW:integer; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
function MLibGetH:integer; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
function MLibGetVolume:Longint; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
function MLibGetBalance:Longint; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
function MLibGetCurTime:double; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
function MLibGetMaxTime:double; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
function MLibGetVisibility:Boolean; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
procedure MLibAddVideo(WindowHandle: HWND; FileName: PAnsiChar; Left, Top, Width, Height: Integer; Callback: TDirectShowEventProc); external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
procedure MLibSetPosition(Left, Top, Width, Height: Integer); external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
procedure MLibFree; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
function MLibInit: Boolean; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
procedure MLibPlay; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
procedure MLibStop; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
procedure MLibPause; external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
procedure MLibSetVolume(Volume: LongInt); external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
procedure MLibSetBalance(Balance: LongInt); external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
procedure MLibSetCurTime(llTime: double); external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
procedure MLibSetVisibility(Visible: Boolean); external '[email protected]{tmp}\ISMediaLib.dll stdcall delayload';
////////////////////////////////////////////////////////////////////////////
function FillRect(hDC: THandle; const lprc: TRect; hbr: THandle): Integer; external '[email protected] stdcall';
function GetClientRect(hWnd: HWND; var lpRect: TRect): BOOL; external '[email protected] stdcall';
function CreateSolidBrush(p1: TColor): THandle;external '[email protected] stdcall';
function SetLayeredWindowAttributes(hwnd:HWND; crKey:Longint; bAlpha:byte; dwFlags:longint ):longint;
  external '[email protected] stdcall';
function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint;
  external '[email protected] stdcall';
function GetWindowLong(Wnd: HWnd; Index: Integer): Longint; external '[email protected] stdcall';
function SetWindowPos(hWnd, hWndInsertAfter, X, Y, cx, cy, wFlags: Longint):Boolean;
  external '[email protected] stdcall';
////////////////////////////////////////////////////////////////////////////
procedure Cback(EventCode, Param1, Param2: Integer; State: TDXPlayerState);
begin
  if EventCode = $01 then MLibSetCurTime(0);
end;

procedure MFPaint(Sender: TObject);
var
R:TRect;
begin
GetClientRect(MainForm.Handle,R);
FillRect(MainForm.Canvas.Handle,R,CreateSolidBrush($80000));
end;

procedure WFMoved(Sender: TObject);
begin
  SetWindowPos(MainForm.Handle,0,WizardForm.Left,WizardForm.Top,0,0,$515);
end;

function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('ISMediaLib.dll');
result:=MLibInit;
end;

procedure InitializeWizard;
begin
WizardForm.Color:= $80000;
WizardForm.OuterNotebook.Hide;
WizardForm.InnerNotebook.Hide;
MainForm.Width:=WizardForm.Width;
MainForm.Height:=WizardForm.Height;
MainForm.BorderStyle:=WizardForm.BorderStyle;
MainForm.OnPaint:[email protected];
SetWindowLong(WizardForm.Handle, -20, GetWindowLong(WizardForm.Handle, -20) or $00080000);
SetLayeredWindowAttributes(WizardForm.Handle, WizardForm.Color, 0, 1);
MLibAddVideo(MainForm.Handle, ExpandConstant('{src}\Video.avi'), 0, 0, MainForm.Width, MainForm.Width ,@Cback);
MainForm.Show;
with TTImer.Create(WizardForm) do begin
   OnTimer:[email protected];
   Interval:=1;
end;
end;


procedure CurPageChanged(CurPageID: Integer);
begin
  MLibSetVisibility(False)
  case CurPageID of
    wpWelcome:
    begin
       MLibSetVisibility(True);
       MLibPlay;
    end;
    wpSelectDir:
    MLibStop
  end;
end;

procedure DeinitializeSetup;
begin
  MLibFree;
end;
Reply With Quote
The Following User Says Thank You to DiCaPrIo For This Useful Post:
Cuttlas (03-10-2020)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anno 1701 won't load, just get a blue screen! Shadow22 General Gaming 5 28-08-2012 12:52
Help choosing an mp3 player ikermalli Media Players 8 22-08-2010 23:15
weird error.... sheykh PC Games 5 07-05-2006 20:23
How do you play Video files mpegs Etc on the DREAMcast Anyone plez? krazeyK DC Games 1 17-12-2001 20:06



All times are GMT -7. The time now is 23:51.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com