S
SystemError
Unregistered / Unconfirmed
GUEST, unregistred user!
#pragma once
#ifndef _I_MultiConvert_H_
#define _I_MultiConvert_H_
#include "../Encoder_/Codec/Codec/I_Codec.h"
#include "../Encoder_/Format/Format/I_Format.h"
#include "Plug/Plug.h" //please run PlugTool.exe once when can't include.
//------------------------------------------------------------------------------------------------------------------
#pragma pack(1)
struct ItemInfo
{
WCHAR FilePath[MAX_PATH];
int64 BeginTime;
int64 EndTime;
int input_type;//DVD or sing
WCHAR OutFilePath[MAX_PATH];
//bool IsGetMediaInfo //MediaFileInfo Info;
//以下是DVD或其它多音频文件的东西
bool skip_menu;
int auido_index[64];
int subtitle_index[64];
};
struct StartConvertPar
{
int video_width;
int video_height;
int total_seconds;
int video_total_frames;
};
enum ConvertStat{
Convert_Succeeded,
Convert_Stop,
Convert_GetMediaInfoFailed,
Convert_InitFailed,
Convert_StartFailed,
Convert_NotVideoFound
};
struct I_MultiConvertEvent
{
virtual void __stdcall GetingMediaInfo(LPCWSTR lpcwFilePath) = 0;
virtual void __stdcall SetPosFailed(LPCWSTR lpcwFilePath) = 0;
virtual void __stdcall StartConvert(LPCWSTR InputFile, LPCWSTR OutputFile, StartConvertPar par) = 0;
virtual void __stdcall ConvertFailed(LPCWSTR InputFile, ConvertStat stat) = 0;
virtual void __stdcall ConvertDone(LPCWSTR InputFile, ConvertStat stat) = 0;
};
struct MultiConvertContext
{
HWND hwnd; //预览窗口事件
int* x; //预览位置
int* y; //预览位置
int VideoCodecType; //视频编码类型 dixv, mpeg, wmv...
int AudioCodecType; //音频编码类型 aac, ac3, mp3...
int SubtitleCodecType; //字幕编码类型 src, sub, ass...
int FormatType; //文件合成类型 mkv, avi, asf, mp4...
bool bMark;
};
#pragma pack()
struct I_MultiConvert : public I_Plug
{
virtual bool __stdcall test() = 0;
virtual bool __stdcall InitEvent(I_MultiConvertEvent* event) = 0;
virtual bool __stdcall AddItem(ItemInfo* info) = 0;
virtual bool __stdcall Init(MultiConvertContext context) = 0;
virtual bool __stdcall Start() = 0;
virtual bool __stdcall Stop() = 0;
virtual bool __stdcall GetProgress(int* pos, int* cur_speed, int* avg_speed) = 0;
virtual bool __stdcall Pause() = 0;
virtual bool __stdcall Contiune() = 0;
virtual void __stdcall Preview(bool show, bool realtime) = 0;
};
#endif
这是一个DLL的头文件..我在DELPHI里想调用它,我应该怎么写呢? 希望某位大哥可以给个例子...期盼中...
#ifndef _I_MultiConvert_H_
#define _I_MultiConvert_H_
#include "../Encoder_/Codec/Codec/I_Codec.h"
#include "../Encoder_/Format/Format/I_Format.h"
#include "Plug/Plug.h" //please run PlugTool.exe once when can't include.
//------------------------------------------------------------------------------------------------------------------
#pragma pack(1)
struct ItemInfo
{
WCHAR FilePath[MAX_PATH];
int64 BeginTime;
int64 EndTime;
int input_type;//DVD or sing
WCHAR OutFilePath[MAX_PATH];
//bool IsGetMediaInfo //MediaFileInfo Info;
//以下是DVD或其它多音频文件的东西
bool skip_menu;
int auido_index[64];
int subtitle_index[64];
};
struct StartConvertPar
{
int video_width;
int video_height;
int total_seconds;
int video_total_frames;
};
enum ConvertStat{
Convert_Succeeded,
Convert_Stop,
Convert_GetMediaInfoFailed,
Convert_InitFailed,
Convert_StartFailed,
Convert_NotVideoFound
};
struct I_MultiConvertEvent
{
virtual void __stdcall GetingMediaInfo(LPCWSTR lpcwFilePath) = 0;
virtual void __stdcall SetPosFailed(LPCWSTR lpcwFilePath) = 0;
virtual void __stdcall StartConvert(LPCWSTR InputFile, LPCWSTR OutputFile, StartConvertPar par) = 0;
virtual void __stdcall ConvertFailed(LPCWSTR InputFile, ConvertStat stat) = 0;
virtual void __stdcall ConvertDone(LPCWSTR InputFile, ConvertStat stat) = 0;
};
struct MultiConvertContext
{
HWND hwnd; //预览窗口事件
int* x; //预览位置
int* y; //预览位置
int VideoCodecType; //视频编码类型 dixv, mpeg, wmv...
int AudioCodecType; //音频编码类型 aac, ac3, mp3...
int SubtitleCodecType; //字幕编码类型 src, sub, ass...
int FormatType; //文件合成类型 mkv, avi, asf, mp4...
bool bMark;
};
#pragma pack()
struct I_MultiConvert : public I_Plug
{
virtual bool __stdcall test() = 0;
virtual bool __stdcall InitEvent(I_MultiConvertEvent* event) = 0;
virtual bool __stdcall AddItem(ItemInfo* info) = 0;
virtual bool __stdcall Init(MultiConvertContext context) = 0;
virtual bool __stdcall Start() = 0;
virtual bool __stdcall Stop() = 0;
virtual bool __stdcall GetProgress(int* pos, int* cur_speed, int* avg_speed) = 0;
virtual bool __stdcall Pause() = 0;
virtual bool __stdcall Contiune() = 0;
virtual void __stdcall Preview(bool show, bool realtime) = 0;
};
#endif
这是一个DLL的头文件..我在DELPHI里想调用它,我应该怎么写呢? 希望某位大哥可以给个例子...期盼中...