本文介绍了视频文件(阿尔法)作为启动画面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在正在寻找相当长的一段延期的创新安装使用视频文件,例如AVI或者一个巴纽序列作为启动画面为我安装(Alpha通道的使用将是一个巨大的优势,但不是必须有)。
有几个.dll文件的使用静态照片使用淡入和淡出,但我无法找到任何东西作为用于此目的的视频文件来使用。

I'm searching for quite a while now for an extension for Inno Setup to use a video file, for example an AVI or maybe a .png sequence as a splash-screen for my installation (the usage of an alpha channel would be a HUGE plus but is not a must have).There are several .dll's to use static pictures with a fade-in and fade-out but I couldn't find anything to use as video file for that purpose.

据我知道,我可以用任何一种.DLL与Inno Setup的。例如,我可以使用音频播放流行bass.dll即使它有没有真正的应用创新的支持,但创新科技可以调用.dll文件的功能。

As far as I know, I can use any kind of .dll with Inno Setup. For example I can use the popular bass.dll for audio playback even though it has no "real" Inno support but Inno can call the functions of that .dll.

那么,有没有计划在那里,让我做到这一点?
在这个方向的任何提示将是非常有益的。

So is there any program out there that would allow me to do this?Any tip in that direction would be very helpful.

编辑:这是可能的使用Qt,我知道你可以让这些人恰恰是基于帧为您的应用闪屏,但我不知道是否有可能使用Qt Inno Setup的

This may be possible with Qt, I know you can make exactly those frame based splash-screens for your applications but I'm not sure if it's possible to use Qt with Inno Setup?

推荐答案

我已经建立了的项目,它能够嵌入视频和音频播放到InnoSetup向导。它基于技术,至少需要DirectX 9的使用。

I have founded the Inno Media Player project which is able to embed the video and audio playback into the InnoSetup wizard. It is based on DirectShow technology and requires at least DirectX 9 to use.

内置格式 它支持所有的DirectShow codeCS,但你应该考虑你的目标用户并不需要有一些异国情调的媒体格式codeCS并安装codeC只是因为节目在安装的启动将是一个矫枉过正和不公平的用户。

Except built-in formats it supports all DirectShow codecs, but you should consider that your target users doesn't need to have codecs for some exotic media formats and install them codec just because of the show at the installation startup would be an overkill and unfair to user.

关于你想有,如果​​你发现支持这一点,我们可以尝试让弹出窗口透明,让一个分层的窗口中的DirectShow渲染平局codeC的透明度,但没有codeC和样本的视频,我不能什么都不做。

About the transparency you wanted to have, if you find the codec that supports that, we can try to make the popup window transparent and let the DirectShow renderer draw on a layered window, but without the codec and a sample video I can't do nothing.


  • 与示例脚本库,你可以在源后备箱找到或下载​​它的

  • 我写了一个简单的在这里你可以找到函数的参数说明

因此​​,为了显示与视频播放的弹出窗口显示向导的形式,然后才能使用以下内容:

So to show a popup window with the video playback before the wizard form is displayed you can use the following:

请注意,汇创媒体播放器是一个统一code库,所以你只能单向code InnoSetup版本使用它,而不是与ANSI的!没有为InnoSetup的ANSI版本...!

Please note, that Inno Media Player is a Unicode library, and so you can use it only with Unicode versions of InnoSetup, not with ANSI ones! There is no support for ANSI versions of InnoSetup...!

[Setup]
AppName=Media Player Project
AppVersion=1.0
DefaultDirName={pf}\Media Player Project

[Files]
Source: "MediaPlayer.dll"; Flags: dontcopy

[Code]
const
  EC_COMPLETE = $01;

type
  TDirectShowEventProc = procedure(EventCode, Param1, Param2: Integer);

function DSPlayMediaFile: Boolean;
  external 'DSPlayMediaFile@files:mediaplayer.dll stdcall';
function DSStopMediaPlay: Boolean;
  external 'DSStopMediaPlay@files:mediaplayer.dll stdcall';
function DSInitializeVideoFile(FileName: WideString; WindowHandle: HWND;
  var Width, Height: Integer; CallbackProc: TDirectShowEventProc): Boolean;
  external 'DSInitializeVideoFile@files:mediaplayer.dll stdcall';

var
  VideoForm: TSetupForm;

procedure OnMediaPlayerEvent(EventCode, Param1, Param2: Integer);
begin
  if EventCode = EC_COMPLETE then
    VideoForm.Close;
end;

procedure OnVideoFormShow(Sender: TObject);
begin
  DSPlayMediaFile;
end;

procedure OnVideoFormClose(Sender: TObject; var Action: TCloseAction);
begin
  DSStopMediaPlay;
end;

procedure InitializeWizard;
var
  Width: Integer;
  Height: Integer;
begin
  VideoForm := CreateCustomForm;
  VideoForm.Caption := 'Popup Video Window';
  VideoForm.BorderStyle := bsNone;
  VideoForm.FormStyle := fsStayOnTop;
  VideoForm.Position := poScreenCenter;
  VideoForm.OnShow := @OnVideoFormShow;
  VideoForm.OnClose := @OnVideoFormClose;

  if DSInitializeVideoFile('d:\Video.avi', VideoForm.Handle, Width,
    Height, @OnMediaPlayerEvent)
  then
  begin
    VideoForm.ClientWidth := Width;
    VideoForm.ClientHeight := Height;
    VideoForm.ShowModal;
  end;
end;

procedure DeinitializeSetup;
begin
  DSStopMediaPlay;
end;

希望它能帮助!

这篇关于视频文件(阿尔法)作为启动画面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 00:17