怎样使用helixproducer 10 sdk(RealProducer 10) 开发一个rm压缩工具(100分)

  • 主题发起人 主题发起人 飞扬的花瓣
  • 开始时间 开始时间

飞扬的花瓣

Unregistered / Unconfirmed
GUEST, unregistred user!
之前的RealProducer 8的我会用,但是10的sdk的接口不一样,没有了inputfilename的接口,只有个jobfilename接口,还要麻烦的创建xml文件。有些难度;希望有兴趣的讨论一下
因为经常录制电视节目,用豪杰的视频转换后不能播放,RealProducer 11吧超级的慢,居然也是没有图像或只有前面有图像。所以想自己开发gui
 
unit HelixProducerLib_TLB;

// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
// Type Library. If this type library is explicitly or indirectly (via
// another type library referring to this type library) re-imported, or the
// 'Refresh' command of the Type Library Editor activated while editing the
// Type Library, the contents of this file will be regenerated and all
// manual modifications will be lost.
// ************************************************************************ //

// PASTLWTR : 1.2
// File generated on 2006-2-3 21:12:44 from Type Library described below.

// ************************************************************************ //
// Type Lib: I:/视频转换工具/helixproducersdk_aac__10_windows/producersdk/bin/helixprodctrl.dll (1)
// LIBID: {BE746EB1-6F27-47D9-BA6D-313633547328}
// LCID: 0
// Helpfile:
// HelpString: helix.producer
// DepndLst:
// (1) v2.0 stdole, (C:/WINDOWS/system32/STDOLE2.TLB)
// Errors:
// Error creating palette bitmap of (THelixProducer) : Error reading control bitmap
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, OleCtrls, OleServer, StdVCL, Variants;



// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:
// Type Libraries : LIBID_xxxx
// CoClasses : CLASS_xxxx
// DISPInterfaces : DIID_xxxx
// Non-DISP interfaces: IID_xxxx
// *********************************************************************//
const
// TypeLibrary Major and minor versions
HelixProducerLibMajorVersion = 1;
HelixProducerLibMinorVersion = 0;

LIBID_HelixProducerLib: TGUID = '{BE746EB1-6F27-47D9-BA6D-313633547328}';

DIID__IProducerCtrlEvents: TGUID = '{31801344-51A5-4CFB-B5B2-255341F1377E}';
IID_IDuration: TGUID = '{99A69374-E4A2-4609-8F04-1B0B53325FFC}';
IID_IProducerCtrl: TGUID = '{D5D9D0A5-4E61-489D-BE07-7A16674D9895}';
CLASS_HelixProducer: TGUID = '{66F8592D-33E8-11D7-8A24-00045A785B71}';
CLASS_HelixDuration: TGUID = '{80F6E410-210B-454C-B523-97D7C2541FF3}';

// *********************************************************************//
// Declaration of Enumerations defined in Type Library
// *********************************************************************//
// Constants for enum eProducerCrtlEventType
type
eProducerCrtlEventType = TOleEnum;
const
hxEventTwoPassAnalysisStarted = $00000002;
hxEventTwoPassAnalysisFinished = $00000003;
hxEventTwoPassEncodingUsingAnalysisStarted = $00000004;
hxEventTwoPassEncodingUsingAnalysisFinished = $00000005;
hxEventEncodeProgress = $00000006;
hxEventAnalysisProgress = $00000007;
hxEventInputStarted = $00000064;
hxEventInputFinished = $00000065;
hxEventInputError = $00000066;
hxEventDestinationStarted = $00000078;
hxEventDestinationMergeProgress = $00000079;
hxEventDestinationFinished = $0000007A;
hxEventDestinationError = $0000007B;
hxEventDestinationCanceled = $0000007C;
hxEventDestinationBroadcasting = $0000007D;
hxEventDestinationReconnecting = $0000007E;
hxEventDestinationListening = $0000007F;

// Constants for enum eLogCategory
type
eLogCategory = TOleEnum;
const
hxLogCategoryErrors = $00000000;
hxLogCategoryWarning = $00000001;
hxLogCategoryInfo = $00000002;
hxLogCategoryDiagnostic = $00000003;

// Constants for enum eEnumerationType
type
eEnumerationType = TOleEnum;
const
hxAudiences = $00000000;
hxServers = $00000001;
hxAudioDevices = $00000002;
hxVideoDevices = $00000003;

// Constants for enum eRMEventType
type
eRMEventType = TOleEnum;
const
hxEventTypeURL = $00000000;
hxEventTypeTitle = $00000001;
hxEventTypeAuthor = $00000002;
hxEventTypeCopyright = $00000003;

type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary
// *********************************************************************//
_IProducerCtrlEvents = dispinterface;
IDuration = interface;
IDurationDisp = dispinterface;
IProducerCtrl = interface;
IProducerCtrlDisp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library
// (NOTE: Here we map each CoClass to its Default Interface)
// *********************************************************************//
HelixProducer = IProducerCtrl;
HelixDuration = IDuration;


// *********************************************************************//
// DispIntf: _IProducerCtrlEvents
// Flags: (4096) Dispatchable
// GUID: {31801344-51A5-4CFB-B5B2-255341F1377E}
// *********************************************************************//
_IProducerCtrlEvents = dispinterface
['{31801344-51A5-4CFB-B5B2-255341F1377E}']
procedure OnJobStarted;
dispid 1;
procedure OnJobDone;
dispid 2;
procedure OnEvent(eEventType: eProducerCrtlEventType;
const bstrEventXMLInfo: WideString;

const bstrMoreInfo: WideString);
dispid 3;
procedure OnLogMessage(lMessageNumber: Integer;
const bstrMessageString: WideString;

TimeStamp: TDateTime;
eLogCategory: eLogCategory);
dispid 4;
procedure OnProgress(eEventType: eProducerCrtlEventType;
lPercentProgress: Integer;

lfTimeInSeconds:do
uble;
const bstrProgressXMLInfo: WideString);
dispid 5;
end;


// *********************************************************************//
// Interface: IDuration
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {99A69374-E4A2-4609-8F04-1B0B53325FFC}
// *********************************************************************//
IDuration = interface(IDispatch)
['{99A69374-E4A2-4609-8F04-1B0B53325FFC}']
procedure SetDuration(ldays: Integer;
lhrs: Integer;
lmins: Integer;
lfsecs:do
uble);
safecall;
function Get_Days: Integer;
safecall;
procedure Set_Days(pVal: Integer);
safecall;
function Get_Hours: Integer;
safecall;
procedure Set_Hours(pVal: Integer);
safecall;
function Get_Minutes: Integer;
safecall;
procedure Set_Minutes(pVal: Integer);
safecall;
function Get_Seconds:do
uble;
safecall;
procedure Set_Seconds(pVal:do
uble);
safecall;
procedure AddDuration(ldays: Integer;
lhrs: Integer;
lmins: Integer;
lfsecs:do
uble);
safecall;
procedure AddSeconds(lfSeconds:do
uble);
safecall;
procedure AddMinutes(lMinutes: Integer);
safecall;
procedure AddHours(lHours: Integer);
safecall;
procedure AddDays(ldays: Integer);
safecall;
function GetDurationAsString: WideString;
safecall;
property Days: Integer read Get_Days write Set_Days;
property Hours: Integer read Get_Hours write Set_Hours;
property Minutes: Integer read Get_Minutes write Set_Minutes;
property Seconds:do
uble read Get_Seconds write Set_Seconds;
end;


// *********************************************************************//
// DispIntf: IDurationDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {99A69374-E4A2-4609-8F04-1B0B53325FFC}
// *********************************************************************//
IDurationDisp = dispinterface
['{99A69374-E4A2-4609-8F04-1B0B53325FFC}']
procedure SetDuration(ldays: Integer;
lhrs: Integer;
lmins: Integer;
lfsecs:do
uble);
dispid 1;
property Days: Integer dispid 2;
property Hours: Integer dispid 3;
property Minutes: Integer dispid 4;
property Seconds:do
uble dispid 5;
procedure AddDuration(ldays: Integer;
lhrs: Integer;
lmins: Integer;
lfsecs:do
uble);
dispid 6;
procedure AddSeconds(lfSeconds:do
uble);
dispid 7;
procedure AddMinutes(lMinutes: Integer);
dispid 8;
procedure AddHours(lHours: Integer);
dispid 9;
procedure AddDays(ldays: Integer);
dispid 10;
function GetDurationAsString: WideString;
dispid 11;
end;


// *********************************************************************//
// Interface: IProducerCtrl
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {D5D9D0A5-4E61-489D-BE07-7A16674D9895}
// *********************************************************************//
IProducerCtrl = interface(IDispatch)
['{D5D9D0A5-4E61-489D-BE07-7A16674D9895}']
function Get_VersionString: WideString;
safecall;
function Get_MajorVersion: Integer;
safecall;
function Get_MinorVersion: Integer;
safecall;
function Get_JobDuration:do
uble;
safecall;
function Get_ElapsedDuration:do
uble;
safecall;
function Get_JobStartTime:do
uble;
safecall;
function Get_IsRunning: WordBool;
safecall;
function Get_IsReady: WordBool;
safecall;
function Get_JobFilename: WideString;
safecall;
procedure Set_JobFilename(const pbstrJobFilename: WideString);
safecall;
function Get_JobXMLString: WideString;
safecall;
procedure Set_JobXMLString(const pbstrJobXML: WideString);
safecall;
function Get_AudioGain:do
uble;
safecall;
procedure Set_AudioGain(pVal:do
uble);
safecall;
procedure StartJob;
safecall;
procedure StopJob;
safecall;
procedure CancelJob;
safecall;
procedure ReleaseResources;
safecall;
function GetAudioDevices: OleVariant;
safecall;
function GetVideoDevices: OleVariant;
safecall;
function GetAudioDeviceDialogNames(ulDeviceID: Integer): OleVariant;
safecall;
function GetVideoDeviceDialogNames(ulDeviceID: Integer): OleVariant;
safecall;
procedure LoadAudioDeviceDialog(ulDeviceID: Integer;
const bstrDialogName: WideString);
safecall;
procedure LoadVideoDeviceDialog(ulDeviceID: Integer;
const bstrDialogName: WideString);
safecall;
function Get_LogFilename: WideString;
safecall;
procedure Set_LogFilename(const pbstrLogFilename: WideString);
safecall;
function Get_LogFileCategory: WideString;
safecall;
procedure Set_LogFileCategory(const pbstrLogFileCategory: WideString);
safecall;
function Get_LogEventsCategory: WideString;
safecall;
procedure Set_LogEventsCategory(const pbstrEventsCategory: WideString);
safecall;
function Get_DoLogEvents: WordBool;
safecall;
procedure Set_DoLogEvents(pbLogEvents: WordBool);
safecall;
procedure FlushLog;
safecall;
function Get_TempDirectory: WideString;
safecall;
procedure Set_TempDirectory(const pbstrTempDirectory: WideString);
safecall;
function Get_AudiencesDirectory: WideString;
safecall;
procedure Set_AudiencesDirectory(const pbAudienceDirectory: WideString);
safecall;
function Get_ServersDirectory: WideString;
safecall;
procedure Set_ServersDirectory(const pbstrServerDirectory: WideString);
safecall;
function Get_CodecMappingFilename: WideString;
safecall;
procedure Set_CodecMappingFilename(const pVal: WideString);
safecall;
function GetAudiences: OleVariant;
safecall;
function GetServers: OleVariant;
safecall;
function GetSystemConfig(eEnType: eEnumerationType): OleVariant;
safecall;
function Get_EnableRealMediaEvents: WordBool;
safecall;
procedure Set_EnableRealMediaEvents(pbEnableRealMediaEvents: WordBool);
safecall;
procedure AddCustomRealMediaEvent(const bstrEventName: WideString;

const bstrEventValue: WideString;
lfStartTimeInSecs:do
uble;

lfDurationInSecs:do
uble);
safecall;
procedure AddRealMediaEvent(RMEventType: eRMEventType;
const bstrEventValue: WideString;

lfStartTimeInSecs:do
uble;
lfDurationInSecs:do
uble);
safecall;
property VersionString: WideString read Get_VersionString;
property MajorVersion: Integer read Get_MajorVersion;
property MinorVersion: Integer read Get_MinorVersion;
property JobDuration:do
uble read Get_JobDuration;
property ElapsedDuration:do
uble read Get_ElapsedDuration;
property JobStartTime:do
uble read Get_JobStartTime;
property IsRunning: WordBool read Get_IsRunning;
property IsReady: WordBool read Get_IsReady;
property JobFilename: WideString read Get_JobFilename write Set_JobFilename;
property JobXMLString: WideString read Get_JobXMLString write Set_JobXMLString;
property AudioGain:do
uble read Get_AudioGain write Set_AudioGain;
property LogFilename: WideString read Get_LogFilename write Set_LogFilename;
property LogFileCategory: WideString read Get_LogFileCategory write Set_LogFileCategory;
property LogEventsCategory: WideString read Get_LogEventsCategory write Set_LogEventsCategory;
propertydo
LogEvents: WordBool read Get_DoLogEvents write Set_DoLogEvents;
property TempDirectory: WideString read Get_TempDirectory write Set_TempDirectory;
property AudiencesDirectory: WideString read Get_AudiencesDirectory write Set_AudiencesDirectory;
property ServersDirectory: WideString read Get_ServersDirectory write Set_ServersDirectory;
property CodecMappingFilename: WideString read Get_CodecMappingFilename write Set_CodecMappingFilename;
property EnableRealMediaEvents: WordBool read Get_EnableRealMediaEvents write Set_EnableRealMediaEvents;
end;


// *********************************************************************//
// DispIntf: IProducerCtrlDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {D5D9D0A5-4E61-489D-BE07-7A16674D9895}
// *********************************************************************//
IProducerCtrlDisp = dispinterface
['{D5D9D0A5-4E61-489D-BE07-7A16674D9895}']
property VersionString: WideString readonly dispid 1;
property MajorVersion: Integer readonly dispid 2;
property MinorVersion: Integer readonly dispid 3;
property JobDuration:do
uble readonly dispid 4;
property ElapsedDuration:do
uble readonly dispid 5;
property JobStartTime:do
uble readonly dispid 6;
property IsRunning: WordBool readonly dispid 7;
property IsReady: WordBool readonly dispid 8;
property JobFilename: WideString dispid 9;
property JobXMLString: WideString dispid 10;
property AudioGain:do
uble dispid 11;
procedure StartJob;
dispid 12;
procedure StopJob;
dispid 13;
procedure CancelJob;
dispid 14;
procedure ReleaseResources;
dispid 15;
function GetAudioDevices: OleVariant;
dispid 16;
function GetVideoDevices: OleVariant;
dispid 17;
function GetAudioDeviceDialogNames(ulDeviceID: Integer): OleVariant;
dispid 18;
function GetVideoDeviceDialogNames(ulDeviceID: Integer): OleVariant;
dispid 19;
procedure LoadAudioDeviceDialog(ulDeviceID: Integer;
const bstrDialogName: WideString);
dispid 20;
procedure LoadVideoDeviceDialog(ulDeviceID: Integer;
const bstrDialogName: WideString);
dispid 21;
property LogFilename: WideString dispid 22;
property LogFileCategory: WideString dispid 23;
property LogEventsCategory: WideString dispid 24;
propertydo
LogEvents: WordBool dispid 25;
procedure FlushLog;
dispid 26;
property TempDirectory: WideString dispid 27;
property AudiencesDirectory: WideString dispid 28;
property ServersDirectory: WideString dispid 29;
property CodecMappingFilename: WideString dispid 30;
function GetAudiences: OleVariant;
dispid 31;
function GetServers: OleVariant;
dispid 32;
function GetSystemConfig(eEnType: eEnumerationType): OleVariant;
dispid 33;
property EnableRealMediaEvents: WordBool dispid 34;
procedure AddCustomRealMediaEvent(const bstrEventName: WideString;

const bstrEventValue: WideString;
lfStartTimeInSecs:do
uble;

lfDurationInSecs:do
uble);
dispid 35;
procedure AddRealMediaEvent(RMEventType: eRMEventType;
const bstrEventValue: WideString;

lfStartTimeInSecs:do
uble;
lfDurationInSecs:do
uble);
dispid 36;
end;



// *********************************************************************//
// OLE Control Proxy class declaration
// Control Name : THelixProducer
// Help String : HelixProducerCtrl Class
// Default Interface: IProducerCtrl
// Def. Intf. DISP? : No
// Event Interface: _IProducerCtrlEvents
// TypeFlags : (2) CanCreate
// *********************************************************************//
THelixProducerOnEvent = procedure(ASender: TObject;
eEventType: eProducerCrtlEventType;

const bstrEventXMLInfo: WideString;

const bstrMoreInfo: WideString) of object;
THelixProducerOnLogMessage = procedure(ASender: TObject;
lMessageNumber: Integer;

const bstrMessageString: WideString;

TimeStamp: TDateTime;

eLogCategory: eLogCategory) of object;
THelixProducerOnProgress = procedure(ASender: TObject;
eEventType: eProducerCrtlEventType;

lPercentProgress: Integer;

lfTimeInSeconds:do
uble;

const bstrProgressXMLInfo: WideString) of object;

THelixProducer = class(TOleControl)
private
FOnJobStarted: TNotifyEvent;
FOnJobDone: TNotifyEvent;
FOnEvent: THelixProducerOnEvent;
FOnLogMessage: THelixProducerOnLogMessage;
FOnProgress: THelixProducerOnProgress;
FIntf: IProducerCtrl;
function GetControlInterface: IProducerCtrl;
protected
procedure CreateControl;
procedure InitControlData;
override;
public
procedure StartJob;
procedure StopJob;
procedure CancelJob;
procedure ReleaseResources;
function GetAudioDevices: OleVariant;
function GetVideoDevices: OleVariant;
function GetAudioDeviceDialogNames(ulDeviceID: Integer): OleVariant;
function GetVideoDeviceDialogNames(ulDeviceID: Integer): OleVariant;
procedure LoadAudioDeviceDialog(ulDeviceID: Integer;
const bstrDialogName: WideString);
procedure LoadVideoDeviceDialog(ulDeviceID: Integer;
const bstrDialogName: WideString);
procedure FlushLog;
function GetAudiences: OleVariant;
function GetServers: OleVariant;
function GetSystemConfig(eEnType: eEnumerationType): OleVariant;
procedure AddCustomRealMediaEvent(const bstrEventName: WideString;

const bstrEventValue: WideString;
lfStartTimeInSecs:do
uble;

lfDurationInSecs:do
uble);
procedure AddRealMediaEvent(RMEventType: eRMEventType;
const bstrEventValue: WideString;

lfStartTimeInSecs:do
uble;
lfDurationInSecs:do
uble);
property ControlInterface: IProducerCtrl read GetControlInterface;
property DefaultInterface: IProducerCtrl read GetControlInterface;
property VersionString: WideString index 1 read GetWideStringProp;
property MajorVersion: Integer index 2 read GetIntegerProp;
property MinorVersion: Integer index 3 read GetIntegerProp;
property JobDuration:do
uble index 4 read GetDoubleProp;
property ElapsedDuration:do
uble index 5 read GetDoubleProp;
property JobStartTime:do
uble index 6 read GetDoubleProp;
property IsRunning: WordBool index 7 read GetWordBoolProp;
property IsReady: WordBool index 8 read GetWordBoolProp;
published
property Anchors;
property TabStop;
property Align;
property DragCursor;
property DragMode;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property TabOrder;
property Visible;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnStartDrag;
property JobFilename: WideString index 9 read GetWideStringProp write SetWideStringProp stored False;
property JobXMLString: WideString index 10 read GetWideStringProp write SetWideStringProp stored False;
property AudioGain:do
uble index 11 read GetDoubleProp write SetDoubleProp stored False;
property LogFilename: WideString index 22 read GetWideStringProp write SetWideStringProp stored False;
property LogFileCategory: WideString index 23 read GetWideStringProp write SetWideStringProp stored False;
property LogEventsCategory: WideString index 24 read GetWideStringProp write SetWideStringProp stored False;
propertydo
LogEvents: WordBool index 25 read GetWordBoolProp write SetWordBoolProp stored False;
property TempDirectory: WideString index 27 read GetWideStringProp write SetWideStringProp stored False;
property AudiencesDirectory: WideString index 28 read GetWideStringProp write SetWideStringProp stored False;
property ServersDirectory: WideString index 29 read GetWideStringProp write SetWideStringProp stored False;
property CodecMappingFilename: WideString index 30 read GetWideStringProp write SetWideStringProp stored False;
property EnableRealMediaEvents: WordBool index 34 read GetWordBoolProp write SetWordBoolProp stored False;
property OnJobStarted: TNotifyEvent read FOnJobStarted write FOnJobStarted;
property OnJobDone: TNotifyEvent read FOnJobDone write FOnJobDone;
property OnEvent: THelixProducerOnEvent read FOnEvent write FOnEvent;
property OnLogMessage: THelixProducerOnLogMessage read FOnLogMessage write FOnLogMessage;
property OnProgress: THelixProducerOnProgress read FOnProgress write FOnProgress;
end;


// *********************************************************************//
// The Class CoHelixDuration provides a Create and CreateRemote method to
// create instances of the default interface IDuration exposed by
// the CoClass HelixDuration. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoHelixDuration = class
class function Create: IDuration;
class function CreateRemote(const MachineName: string): IDuration;
end;


procedure Register;

resourcestring
dtlServerPage = 'ActiveX';

dtlOcxPage = 'ActiveX';

implementation

uses ComObj;

procedure THelixProducer.InitControlData;
const
CEventDispIDs: array [0..4] of DWORD = (
$00000001, $00000002, $00000003, $00000004, $00000005);
CControlData: TControlData2 = (
ClassID: '{66F8592D-33E8-11D7-8A24-00045A785B71}';
EventIID: '{31801344-51A5-4CFB-B5B2-255341F1377E}';
EventCount: 5;
EventDispIDs: @CEventDispIDs;
LicenseKey: nil (*HR:$80004002*);
Flags: $00000000;
Version: 401);
begin

ControlData := @CControlData;
TControlData2(CControlData).FirstEventOfs := Cardinal(@@FOnJobStarted) - Cardinal(Self);
end;


procedure THelixProducer.CreateControl;

proceduredo
Create;
begin

FIntf := IUnknown(OleObject) as IProducerCtrl;
end;


begin

if FIntf = nil then
do
Create;
end;


function THelixProducer.GetControlInterface: IProducerCtrl;
begin

CreateControl;
Result := FIntf;
end;


procedure THelixProducer.StartJob;
begin

DefaultInterface.StartJob;
end;


procedure THelixProducer.StopJob;
begin

DefaultInterface.StopJob;
end;


procedure THelixProducer.CancelJob;
begin

DefaultInterface.CancelJob;
end;


procedure THelixProducer.ReleaseResources;
begin

DefaultInterface.ReleaseResources;
end;


function THelixProducer.GetAudioDevices: OleVariant;
begin

Result := DefaultInterface.GetAudioDevices;
end;


function THelixProducer.GetVideoDevices: OleVariant;
begin

Result := DefaultInterface.GetVideoDevices;
end;


function THelixProducer.GetAudioDeviceDialogNames(ulDeviceID: Integer): OleVariant;
begin

Result := DefaultInterface.GetAudioDeviceDialogNames(ulDeviceID);
end;


function THelixProducer.GetVideoDeviceDialogNames(ulDeviceID: Integer): OleVariant;
begin

Result := DefaultInterface.GetVideoDeviceDialogNames(ulDeviceID);
end;


procedure THelixProducer.LoadAudioDeviceDialog(ulDeviceID: Integer;
const bstrDialogName: WideString);
begin

DefaultInterface.LoadAudioDeviceDialog(ulDeviceID, bstrDialogName);
end;


procedure THelixProducer.LoadVideoDeviceDialog(ulDeviceID: Integer;
const bstrDialogName: WideString);
begin

DefaultInterface.LoadVideoDeviceDialog(ulDeviceID, bstrDialogName);
end;


procedure THelixProducer.FlushLog;
begin

DefaultInterface.FlushLog;
end;


function THelixProducer.GetAudiences: OleVariant;
begin

Result := DefaultInterface.GetAudiences;
end;


function THelixProducer.GetServers: OleVariant;
begin

Result := DefaultInterface.GetServers;
end;


function THelixProducer.GetSystemConfig(eEnType: eEnumerationType): OleVariant;
begin

Result := DefaultInterface.GetSystemConfig(eEnType);
end;


procedure THelixProducer.AddCustomRealMediaEvent(const bstrEventName: WideString;

const bstrEventValue: WideString;

lfStartTimeInSecs:do
uble;
lfDurationInSecs:do
uble);
begin

DefaultInterface.AddCustomRealMediaEvent(bstrEventName, bstrEventValue, lfStartTimeInSecs,
lfDurationInSecs);
end;


procedure THelixProducer.AddRealMediaEvent(RMEventType: eRMEventType;

const bstrEventValue: WideString;

lfStartTimeInSecs:do
uble;
lfDurationInSecs:do
uble);
begin

DefaultInterface.AddRealMediaEvent(RMEventType, bstrEventValue, lfStartTimeInSecs,
lfDurationInSecs);
end;


class function CoHelixDuration.Create: IDuration;
begin

Result := CreateComObject(CLASS_HelixDuration) as IDuration;
end;


class function CoHelixDuration.CreateRemote(const MachineName: string): IDuration;
begin

Result := CreateRemoteComObject(MachineName, CLASS_HelixDuration) as IDuration;
end;


procedure Register;
begin

RegisterComponents(dtlOcxPage, [THelixProducer]);
end;


end.
 
/* ***** begin
LICENSE BLOCK *****
* Version: RCSL 1.0/RPSL 1.0
*
* Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved.
*
* The contents of this file, and the files included with this file, are
* subject to the current version of the RealNetworks Public Source License
* Version 1.0 (the "RPSL") available at
* http://www.helixcommunity.org/content/rpsl unless you have licensed
* the file under the RealNetworks Community Source License Version 1.0
* (the "RCSL") available at http://www.helixcommunity.org/content/rcsl,
* in which case the RCSL will apply. You may also obtain the license terms
* directly from RealNetworks. You may not use this file except in
* compliance with the RPSL or, if you have a valid RCSL with RealNetworks
* applicable to this file, the RCSL. Please see the applicable RPSL or
* RCSL for the rights, obligations and limitations governing use of the
* contents of the file.
*
* This file is part of the Helix DNA Technology. RealNetworks is the
* developer of the Original Code and owns the copyrights in the portions
* it created.
*
* This file, and the files included with this file, is distributed and made
* available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
*
* Technology Compatibility Kit Test Suite(s) Location:
* http://www.helixcommunity.org/content/tck
*
* Contributor(s):
*
* ***** END LICENSE BLOCK ***** */

#include "ihxtprofile.h"

#ifdef _MAC_UNIX
#include <Carbon/Carbon.h>
#endif

#include &quot;hxcom.h&quot;

// standard includes
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
using namespace std;

#include &quot;ihxtencodingjob.h&quot;
#include &quot;encoder.h&quot;

#ifdef _WINDOWS
#include <crtdbg.h>
#endif


const UINT32 MAX_BUFFER_SIZE = 255;
void initMemLeakCheck();

int main(int argc, char** argv)
{
cout << &quot;Helix Producer SDK Sample Application&quot;
<< endl;

HX_RESULT res = HXR_OK;

// Debugging tool -- init memory leak checker for sample app
initMemLeakCheck();


// Step 1: Set up DLL access paths and create class factory
CEncoderApp encoderApp;
if (SUCCEEDED(res))
res = encoderApp.SetupDLLPaths();

// Step 2: Initialize the logging system and create file observer
if (SUCCEEDED(res))
res = encoderApp.InitializeLogSystem();

// Step 3: Create encoding job and set up the event sink
if (SUCCEEDED(res))
res = encoderApp.CreateJob();

// Step 4: Create and configure the input source
if (SUCCEEDED(res))
res = encoderApp.SetupInput();

// Step 5: Create and configure prefilters
if (SUCCEEDED(res))
res = encoderApp.SetupPrefilters();

// Step 6: Create and configure destination
if (SUCCEEDED(res))
res = encoderApp.SetupDestination();

// Step 7: Create and configure media profile
if (SUCCEEDED(res))
res = encoderApp.SetupMediaProfile();

// Step 8: Select audiences
if (SUCCEEDED(res))
res = encoderApp.SetupAudiences();

// Step 9: Configure job
if (SUCCEEDED(res))
res = encoderApp.SetupJob();

// Step 10: Job is fully configured now -- serialize job (optional step)
if (SUCCEEDED(res))
res = encoderApp.SerializeJob();

// Step 11: Start encoding
if (SUCCEEDED(res))
res = encoderApp.StartEncoding();

// Step 12: Log system requires an explicit shutdown call before main thread ends
encoderApp.Shutdown();

// Print result of encoding job
if(FAILED(res))
{
cout << &quot;Encoding failed! Error code: &quot;
<< res << endl;
cout << &quot;Please check the log file for diagnostic information&quot;
<< endl;
}
else

{
cout << &quot;Encoding successful!&quot;
<< endl;
}

// wait for a carriage return
char szTemp[MAX_BUFFER_SIZE];
cout << endl << &quot;Enter OK to continue: &quot;;
cin >> szTemp;

return 0;

}



// Custom MSVCRT report handler
#ifdef _WINDOWS
static int CustomCRTReportHandler(int reportType, char *userMessage, int *retVal)
{
//do
nothing for asserts -- return TRUE so _CrtDbgReport gets called
if (reportType == _CRT_ASSERT)
{
return TRUE;
}

// Otherwise, assert and print to screen / debugger
else

{
static UINT32 ulCount = 0;
if (ulCount++ == 0)
{
_ASSERT(FALSE);
}

printf(&quot;%s&quot;, userMessage);
OutputDebugString(userMessage);

return FALSE;
}
}
#endif



void initMemLeakCheck()
{
#ifdef _WINDOWS
// Use debug MSVCRT to report memory leaks upon application exit
_CrtSetDbgFlag((_CRTDBG_LEAK_CHECK_DF) | _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG));
_CrtSetReportHook( CustomCRTReportHandler );
#endif
}
 
帮顶!

╭=========================================╮

80G海量源代码,控件,书籍全免费狂下不停!

http://www.source520.com

╰=========================================╯
 
后退
顶部